|
59 | 59 | LondonTransactionBuilder, |
60 | 60 | ) |
61 | 61 |
|
| 62 | +UNMINED_LONDON_HEADER_FIELDS = [ |
| 63 | + ('parent_hash', hash32), |
| 64 | + ('uncles_hash', hash32), |
| 65 | + ('coinbase', address), |
| 66 | + ('state_root', trie_root), |
| 67 | + ('transaction_root', trie_root), |
| 68 | + ('receipt_root', trie_root), |
| 69 | + ('bloom', uint256), |
| 70 | + ('difficulty', big_endian_int), |
| 71 | + ('block_number', big_endian_int), |
| 72 | + ('gas_limit', big_endian_int), |
| 73 | + ('gas_used', big_endian_int), |
| 74 | + ('timestamp', big_endian_int), |
| 75 | + ('extra_data', binary), |
| 76 | + ('base_fee_per_gas', big_endian_int), |
| 77 | +] |
| 78 | + |
62 | 79 |
|
63 | 80 | class LondonMiningHeader(rlp.Serializable, MiningHeaderAPI): |
64 | | - fields = [ |
65 | | - ('parent_hash', hash32), |
66 | | - ('uncles_hash', hash32), |
67 | | - ('coinbase', address), |
68 | | - ('state_root', trie_root), |
69 | | - ('transaction_root', trie_root), |
70 | | - ('receipt_root', trie_root), |
71 | | - ('bloom', uint256), |
72 | | - ('difficulty', big_endian_int), |
73 | | - ('block_number', big_endian_int), |
74 | | - ('gas_limit', big_endian_int), |
75 | | - ('gas_used', big_endian_int), |
76 | | - ('timestamp', big_endian_int), |
77 | | - ('extra_data', binary), |
78 | | - ('base_fee_per_gas', big_endian_int), |
79 | | - ] |
| 81 | + fields = UNMINED_LONDON_HEADER_FIELDS |
80 | 82 |
|
81 | 83 |
|
82 | 84 | class LondonBlockHeader(rlp.Serializable, BlockHeaderAPI): |
83 | | - fields = [ |
84 | | - ('parent_hash', hash32), |
85 | | - ('uncles_hash', hash32), |
86 | | - ('coinbase', address), |
87 | | - ('state_root', trie_root), |
88 | | - ('transaction_root', trie_root), |
89 | | - ('receipt_root', trie_root), |
90 | | - ('bloom', uint256), |
91 | | - ('difficulty', big_endian_int), |
92 | | - ('block_number', big_endian_int), |
93 | | - ('gas_limit', big_endian_int), |
94 | | - ('gas_used', big_endian_int), |
95 | | - ('timestamp', big_endian_int), |
96 | | - ('extra_data', binary), |
97 | | - ('base_fee_per_gas', big_endian_int), |
| 85 | + fields = UNMINED_LONDON_HEADER_FIELDS + [ |
98 | 86 | ('mix_hash', binary), |
99 | 87 | ('nonce', Binary(8, allow_empty=True)), |
100 | 88 | ] |
|
0 commit comments