ethereum-execution 2.18.0rc6.dev2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ethereum/__init__.py +30 -0
- ethereum/assets/blocks/block_1.json +22 -0
- ethereum/assets/blocks/block_1234567.json +22 -0
- ethereum/assets/blocks/block_12964999.json +2720 -0
- ethereum/assets/cache_sizes_2048_epochs.json +329 -0
- ethereum/assets/dataset_sizes_2048_epochs.json +412 -0
- ethereum/assets/mainnet.json +26711 -0
- ethereum/crypto/__init__.py +3 -0
- ethereum/crypto/blake2.py +265 -0
- ethereum/crypto/elliptic_curve.py +170 -0
- ethereum/crypto/hash.py +56 -0
- ethereum/crypto/kzg.py +176 -0
- ethereum/ethash.py +426 -0
- ethereum/exceptions.py +75 -0
- ethereum/fork_criteria.py +205 -0
- ethereum/forks/arrow_glacier/__init__.py +33 -0
- ethereum/forks/arrow_glacier/blocks.py +326 -0
- ethereum/forks/arrow_glacier/bloom.py +87 -0
- ethereum/forks/arrow_glacier/exceptions.py +58 -0
- ethereum/forks/arrow_glacier/fork.py +954 -0
- ethereum/forks/arrow_glacier/fork_types.py +62 -0
- ethereum/forks/arrow_glacier/state.py +644 -0
- ethereum/forks/arrow_glacier/transactions.py +573 -0
- ethereum/forks/arrow_glacier/trie.py +498 -0
- ethereum/forks/arrow_glacier/utils/__init__.py +3 -0
- ethereum/forks/arrow_glacier/utils/address.py +94 -0
- ethereum/forks/arrow_glacier/utils/hexadecimal.py +55 -0
- ethereum/forks/arrow_glacier/utils/message.py +90 -0
- ethereum/forks/arrow_glacier/vm/__init__.py +195 -0
- ethereum/forks/arrow_glacier/vm/exceptions.py +131 -0
- ethereum/forks/arrow_glacier/vm/gas.py +245 -0
- ethereum/forks/arrow_glacier/vm/instructions/__init__.py +353 -0
- ethereum/forks/arrow_glacier/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/arrow_glacier/vm/instructions/bitwise.py +245 -0
- ethereum/forks/arrow_glacier/vm/instructions/block.py +212 -0
- ethereum/forks/arrow_glacier/vm/instructions/comparison.py +177 -0
- ethereum/forks/arrow_glacier/vm/instructions/control_flow.py +171 -0
- ethereum/forks/arrow_glacier/vm/instructions/environment.py +544 -0
- ethereum/forks/arrow_glacier/vm/instructions/keccak.py +63 -0
- ethereum/forks/arrow_glacier/vm/instructions/log.py +88 -0
- ethereum/forks/arrow_glacier/vm/instructions/memory.py +141 -0
- ethereum/forks/arrow_glacier/vm/instructions/stack.py +204 -0
- ethereum/forks/arrow_glacier/vm/instructions/storage.py +126 -0
- ethereum/forks/arrow_glacier/vm/instructions/system.py +694 -0
- ethereum/forks/arrow_glacier/vm/interpreter.py +312 -0
- ethereum/forks/arrow_glacier/vm/memory.py +84 -0
- ethereum/forks/arrow_glacier/vm/precompiled_contracts/__init__.py +37 -0
- ethereum/forks/arrow_glacier/vm/precompiled_contracts/alt_bn128.py +230 -0
- ethereum/forks/arrow_glacier/vm/precompiled_contracts/blake2f.py +42 -0
- ethereum/forks/arrow_glacier/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/arrow_glacier/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/arrow_glacier/vm/precompiled_contracts/mapping.py +46 -0
- ethereum/forks/arrow_glacier/vm/precompiled_contracts/modexp.py +166 -0
- ethereum/forks/arrow_glacier/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/arrow_glacier/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/arrow_glacier/vm/runtime.py +69 -0
- ethereum/forks/arrow_glacier/vm/stack.py +58 -0
- ethereum/forks/berlin/__init__.py +43 -0
- ethereum/forks/berlin/blocks.py +297 -0
- ethereum/forks/berlin/bloom.py +87 -0
- ethereum/forks/berlin/exceptions.py +24 -0
- ethereum/forks/berlin/fork.py +839 -0
- ethereum/forks/berlin/fork_types.py +62 -0
- ethereum/forks/berlin/state.py +644 -0
- ethereum/forks/berlin/transactions.py +456 -0
- ethereum/forks/berlin/trie.py +498 -0
- ethereum/forks/berlin/utils/__init__.py +3 -0
- ethereum/forks/berlin/utils/address.py +94 -0
- ethereum/forks/berlin/utils/hexadecimal.py +55 -0
- ethereum/forks/berlin/utils/message.py +90 -0
- ethereum/forks/berlin/vm/__init__.py +194 -0
- ethereum/forks/berlin/vm/exceptions.py +123 -0
- ethereum/forks/berlin/vm/gas.py +246 -0
- ethereum/forks/berlin/vm/instructions/__init__.py +351 -0
- ethereum/forks/berlin/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/berlin/vm/instructions/bitwise.py +245 -0
- ethereum/forks/berlin/vm/instructions/block.py +212 -0
- ethereum/forks/berlin/vm/instructions/comparison.py +177 -0
- ethereum/forks/berlin/vm/instructions/control_flow.py +171 -0
- ethereum/forks/berlin/vm/instructions/environment.py +521 -0
- ethereum/forks/berlin/vm/instructions/keccak.py +63 -0
- ethereum/forks/berlin/vm/instructions/log.py +88 -0
- ethereum/forks/berlin/vm/instructions/memory.py +141 -0
- ethereum/forks/berlin/vm/instructions/stack.py +204 -0
- ethereum/forks/berlin/vm/instructions/storage.py +126 -0
- ethereum/forks/berlin/vm/instructions/system.py +706 -0
- ethereum/forks/berlin/vm/interpreter.py +308 -0
- ethereum/forks/berlin/vm/memory.py +84 -0
- ethereum/forks/berlin/vm/precompiled_contracts/__init__.py +37 -0
- ethereum/forks/berlin/vm/precompiled_contracts/alt_bn128.py +230 -0
- ethereum/forks/berlin/vm/precompiled_contracts/blake2f.py +42 -0
- ethereum/forks/berlin/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/berlin/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/berlin/vm/precompiled_contracts/mapping.py +46 -0
- ethereum/forks/berlin/vm/precompiled_contracts/modexp.py +166 -0
- ethereum/forks/berlin/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/berlin/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/berlin/vm/runtime.py +69 -0
- ethereum/forks/berlin/vm/stack.py +58 -0
- ethereum/forks/byzantium/__init__.py +50 -0
- ethereum/forks/byzantium/blocks.py +265 -0
- ethereum/forks/byzantium/bloom.py +87 -0
- ethereum/forks/byzantium/fork.py +816 -0
- ethereum/forks/byzantium/fork_types.py +61 -0
- ethereum/forks/byzantium/state.py +583 -0
- ethereum/forks/byzantium/transactions.py +261 -0
- ethereum/forks/byzantium/trie.py +498 -0
- ethereum/forks/byzantium/utils/__init__.py +3 -0
- ethereum/forks/byzantium/utils/address.py +63 -0
- ethereum/forks/byzantium/utils/hexadecimal.py +55 -0
- ethereum/forks/byzantium/utils/message.py +80 -0
- ethereum/forks/byzantium/vm/__init__.py +186 -0
- ethereum/forks/byzantium/vm/exceptions.py +123 -0
- ethereum/forks/byzantium/vm/gas.py +245 -0
- ethereum/forks/byzantium/vm/instructions/__init__.py +337 -0
- ethereum/forks/byzantium/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/byzantium/vm/instructions/bitwise.py +153 -0
- ethereum/forks/byzantium/vm/instructions/block.py +189 -0
- ethereum/forks/byzantium/vm/instructions/comparison.py +177 -0
- ethereum/forks/byzantium/vm/instructions/control_flow.py +171 -0
- ethereum/forks/byzantium/vm/instructions/environment.py +436 -0
- ethereum/forks/byzantium/vm/instructions/keccak.py +63 -0
- ethereum/forks/byzantium/vm/instructions/log.py +88 -0
- ethereum/forks/byzantium/vm/instructions/memory.py +141 -0
- ethereum/forks/byzantium/vm/instructions/stack.py +204 -0
- ethereum/forks/byzantium/vm/instructions/storage.py +88 -0
- ethereum/forks/byzantium/vm/instructions/system.py +601 -0
- ethereum/forks/byzantium/vm/interpreter.py +299 -0
- ethereum/forks/byzantium/vm/memory.py +84 -0
- ethereum/forks/byzantium/vm/precompiled_contracts/__init__.py +36 -0
- ethereum/forks/byzantium/vm/precompiled_contracts/alt_bn128.py +230 -0
- ethereum/forks/byzantium/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/byzantium/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/byzantium/vm/precompiled_contracts/mapping.py +43 -0
- ethereum/forks/byzantium/vm/precompiled_contracts/modexp.py +168 -0
- ethereum/forks/byzantium/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/byzantium/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/byzantium/vm/runtime.py +69 -0
- ethereum/forks/byzantium/vm/stack.py +58 -0
- ethereum/forks/cancun/__init__.py +49 -0
- ethereum/forks/cancun/blocks.py +389 -0
- ethereum/forks/cancun/bloom.py +87 -0
- ethereum/forks/cancun/exceptions.py +109 -0
- ethereum/forks/cancun/fork.py +881 -0
- ethereum/forks/cancun/fork_types.py +63 -0
- ethereum/forks/cancun/state.py +667 -0
- ethereum/forks/cancun/transactions.py +721 -0
- ethereum/forks/cancun/trie.py +508 -0
- ethereum/forks/cancun/utils/__init__.py +3 -0
- ethereum/forks/cancun/utils/address.py +94 -0
- ethereum/forks/cancun/utils/hexadecimal.py +55 -0
- ethereum/forks/cancun/utils/message.py +90 -0
- ethereum/forks/cancun/vm/__init__.py +186 -0
- ethereum/forks/cancun/vm/exceptions.py +139 -0
- ethereum/forks/cancun/vm/gas.py +372 -0
- ethereum/forks/cancun/vm/instructions/__init__.py +365 -0
- ethereum/forks/cancun/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/cancun/vm/instructions/bitwise.py +245 -0
- ethereum/forks/cancun/vm/instructions/block.py +261 -0
- ethereum/forks/cancun/vm/instructions/comparison.py +177 -0
- ethereum/forks/cancun/vm/instructions/control_flow.py +171 -0
- ethereum/forks/cancun/vm/instructions/environment.py +600 -0
- ethereum/forks/cancun/vm/instructions/keccak.py +63 -0
- ethereum/forks/cancun/vm/instructions/log.py +88 -0
- ethereum/forks/cancun/vm/instructions/memory.py +177 -0
- ethereum/forks/cancun/vm/instructions/stack.py +208 -0
- ethereum/forks/cancun/vm/instructions/storage.py +188 -0
- ethereum/forks/cancun/vm/instructions/system.py +708 -0
- ethereum/forks/cancun/vm/interpreter.py +302 -0
- ethereum/forks/cancun/vm/memory.py +84 -0
- ethereum/forks/cancun/vm/precompiled_contracts/__init__.py +39 -0
- ethereum/forks/cancun/vm/precompiled_contracts/alt_bn128.py +230 -0
- ethereum/forks/cancun/vm/precompiled_contracts/blake2f.py +42 -0
- ethereum/forks/cancun/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/cancun/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/cancun/vm/precompiled_contracts/mapping.py +49 -0
- ethereum/forks/cancun/vm/precompiled_contracts/modexp.py +166 -0
- ethereum/forks/cancun/vm/precompiled_contracts/point_evaluation.py +72 -0
- ethereum/forks/cancun/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/cancun/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/cancun/vm/runtime.py +69 -0
- ethereum/forks/cancun/vm/stack.py +58 -0
- ethereum/forks/constantinople/__init__.py +51 -0
- ethereum/forks/constantinople/blocks.py +265 -0
- ethereum/forks/constantinople/bloom.py +87 -0
- ethereum/forks/constantinople/fork.py +816 -0
- ethereum/forks/constantinople/fork_types.py +62 -0
- ethereum/forks/constantinople/state.py +583 -0
- ethereum/forks/constantinople/transactions.py +261 -0
- ethereum/forks/constantinople/trie.py +498 -0
- ethereum/forks/constantinople/utils/__init__.py +3 -0
- ethereum/forks/constantinople/utils/address.py +93 -0
- ethereum/forks/constantinople/utils/hexadecimal.py +55 -0
- ethereum/forks/constantinople/utils/message.py +80 -0
- ethereum/forks/constantinople/vm/__init__.py +186 -0
- ethereum/forks/constantinople/vm/exceptions.py +123 -0
- ethereum/forks/constantinople/vm/gas.py +246 -0
- ethereum/forks/constantinople/vm/instructions/__init__.py +347 -0
- ethereum/forks/constantinople/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/constantinople/vm/instructions/bitwise.py +245 -0
- ethereum/forks/constantinople/vm/instructions/block.py +189 -0
- ethereum/forks/constantinople/vm/instructions/comparison.py +177 -0
- ethereum/forks/constantinople/vm/instructions/control_flow.py +171 -0
- ethereum/forks/constantinople/vm/instructions/environment.py +470 -0
- ethereum/forks/constantinople/vm/instructions/keccak.py +63 -0
- ethereum/forks/constantinople/vm/instructions/log.py +88 -0
- ethereum/forks/constantinople/vm/instructions/memory.py +141 -0
- ethereum/forks/constantinople/vm/instructions/stack.py +204 -0
- ethereum/forks/constantinople/vm/instructions/storage.py +88 -0
- ethereum/forks/constantinople/vm/instructions/system.py +673 -0
- ethereum/forks/constantinople/vm/interpreter.py +300 -0
- ethereum/forks/constantinople/vm/memory.py +84 -0
- ethereum/forks/constantinople/vm/precompiled_contracts/__init__.py +36 -0
- ethereum/forks/constantinople/vm/precompiled_contracts/alt_bn128.py +230 -0
- ethereum/forks/constantinople/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/constantinople/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/constantinople/vm/precompiled_contracts/mapping.py +43 -0
- ethereum/forks/constantinople/vm/precompiled_contracts/modexp.py +168 -0
- ethereum/forks/constantinople/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/constantinople/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/constantinople/vm/runtime.py +69 -0
- ethereum/forks/constantinople/vm/stack.py +58 -0
- ethereum/forks/dao_fork/__init__.py +29 -0
- ethereum/forks/dao_fork/blocks.py +265 -0
- ethereum/forks/dao_fork/bloom.py +87 -0
- ethereum/forks/dao_fork/dao.py +357 -0
- ethereum/forks/dao_fork/fork.py +816 -0
- ethereum/forks/dao_fork/fork_types.py +62 -0
- ethereum/forks/dao_fork/state.py +515 -0
- ethereum/forks/dao_fork/transactions.py +227 -0
- ethereum/forks/dao_fork/trie.py +498 -0
- ethereum/forks/dao_fork/utils/__init__.py +3 -0
- ethereum/forks/dao_fork/utils/address.py +62 -0
- ethereum/forks/dao_fork/utils/hexadecimal.py +55 -0
- ethereum/forks/dao_fork/utils/message.py +78 -0
- ethereum/forks/dao_fork/vm/__init__.py +163 -0
- ethereum/forks/dao_fork/vm/exceptions.py +86 -0
- ethereum/forks/dao_fork/vm/gas.py +212 -0
- ethereum/forks/dao_fork/vm/instructions/__init__.py +329 -0
- ethereum/forks/dao_fork/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/dao_fork/vm/instructions/bitwise.py +153 -0
- ethereum/forks/dao_fork/vm/instructions/block.py +189 -0
- ethereum/forks/dao_fork/vm/instructions/comparison.py +177 -0
- ethereum/forks/dao_fork/vm/instructions/control_flow.py +171 -0
- ethereum/forks/dao_fork/vm/instructions/environment.py +376 -0
- ethereum/forks/dao_fork/vm/instructions/keccak.py +63 -0
- ethereum/forks/dao_fork/vm/instructions/log.py +85 -0
- ethereum/forks/dao_fork/vm/instructions/memory.py +141 -0
- ethereum/forks/dao_fork/vm/instructions/stack.py +204 -0
- ethereum/forks/dao_fork/vm/instructions/storage.py +87 -0
- ethereum/forks/dao_fork/vm/instructions/system.py +457 -0
- ethereum/forks/dao_fork/vm/interpreter.py +274 -0
- ethereum/forks/dao_fork/vm/memory.py +84 -0
- ethereum/forks/dao_fork/vm/precompiled_contracts/__init__.py +27 -0
- ethereum/forks/dao_fork/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/dao_fork/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/dao_fork/vm/precompiled_contracts/mapping.py +33 -0
- ethereum/forks/dao_fork/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/dao_fork/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/dao_fork/vm/runtime.py +69 -0
- ethereum/forks/dao_fork/vm/stack.py +58 -0
- ethereum/forks/frontier/__init__.py +7 -0
- ethereum/forks/frontier/blocks.py +265 -0
- ethereum/forks/frontier/bloom.py +87 -0
- ethereum/forks/frontier/fork.py +789 -0
- ethereum/forks/frontier/fork_types.py +62 -0
- ethereum/forks/frontier/state.py +515 -0
- ethereum/forks/frontier/transactions.py +216 -0
- ethereum/forks/frontier/trie.py +499 -0
- ethereum/forks/frontier/utils/__init__.py +3 -0
- ethereum/forks/frontier/utils/address.py +62 -0
- ethereum/forks/frontier/utils/hexadecimal.py +55 -0
- ethereum/forks/frontier/utils/message.py +77 -0
- ethereum/forks/frontier/vm/__init__.py +162 -0
- ethereum/forks/frontier/vm/exceptions.py +86 -0
- ethereum/forks/frontier/vm/gas.py +212 -0
- ethereum/forks/frontier/vm/instructions/__init__.py +327 -0
- ethereum/forks/frontier/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/frontier/vm/instructions/bitwise.py +153 -0
- ethereum/forks/frontier/vm/instructions/block.py +189 -0
- ethereum/forks/frontier/vm/instructions/comparison.py +177 -0
- ethereum/forks/frontier/vm/instructions/control_flow.py +171 -0
- ethereum/forks/frontier/vm/instructions/environment.py +376 -0
- ethereum/forks/frontier/vm/instructions/keccak.py +63 -0
- ethereum/forks/frontier/vm/instructions/log.py +85 -0
- ethereum/forks/frontier/vm/instructions/memory.py +141 -0
- ethereum/forks/frontier/vm/instructions/stack.py +204 -0
- ethereum/forks/frontier/vm/instructions/storage.py +87 -0
- ethereum/forks/frontier/vm/instructions/system.py +403 -0
- ethereum/forks/frontier/vm/interpreter.py +272 -0
- ethereum/forks/frontier/vm/memory.py +84 -0
- ethereum/forks/frontier/vm/precompiled_contracts/__init__.py +27 -0
- ethereum/forks/frontier/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/frontier/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/frontier/vm/precompiled_contracts/mapping.py +33 -0
- ethereum/forks/frontier/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/frontier/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/frontier/vm/runtime.py +69 -0
- ethereum/forks/frontier/vm/stack.py +58 -0
- ethereum/forks/gray_glacier/__init__.py +34 -0
- ethereum/forks/gray_glacier/blocks.py +326 -0
- ethereum/forks/gray_glacier/bloom.py +87 -0
- ethereum/forks/gray_glacier/exceptions.py +58 -0
- ethereum/forks/gray_glacier/fork.py +954 -0
- ethereum/forks/gray_glacier/fork_types.py +62 -0
- ethereum/forks/gray_glacier/state.py +644 -0
- ethereum/forks/gray_glacier/transactions.py +573 -0
- ethereum/forks/gray_glacier/trie.py +498 -0
- ethereum/forks/gray_glacier/utils/__init__.py +3 -0
- ethereum/forks/gray_glacier/utils/address.py +94 -0
- ethereum/forks/gray_glacier/utils/hexadecimal.py +55 -0
- ethereum/forks/gray_glacier/utils/message.py +90 -0
- ethereum/forks/gray_glacier/vm/__init__.py +195 -0
- ethereum/forks/gray_glacier/vm/exceptions.py +131 -0
- ethereum/forks/gray_glacier/vm/gas.py +245 -0
- ethereum/forks/gray_glacier/vm/instructions/__init__.py +353 -0
- ethereum/forks/gray_glacier/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/gray_glacier/vm/instructions/bitwise.py +245 -0
- ethereum/forks/gray_glacier/vm/instructions/block.py +212 -0
- ethereum/forks/gray_glacier/vm/instructions/comparison.py +177 -0
- ethereum/forks/gray_glacier/vm/instructions/control_flow.py +171 -0
- ethereum/forks/gray_glacier/vm/instructions/environment.py +544 -0
- ethereum/forks/gray_glacier/vm/instructions/keccak.py +63 -0
- ethereum/forks/gray_glacier/vm/instructions/log.py +88 -0
- ethereum/forks/gray_glacier/vm/instructions/memory.py +141 -0
- ethereum/forks/gray_glacier/vm/instructions/stack.py +204 -0
- ethereum/forks/gray_glacier/vm/instructions/storage.py +126 -0
- ethereum/forks/gray_glacier/vm/instructions/system.py +694 -0
- ethereum/forks/gray_glacier/vm/interpreter.py +312 -0
- ethereum/forks/gray_glacier/vm/memory.py +84 -0
- ethereum/forks/gray_glacier/vm/precompiled_contracts/__init__.py +37 -0
- ethereum/forks/gray_glacier/vm/precompiled_contracts/alt_bn128.py +230 -0
- ethereum/forks/gray_glacier/vm/precompiled_contracts/blake2f.py +42 -0
- ethereum/forks/gray_glacier/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/gray_glacier/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/gray_glacier/vm/precompiled_contracts/mapping.py +46 -0
- ethereum/forks/gray_glacier/vm/precompiled_contracts/modexp.py +166 -0
- ethereum/forks/gray_glacier/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/gray_glacier/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/gray_glacier/vm/runtime.py +69 -0
- ethereum/forks/gray_glacier/vm/stack.py +58 -0
- ethereum/forks/homestead/__init__.py +34 -0
- ethereum/forks/homestead/blocks.py +265 -0
- ethereum/forks/homestead/bloom.py +87 -0
- ethereum/forks/homestead/fork.py +798 -0
- ethereum/forks/homestead/fork_types.py +62 -0
- ethereum/forks/homestead/state.py +515 -0
- ethereum/forks/homestead/transactions.py +227 -0
- ethereum/forks/homestead/trie.py +498 -0
- ethereum/forks/homestead/utils/__init__.py +3 -0
- ethereum/forks/homestead/utils/address.py +62 -0
- ethereum/forks/homestead/utils/hexadecimal.py +55 -0
- ethereum/forks/homestead/utils/message.py +78 -0
- ethereum/forks/homestead/vm/__init__.py +163 -0
- ethereum/forks/homestead/vm/exceptions.py +86 -0
- ethereum/forks/homestead/vm/gas.py +212 -0
- ethereum/forks/homestead/vm/instructions/__init__.py +329 -0
- ethereum/forks/homestead/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/homestead/vm/instructions/bitwise.py +153 -0
- ethereum/forks/homestead/vm/instructions/block.py +189 -0
- ethereum/forks/homestead/vm/instructions/comparison.py +177 -0
- ethereum/forks/homestead/vm/instructions/control_flow.py +171 -0
- ethereum/forks/homestead/vm/instructions/environment.py +376 -0
- ethereum/forks/homestead/vm/instructions/keccak.py +63 -0
- ethereum/forks/homestead/vm/instructions/log.py +85 -0
- ethereum/forks/homestead/vm/instructions/memory.py +141 -0
- ethereum/forks/homestead/vm/instructions/stack.py +204 -0
- ethereum/forks/homestead/vm/instructions/storage.py +87 -0
- ethereum/forks/homestead/vm/instructions/system.py +457 -0
- ethereum/forks/homestead/vm/interpreter.py +274 -0
- ethereum/forks/homestead/vm/memory.py +84 -0
- ethereum/forks/homestead/vm/precompiled_contracts/__init__.py +27 -0
- ethereum/forks/homestead/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/homestead/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/homestead/vm/precompiled_contracts/mapping.py +33 -0
- ethereum/forks/homestead/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/homestead/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/homestead/vm/runtime.py +69 -0
- ethereum/forks/homestead/vm/stack.py +58 -0
- ethereum/forks/istanbul/__init__.py +53 -0
- ethereum/forks/istanbul/blocks.py +265 -0
- ethereum/forks/istanbul/bloom.py +87 -0
- ethereum/forks/istanbul/fork.py +816 -0
- ethereum/forks/istanbul/fork_types.py +62 -0
- ethereum/forks/istanbul/state.py +644 -0
- ethereum/forks/istanbul/transactions.py +261 -0
- ethereum/forks/istanbul/trie.py +498 -0
- ethereum/forks/istanbul/utils/__init__.py +3 -0
- ethereum/forks/istanbul/utils/address.py +94 -0
- ethereum/forks/istanbul/utils/hexadecimal.py +55 -0
- ethereum/forks/istanbul/utils/message.py +80 -0
- ethereum/forks/istanbul/vm/__init__.py +186 -0
- ethereum/forks/istanbul/vm/exceptions.py +123 -0
- ethereum/forks/istanbul/vm/gas.py +248 -0
- ethereum/forks/istanbul/vm/instructions/__init__.py +351 -0
- ethereum/forks/istanbul/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/istanbul/vm/instructions/bitwise.py +245 -0
- ethereum/forks/istanbul/vm/instructions/block.py +212 -0
- ethereum/forks/istanbul/vm/instructions/comparison.py +177 -0
- ethereum/forks/istanbul/vm/instructions/control_flow.py +171 -0
- ethereum/forks/istanbul/vm/instructions/environment.py +499 -0
- ethereum/forks/istanbul/vm/instructions/keccak.py +63 -0
- ethereum/forks/istanbul/vm/instructions/log.py +88 -0
- ethereum/forks/istanbul/vm/instructions/memory.py +141 -0
- ethereum/forks/istanbul/vm/instructions/stack.py +204 -0
- ethereum/forks/istanbul/vm/instructions/storage.py +113 -0
- ethereum/forks/istanbul/vm/instructions/system.py +673 -0
- ethereum/forks/istanbul/vm/interpreter.py +306 -0
- ethereum/forks/istanbul/vm/memory.py +84 -0
- ethereum/forks/istanbul/vm/precompiled_contracts/__init__.py +37 -0
- ethereum/forks/istanbul/vm/precompiled_contracts/alt_bn128.py +230 -0
- ethereum/forks/istanbul/vm/precompiled_contracts/blake2f.py +42 -0
- ethereum/forks/istanbul/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/istanbul/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/istanbul/vm/precompiled_contracts/mapping.py +46 -0
- ethereum/forks/istanbul/vm/precompiled_contracts/modexp.py +168 -0
- ethereum/forks/istanbul/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/istanbul/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/istanbul/vm/runtime.py +69 -0
- ethereum/forks/istanbul/vm/stack.py +58 -0
- ethereum/forks/london/__init__.py +48 -0
- ethereum/forks/london/blocks.py +326 -0
- ethereum/forks/london/bloom.py +87 -0
- ethereum/forks/london/exceptions.py +58 -0
- ethereum/forks/london/fork.py +960 -0
- ethereum/forks/london/fork_types.py +62 -0
- ethereum/forks/london/state.py +644 -0
- ethereum/forks/london/transactions.py +573 -0
- ethereum/forks/london/trie.py +498 -0
- ethereum/forks/london/utils/__init__.py +3 -0
- ethereum/forks/london/utils/address.py +94 -0
- ethereum/forks/london/utils/hexadecimal.py +55 -0
- ethereum/forks/london/utils/message.py +90 -0
- ethereum/forks/london/vm/__init__.py +195 -0
- ethereum/forks/london/vm/exceptions.py +131 -0
- ethereum/forks/london/vm/gas.py +245 -0
- ethereum/forks/london/vm/instructions/__init__.py +353 -0
- ethereum/forks/london/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/london/vm/instructions/bitwise.py +245 -0
- ethereum/forks/london/vm/instructions/block.py +212 -0
- ethereum/forks/london/vm/instructions/comparison.py +177 -0
- ethereum/forks/london/vm/instructions/control_flow.py +171 -0
- ethereum/forks/london/vm/instructions/environment.py +544 -0
- ethereum/forks/london/vm/instructions/keccak.py +63 -0
- ethereum/forks/london/vm/instructions/log.py +88 -0
- ethereum/forks/london/vm/instructions/memory.py +141 -0
- ethereum/forks/london/vm/instructions/stack.py +204 -0
- ethereum/forks/london/vm/instructions/storage.py +126 -0
- ethereum/forks/london/vm/instructions/system.py +694 -0
- ethereum/forks/london/vm/interpreter.py +312 -0
- ethereum/forks/london/vm/memory.py +84 -0
- ethereum/forks/london/vm/precompiled_contracts/__init__.py +37 -0
- ethereum/forks/london/vm/precompiled_contracts/alt_bn128.py +230 -0
- ethereum/forks/london/vm/precompiled_contracts/blake2f.py +42 -0
- ethereum/forks/london/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/london/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/london/vm/precompiled_contracts/mapping.py +46 -0
- ethereum/forks/london/vm/precompiled_contracts/modexp.py +166 -0
- ethereum/forks/london/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/london/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/london/vm/runtime.py +69 -0
- ethereum/forks/london/vm/stack.py +58 -0
- ethereum/forks/muir_glacier/__init__.py +38 -0
- ethereum/forks/muir_glacier/blocks.py +265 -0
- ethereum/forks/muir_glacier/bloom.py +87 -0
- ethereum/forks/muir_glacier/fork.py +818 -0
- ethereum/forks/muir_glacier/fork_types.py +62 -0
- ethereum/forks/muir_glacier/state.py +644 -0
- ethereum/forks/muir_glacier/transactions.py +261 -0
- ethereum/forks/muir_glacier/trie.py +498 -0
- ethereum/forks/muir_glacier/utils/__init__.py +3 -0
- ethereum/forks/muir_glacier/utils/address.py +94 -0
- ethereum/forks/muir_glacier/utils/hexadecimal.py +55 -0
- ethereum/forks/muir_glacier/utils/message.py +80 -0
- ethereum/forks/muir_glacier/vm/__init__.py +186 -0
- ethereum/forks/muir_glacier/vm/exceptions.py +123 -0
- ethereum/forks/muir_glacier/vm/gas.py +248 -0
- ethereum/forks/muir_glacier/vm/instructions/__init__.py +351 -0
- ethereum/forks/muir_glacier/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/muir_glacier/vm/instructions/bitwise.py +245 -0
- ethereum/forks/muir_glacier/vm/instructions/block.py +212 -0
- ethereum/forks/muir_glacier/vm/instructions/comparison.py +177 -0
- ethereum/forks/muir_glacier/vm/instructions/control_flow.py +171 -0
- ethereum/forks/muir_glacier/vm/instructions/environment.py +499 -0
- ethereum/forks/muir_glacier/vm/instructions/keccak.py +63 -0
- ethereum/forks/muir_glacier/vm/instructions/log.py +88 -0
- ethereum/forks/muir_glacier/vm/instructions/memory.py +141 -0
- ethereum/forks/muir_glacier/vm/instructions/stack.py +204 -0
- ethereum/forks/muir_glacier/vm/instructions/storage.py +113 -0
- ethereum/forks/muir_glacier/vm/instructions/system.py +673 -0
- ethereum/forks/muir_glacier/vm/interpreter.py +306 -0
- ethereum/forks/muir_glacier/vm/memory.py +84 -0
- ethereum/forks/muir_glacier/vm/precompiled_contracts/__init__.py +37 -0
- ethereum/forks/muir_glacier/vm/precompiled_contracts/alt_bn128.py +230 -0
- ethereum/forks/muir_glacier/vm/precompiled_contracts/blake2f.py +42 -0
- ethereum/forks/muir_glacier/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/muir_glacier/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/muir_glacier/vm/precompiled_contracts/mapping.py +46 -0
- ethereum/forks/muir_glacier/vm/precompiled_contracts/modexp.py +168 -0
- ethereum/forks/muir_glacier/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/muir_glacier/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/muir_glacier/vm/runtime.py +69 -0
- ethereum/forks/muir_glacier/vm/stack.py +58 -0
- ethereum/forks/osaka/__init__.py +55 -0
- ethereum/forks/osaka/blocks.py +405 -0
- ethereum/forks/osaka/bloom.py +87 -0
- ethereum/forks/osaka/exceptions.py +131 -0
- ethereum/forks/osaka/fork.py +1059 -0
- ethereum/forks/osaka/fork_types.py +78 -0
- ethereum/forks/osaka/requests.py +191 -0
- ethereum/forks/osaka/state.py +667 -0
- ethereum/forks/osaka/transactions.py +887 -0
- ethereum/forks/osaka/trie.py +508 -0
- ethereum/forks/osaka/utils/__init__.py +3 -0
- ethereum/forks/osaka/utils/address.py +94 -0
- ethereum/forks/osaka/utils/hexadecimal.py +55 -0
- ethereum/forks/osaka/utils/message.py +90 -0
- ethereum/forks/osaka/vm/__init__.py +191 -0
- ethereum/forks/osaka/vm/eoa_delegation.py +211 -0
- ethereum/forks/osaka/vm/exceptions.py +139 -0
- ethereum/forks/osaka/vm/gas.py +396 -0
- ethereum/forks/osaka/vm/instructions/__init__.py +367 -0
- ethereum/forks/osaka/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/osaka/vm/instructions/bitwise.py +274 -0
- ethereum/forks/osaka/vm/instructions/block.py +261 -0
- ethereum/forks/osaka/vm/instructions/comparison.py +177 -0
- ethereum/forks/osaka/vm/instructions/control_flow.py +171 -0
- ethereum/forks/osaka/vm/instructions/environment.py +600 -0
- ethereum/forks/osaka/vm/instructions/keccak.py +63 -0
- ethereum/forks/osaka/vm/instructions/log.py +88 -0
- ethereum/forks/osaka/vm/instructions/memory.py +177 -0
- ethereum/forks/osaka/vm/instructions/stack.py +208 -0
- ethereum/forks/osaka/vm/instructions/storage.py +188 -0
- ethereum/forks/osaka/vm/instructions/system.py +751 -0
- ethereum/forks/osaka/vm/interpreter.py +324 -0
- ethereum/forks/osaka/vm/memory.py +83 -0
- ethereum/forks/osaka/vm/precompiled_contracts/__init__.py +55 -0
- ethereum/forks/osaka/vm/precompiled_contracts/alt_bn128.py +230 -0
- ethereum/forks/osaka/vm/precompiled_contracts/blake2f.py +42 -0
- ethereum/forks/osaka/vm/precompiled_contracts/bls12_381/__init__.py +622 -0
- ethereum/forks/osaka/vm/precompiled_contracts/bls12_381/bls12_381_g1.py +151 -0
- ethereum/forks/osaka/vm/precompiled_contracts/bls12_381/bls12_381_g2.py +153 -0
- ethereum/forks/osaka/vm/precompiled_contracts/bls12_381/bls12_381_pairing.py +69 -0
- ethereum/forks/osaka/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/osaka/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/osaka/vm/precompiled_contracts/mapping.py +77 -0
- ethereum/forks/osaka/vm/precompiled_contracts/modexp.py +175 -0
- ethereum/forks/osaka/vm/precompiled_contracts/p256verify.py +89 -0
- ethereum/forks/osaka/vm/precompiled_contracts/point_evaluation.py +72 -0
- ethereum/forks/osaka/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/osaka/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/osaka/vm/runtime.py +69 -0
- ethereum/forks/osaka/vm/stack.py +58 -0
- ethereum/forks/paris/__init__.py +43 -0
- ethereum/forks/paris/blocks.py +312 -0
- ethereum/forks/paris/bloom.py +87 -0
- ethereum/forks/paris/exceptions.py +58 -0
- ethereum/forks/paris/fork.py +651 -0
- ethereum/forks/paris/fork_types.py +62 -0
- ethereum/forks/paris/state.py +571 -0
- ethereum/forks/paris/transactions.py +573 -0
- ethereum/forks/paris/trie.py +498 -0
- ethereum/forks/paris/utils/__init__.py +3 -0
- ethereum/forks/paris/utils/address.py +94 -0
- ethereum/forks/paris/utils/hexadecimal.py +55 -0
- ethereum/forks/paris/utils/message.py +90 -0
- ethereum/forks/paris/vm/__init__.py +174 -0
- ethereum/forks/paris/vm/exceptions.py +131 -0
- ethereum/forks/paris/vm/gas.py +245 -0
- ethereum/forks/paris/vm/instructions/__init__.py +353 -0
- ethereum/forks/paris/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/paris/vm/instructions/bitwise.py +245 -0
- ethereum/forks/paris/vm/instructions/block.py +261 -0
- ethereum/forks/paris/vm/instructions/comparison.py +177 -0
- ethereum/forks/paris/vm/instructions/control_flow.py +171 -0
- ethereum/forks/paris/vm/instructions/environment.py +544 -0
- ethereum/forks/paris/vm/instructions/keccak.py +63 -0
- ethereum/forks/paris/vm/instructions/log.py +88 -0
- ethereum/forks/paris/vm/instructions/memory.py +141 -0
- ethereum/forks/paris/vm/instructions/stack.py +204 -0
- ethereum/forks/paris/vm/instructions/storage.py +126 -0
- ethereum/forks/paris/vm/instructions/system.py +689 -0
- ethereum/forks/paris/vm/interpreter.py +298 -0
- ethereum/forks/paris/vm/memory.py +84 -0
- ethereum/forks/paris/vm/precompiled_contracts/__init__.py +37 -0
- ethereum/forks/paris/vm/precompiled_contracts/alt_bn128.py +230 -0
- ethereum/forks/paris/vm/precompiled_contracts/blake2f.py +42 -0
- ethereum/forks/paris/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/paris/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/paris/vm/precompiled_contracts/mapping.py +46 -0
- ethereum/forks/paris/vm/precompiled_contracts/modexp.py +166 -0
- ethereum/forks/paris/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/paris/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/paris/vm/runtime.py +69 -0
- ethereum/forks/paris/vm/stack.py +58 -0
- ethereum/forks/prague/__init__.py +54 -0
- ethereum/forks/prague/blocks.py +405 -0
- ethereum/forks/prague/bloom.py +87 -0
- ethereum/forks/prague/exceptions.py +115 -0
- ethereum/forks/prague/fork.py +1044 -0
- ethereum/forks/prague/fork_types.py +78 -0
- ethereum/forks/prague/requests.py +191 -0
- ethereum/forks/prague/state.py +667 -0
- ethereum/forks/prague/transactions.py +879 -0
- ethereum/forks/prague/trie.py +508 -0
- ethereum/forks/prague/utils/__init__.py +3 -0
- ethereum/forks/prague/utils/address.py +94 -0
- ethereum/forks/prague/utils/hexadecimal.py +55 -0
- ethereum/forks/prague/utils/message.py +90 -0
- ethereum/forks/prague/vm/__init__.py +191 -0
- ethereum/forks/prague/vm/eoa_delegation.py +211 -0
- ethereum/forks/prague/vm/exceptions.py +139 -0
- ethereum/forks/prague/vm/gas.py +379 -0
- ethereum/forks/prague/vm/instructions/__init__.py +365 -0
- ethereum/forks/prague/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/prague/vm/instructions/bitwise.py +245 -0
- ethereum/forks/prague/vm/instructions/block.py +261 -0
- ethereum/forks/prague/vm/instructions/comparison.py +177 -0
- ethereum/forks/prague/vm/instructions/control_flow.py +171 -0
- ethereum/forks/prague/vm/instructions/environment.py +600 -0
- ethereum/forks/prague/vm/instructions/keccak.py +63 -0
- ethereum/forks/prague/vm/instructions/log.py +88 -0
- ethereum/forks/prague/vm/instructions/memory.py +177 -0
- ethereum/forks/prague/vm/instructions/stack.py +208 -0
- ethereum/forks/prague/vm/instructions/storage.py +188 -0
- ethereum/forks/prague/vm/instructions/system.py +751 -0
- ethereum/forks/prague/vm/interpreter.py +324 -0
- ethereum/forks/prague/vm/memory.py +83 -0
- ethereum/forks/prague/vm/precompiled_contracts/__init__.py +53 -0
- ethereum/forks/prague/vm/precompiled_contracts/alt_bn128.py +230 -0
- ethereum/forks/prague/vm/precompiled_contracts/blake2f.py +42 -0
- ethereum/forks/prague/vm/precompiled_contracts/bls12_381/__init__.py +622 -0
- ethereum/forks/prague/vm/precompiled_contracts/bls12_381/bls12_381_g1.py +151 -0
- ethereum/forks/prague/vm/precompiled_contracts/bls12_381/bls12_381_g2.py +153 -0
- ethereum/forks/prague/vm/precompiled_contracts/bls12_381/bls12_381_pairing.py +69 -0
- ethereum/forks/prague/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/prague/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/prague/vm/precompiled_contracts/mapping.py +74 -0
- ethereum/forks/prague/vm/precompiled_contracts/modexp.py +166 -0
- ethereum/forks/prague/vm/precompiled_contracts/point_evaluation.py +72 -0
- ethereum/forks/prague/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/prague/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/prague/vm/runtime.py +69 -0
- ethereum/forks/prague/vm/stack.py +58 -0
- ethereum/forks/shanghai/__init__.py +47 -0
- ethereum/forks/shanghai/blocks.py +360 -0
- ethereum/forks/shanghai/bloom.py +87 -0
- ethereum/forks/shanghai/exceptions.py +64 -0
- ethereum/forks/shanghai/fork.py +686 -0
- ethereum/forks/shanghai/fork_types.py +62 -0
- ethereum/forks/shanghai/state.py +571 -0
- ethereum/forks/shanghai/transactions.py +585 -0
- ethereum/forks/shanghai/trie.py +508 -0
- ethereum/forks/shanghai/utils/__init__.py +3 -0
- ethereum/forks/shanghai/utils/address.py +94 -0
- ethereum/forks/shanghai/utils/hexadecimal.py +55 -0
- ethereum/forks/shanghai/utils/message.py +90 -0
- ethereum/forks/shanghai/vm/__init__.py +179 -0
- ethereum/forks/shanghai/vm/exceptions.py +131 -0
- ethereum/forks/shanghai/vm/gas.py +266 -0
- ethereum/forks/shanghai/vm/instructions/__init__.py +355 -0
- ethereum/forks/shanghai/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/shanghai/vm/instructions/bitwise.py +245 -0
- ethereum/forks/shanghai/vm/instructions/block.py +261 -0
- ethereum/forks/shanghai/vm/instructions/comparison.py +177 -0
- ethereum/forks/shanghai/vm/instructions/control_flow.py +171 -0
- ethereum/forks/shanghai/vm/instructions/environment.py +544 -0
- ethereum/forks/shanghai/vm/instructions/keccak.py +63 -0
- ethereum/forks/shanghai/vm/instructions/log.py +88 -0
- ethereum/forks/shanghai/vm/instructions/memory.py +141 -0
- ethereum/forks/shanghai/vm/instructions/stack.py +208 -0
- ethereum/forks/shanghai/vm/instructions/storage.py +126 -0
- ethereum/forks/shanghai/vm/instructions/system.py +709 -0
- ethereum/forks/shanghai/vm/interpreter.py +299 -0
- ethereum/forks/shanghai/vm/memory.py +84 -0
- ethereum/forks/shanghai/vm/precompiled_contracts/__init__.py +37 -0
- ethereum/forks/shanghai/vm/precompiled_contracts/alt_bn128.py +230 -0
- ethereum/forks/shanghai/vm/precompiled_contracts/blake2f.py +42 -0
- ethereum/forks/shanghai/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/shanghai/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/shanghai/vm/precompiled_contracts/mapping.py +46 -0
- ethereum/forks/shanghai/vm/precompiled_contracts/modexp.py +166 -0
- ethereum/forks/shanghai/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/shanghai/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/shanghai/vm/runtime.py +69 -0
- ethereum/forks/shanghai/vm/stack.py +58 -0
- ethereum/forks/spurious_dragon/__init__.py +38 -0
- ethereum/forks/spurious_dragon/blocks.py +265 -0
- ethereum/forks/spurious_dragon/bloom.py +87 -0
- ethereum/forks/spurious_dragon/fork.py +807 -0
- ethereum/forks/spurious_dragon/fork_types.py +62 -0
- ethereum/forks/spurious_dragon/state.py +583 -0
- ethereum/forks/spurious_dragon/transactions.py +261 -0
- ethereum/forks/spurious_dragon/trie.py +498 -0
- ethereum/forks/spurious_dragon/utils/__init__.py +3 -0
- ethereum/forks/spurious_dragon/utils/address.py +63 -0
- ethereum/forks/spurious_dragon/utils/hexadecimal.py +55 -0
- ethereum/forks/spurious_dragon/utils/message.py +79 -0
- ethereum/forks/spurious_dragon/vm/__init__.py +184 -0
- ethereum/forks/spurious_dragon/vm/exceptions.py +86 -0
- ethereum/forks/spurious_dragon/vm/gas.py +244 -0
- ethereum/forks/spurious_dragon/vm/instructions/__init__.py +329 -0
- ethereum/forks/spurious_dragon/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/spurious_dragon/vm/instructions/bitwise.py +153 -0
- ethereum/forks/spurious_dragon/vm/instructions/block.py +189 -0
- ethereum/forks/spurious_dragon/vm/instructions/comparison.py +177 -0
- ethereum/forks/spurious_dragon/vm/instructions/control_flow.py +171 -0
- ethereum/forks/spurious_dragon/vm/instructions/environment.py +376 -0
- ethereum/forks/spurious_dragon/vm/instructions/keccak.py +63 -0
- ethereum/forks/spurious_dragon/vm/instructions/log.py +85 -0
- ethereum/forks/spurious_dragon/vm/instructions/memory.py +141 -0
- ethereum/forks/spurious_dragon/vm/instructions/stack.py +204 -0
- ethereum/forks/spurious_dragon/vm/instructions/storage.py +87 -0
- ethereum/forks/spurious_dragon/vm/instructions/system.py +491 -0
- ethereum/forks/spurious_dragon/vm/interpreter.py +292 -0
- ethereum/forks/spurious_dragon/vm/memory.py +84 -0
- ethereum/forks/spurious_dragon/vm/precompiled_contracts/__init__.py +27 -0
- ethereum/forks/spurious_dragon/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/spurious_dragon/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/spurious_dragon/vm/precompiled_contracts/mapping.py +33 -0
- ethereum/forks/spurious_dragon/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/spurious_dragon/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/spurious_dragon/vm/runtime.py +69 -0
- ethereum/forks/spurious_dragon/vm/stack.py +58 -0
- ethereum/forks/tangerine_whistle/__init__.py +32 -0
- ethereum/forks/tangerine_whistle/blocks.py +265 -0
- ethereum/forks/tangerine_whistle/bloom.py +87 -0
- ethereum/forks/tangerine_whistle/fork.py +798 -0
- ethereum/forks/tangerine_whistle/fork_types.py +62 -0
- ethereum/forks/tangerine_whistle/state.py +515 -0
- ethereum/forks/tangerine_whistle/transactions.py +227 -0
- ethereum/forks/tangerine_whistle/trie.py +498 -0
- ethereum/forks/tangerine_whistle/utils/__init__.py +3 -0
- ethereum/forks/tangerine_whistle/utils/address.py +63 -0
- ethereum/forks/tangerine_whistle/utils/hexadecimal.py +55 -0
- ethereum/forks/tangerine_whistle/utils/message.py +79 -0
- ethereum/forks/tangerine_whistle/vm/__init__.py +163 -0
- ethereum/forks/tangerine_whistle/vm/exceptions.py +86 -0
- ethereum/forks/tangerine_whistle/vm/gas.py +244 -0
- ethereum/forks/tangerine_whistle/vm/instructions/__init__.py +329 -0
- ethereum/forks/tangerine_whistle/vm/instructions/arithmetic.py +373 -0
- ethereum/forks/tangerine_whistle/vm/instructions/bitwise.py +153 -0
- ethereum/forks/tangerine_whistle/vm/instructions/block.py +189 -0
- ethereum/forks/tangerine_whistle/vm/instructions/comparison.py +177 -0
- ethereum/forks/tangerine_whistle/vm/instructions/control_flow.py +171 -0
- ethereum/forks/tangerine_whistle/vm/instructions/environment.py +376 -0
- ethereum/forks/tangerine_whistle/vm/instructions/keccak.py +63 -0
- ethereum/forks/tangerine_whistle/vm/instructions/log.py +85 -0
- ethereum/forks/tangerine_whistle/vm/instructions/memory.py +141 -0
- ethereum/forks/tangerine_whistle/vm/instructions/stack.py +204 -0
- ethereum/forks/tangerine_whistle/vm/instructions/storage.py +87 -0
- ethereum/forks/tangerine_whistle/vm/instructions/system.py +480 -0
- ethereum/forks/tangerine_whistle/vm/interpreter.py +274 -0
- ethereum/forks/tangerine_whistle/vm/memory.py +84 -0
- ethereum/forks/tangerine_whistle/vm/precompiled_contracts/__init__.py +27 -0
- ethereum/forks/tangerine_whistle/vm/precompiled_contracts/ecrecover.py +64 -0
- ethereum/forks/tangerine_whistle/vm/precompiled_contracts/identity.py +39 -0
- ethereum/forks/tangerine_whistle/vm/precompiled_contracts/mapping.py +33 -0
- ethereum/forks/tangerine_whistle/vm/precompiled_contracts/ripemd160.py +44 -0
- ethereum/forks/tangerine_whistle/vm/precompiled_contracts/sha256.py +41 -0
- ethereum/forks/tangerine_whistle/vm/runtime.py +69 -0
- ethereum/forks/tangerine_whistle/vm/stack.py +58 -0
- ethereum/genesis.py +279 -0
- ethereum/py.typed +0 -0
- ethereum/trace.py +252 -0
- ethereum/utils/__init__.py +18 -0
- ethereum/utils/byte.py +59 -0
- ethereum/utils/hexadecimal.py +221 -0
- ethereum/utils/numeric.py +208 -0
- ethereum_execution-2.18.0rc6.dev2.dist-info/METADATA +113 -0
- ethereum_execution-2.18.0rc6.dev2.dist-info/RECORD +816 -0
- ethereum_execution-2.18.0rc6.dev2.dist-info/WHEEL +5 -0
- ethereum_execution-2.18.0rc6.dev2.dist-info/entry_points.txt +17 -0
- ethereum_execution-2.18.0rc6.dev2.dist-info/licenses/LICENSE.md +35 -0
- ethereum_execution-2.18.0rc6.dev2.dist-info/top_level.txt +3 -0
- ethereum_optimized/__init__.py +78 -0
- ethereum_optimized/fork.py +72 -0
- ethereum_optimized/state_db.py +444 -0
- ethereum_optimized/utils.py +26 -0
- ethereum_spec_tools/__init__.py +6 -0
- ethereum_spec_tools/docc.py +1135 -0
- ethereum_spec_tools/evm_tools/__init__.py +119 -0
- ethereum_spec_tools/evm_tools/__main__.py +7 -0
- ethereum_spec_tools/evm_tools/b11r/__init__.py +143 -0
- ethereum_spec_tools/evm_tools/b11r/b11r_types.py +173 -0
- ethereum_spec_tools/evm_tools/daemon.py +202 -0
- ethereum_spec_tools/evm_tools/loaders/__init__.py +3 -0
- ethereum_spec_tools/evm_tools/loaders/fixture_loader.py +190 -0
- ethereum_spec_tools/evm_tools/loaders/fork_loader.py +320 -0
- ethereum_spec_tools/evm_tools/loaders/transaction_loader.py +208 -0
- ethereum_spec_tools/evm_tools/statetest/__init__.py +291 -0
- ethereum_spec_tools/evm_tools/t8n/__init__.py +402 -0
- ethereum_spec_tools/evm_tools/t8n/env.py +320 -0
- ethereum_spec_tools/evm_tools/t8n/evm_trace/__init__.py +5 -0
- ethereum_spec_tools/evm_tools/t8n/evm_trace/count.py +47 -0
- ethereum_spec_tools/evm_tools/t8n/evm_trace/eip3155.py +333 -0
- ethereum_spec_tools/evm_tools/t8n/evm_trace/group.py +39 -0
- ethereum_spec_tools/evm_tools/t8n/evm_trace/protocols.py +54 -0
- ethereum_spec_tools/evm_tools/t8n/t8n_types.py +393 -0
- ethereum_spec_tools/evm_tools/utils.py +187 -0
- ethereum_spec_tools/forks.py +302 -0
- ethereum_spec_tools/lint/__init__.py +195 -0
- ethereum_spec_tools/lint/__main__.py +11 -0
- ethereum_spec_tools/lint/lints/glacier_forks_hygiene.py +273 -0
- ethereum_spec_tools/lint/lints/import_hygiene.py +145 -0
- ethereum_spec_tools/lint/lints/patch_hygiene.py +161 -0
- ethereum_spec_tools/new_fork/__init__.py +4 -0
- ethereum_spec_tools/new_fork/builder.py +430 -0
- ethereum_spec_tools/new_fork/cli.py +216 -0
- ethereum_spec_tools/new_fork/codemod/__init__.py +3 -0
- ethereum_spec_tools/new_fork/codemod/comment.py +79 -0
- ethereum_spec_tools/new_fork/codemod/constant.py +141 -0
- ethereum_spec_tools/new_fork/codemod/string.py +79 -0
- ethereum_spec_tools/patch_tool.py +78 -0
- ethereum_spec_tools/py.typed +0 -0
- ethereum_spec_tools/sync.py +1016 -0
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
"""
|
|
2
|
+
A `Block` is a single link in the chain that is Ethereum. Each `Block` contains
|
|
3
|
+
a `Header` and zero or more transactions. Each `Header` contains associated
|
|
4
|
+
metadata like the block number, parent block hash, and how much gas was
|
|
5
|
+
consumed by its transactions.
|
|
6
|
+
|
|
7
|
+
Together, these blocks form a cryptographically secure journal recording the
|
|
8
|
+
history of all state transitions that have happened since the genesis of the
|
|
9
|
+
chain.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from dataclasses import dataclass
|
|
13
|
+
from typing import Tuple
|
|
14
|
+
|
|
15
|
+
from ethereum_rlp import rlp
|
|
16
|
+
from ethereum_types.bytes import Bytes, Bytes8, Bytes32
|
|
17
|
+
from ethereum_types.frozen import slotted_freezable
|
|
18
|
+
from ethereum_types.numeric import U64, U256, Uint
|
|
19
|
+
|
|
20
|
+
from ethereum.crypto.hash import Hash32
|
|
21
|
+
|
|
22
|
+
from .fork_types import Address, Bloom, Root
|
|
23
|
+
from .transactions import (
|
|
24
|
+
AccessListTransaction,
|
|
25
|
+
BlobTransaction,
|
|
26
|
+
FeeMarketTransaction,
|
|
27
|
+
LegacyTransaction,
|
|
28
|
+
Transaction,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@slotted_freezable
|
|
33
|
+
@dataclass
|
|
34
|
+
class Withdrawal:
|
|
35
|
+
"""
|
|
36
|
+
Withdrawals represent a transfer of ETH from the consensus layer (beacon
|
|
37
|
+
chain) to the execution layer, as validated by the consensus layer. Each
|
|
38
|
+
withdrawal is listed in the block's list of withdrawals. See [`block`].
|
|
39
|
+
|
|
40
|
+
[`block`]: ref:ethereum.forks.cancun.blocks.Block.withdrawals
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
index: U64
|
|
44
|
+
"""
|
|
45
|
+
The unique index of the withdrawal, incremented for each withdrawal
|
|
46
|
+
processed.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
validator_index: U64
|
|
50
|
+
"""
|
|
51
|
+
The index of the validator on the consensus layer that is withdrawing.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
address: Address
|
|
55
|
+
"""
|
|
56
|
+
The execution-layer address receiving the withdrawn ETH.
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
amount: U256
|
|
60
|
+
"""
|
|
61
|
+
The amount of ETH being withdrawn.
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
@slotted_freezable
|
|
66
|
+
@dataclass
|
|
67
|
+
class Header:
|
|
68
|
+
"""
|
|
69
|
+
Header portion of a block on the chain, containing metadata and
|
|
70
|
+
cryptographic commitments to the block's contents.
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
parent_hash: Hash32
|
|
74
|
+
"""
|
|
75
|
+
Hash ([`keccak256`]) of the parent block's header, encoded with [RLP].
|
|
76
|
+
|
|
77
|
+
[`keccak256`]: ref:ethereum.crypto.hash.keccak256
|
|
78
|
+
[RLP]: https://ethereum.github.io/ethereum-rlp/src/ethereum_rlp/rlp.py.html
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
ommers_hash: Hash32
|
|
82
|
+
"""
|
|
83
|
+
Hash ([`keccak256`]) of the ommers (uncle blocks) in this block, encoded
|
|
84
|
+
with [RLP]. However, in post merge forks `ommers_hash` is always
|
|
85
|
+
[`EMPTY_OMMER_HASH`].
|
|
86
|
+
|
|
87
|
+
[`keccak256`]: ref:ethereum.crypto.hash.keccak256
|
|
88
|
+
[RLP]: https://ethereum.github.io/ethereum-rlp/src/ethereum_rlp/rlp.py.html
|
|
89
|
+
[`EMPTY_OMMER_HASH`]: ref:ethereum.forks.cancun.fork.EMPTY_OMMER_HASH
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
coinbase: Address
|
|
93
|
+
"""
|
|
94
|
+
Address of the miner (or validator) who mined this block.
|
|
95
|
+
|
|
96
|
+
The coinbase address receives the block reward and the priority fees (tips)
|
|
97
|
+
from included transactions. Base fees (introduced in [EIP-1559]) are burned
|
|
98
|
+
and do not go to the coinbase.
|
|
99
|
+
|
|
100
|
+
[EIP-1559]: https://eips.ethereum.org/EIPS/eip-1559
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
state_root: Root
|
|
104
|
+
"""
|
|
105
|
+
Root hash ([`keccak256`]) of the state trie after executing all
|
|
106
|
+
transactions in this block. It represents the state of the Ethereum Virtual
|
|
107
|
+
Machine (EVM) after all transactions in this block have been processed. It
|
|
108
|
+
is computed using the [`state_root()`] function, which computes the root
|
|
109
|
+
of the Merkle-Patricia [Trie] representing the Ethereum world state.
|
|
110
|
+
|
|
111
|
+
[`keccak256`]: ref:ethereum.crypto.hash.keccak256
|
|
112
|
+
[`state_root()`]: ref:ethereum.forks.cancun.state.state_root
|
|
113
|
+
[Trie]: ref:ethereum.forks.cancun.trie.Trie
|
|
114
|
+
"""
|
|
115
|
+
|
|
116
|
+
transactions_root: Root
|
|
117
|
+
"""
|
|
118
|
+
Root hash ([`keccak256`]) of the transactions trie, which contains all
|
|
119
|
+
transactions included in this block in their original order. It is computed
|
|
120
|
+
using the [`root()`] function over the Merkle-Patricia [trie] of
|
|
121
|
+
transactions as the parameter.
|
|
122
|
+
|
|
123
|
+
[`keccak256`]: ref:ethereum.crypto.hash.keccak256
|
|
124
|
+
[`root()`]: ref:ethereum.forks.cancun.trie.root
|
|
125
|
+
[Trie]: ref:ethereum.forks.cancun.trie.Trie
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
receipt_root: Root
|
|
129
|
+
"""
|
|
130
|
+
Root hash ([`keccak256`]) of the receipts trie, which contains all receipts
|
|
131
|
+
for transactions in this block. It is computed using the [`root()`]
|
|
132
|
+
function over the Merkle-Patricia [trie] constructed from the receipts.
|
|
133
|
+
|
|
134
|
+
[`keccak256`]: ref:ethereum.crypto.hash.keccak256
|
|
135
|
+
[`root()`]: ref:ethereum.forks.cancun.trie.root
|
|
136
|
+
[Trie]: ref:ethereum.forks.cancun.trie.Trie
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
bloom: Bloom
|
|
140
|
+
"""
|
|
141
|
+
Bloom filter for logs generated by transactions in this block.
|
|
142
|
+
Constructed from all logs in the block using the [logs bloom] mechanism.
|
|
143
|
+
|
|
144
|
+
[logs bloom]: ref:ethereum.forks.cancun.bloom.logs_bloom
|
|
145
|
+
"""
|
|
146
|
+
|
|
147
|
+
difficulty: Uint
|
|
148
|
+
"""
|
|
149
|
+
Difficulty of the block (pre-PoS), or a constant in PoS.
|
|
150
|
+
"""
|
|
151
|
+
|
|
152
|
+
number: Uint
|
|
153
|
+
"""
|
|
154
|
+
Block number, (height) in the chain.
|
|
155
|
+
"""
|
|
156
|
+
|
|
157
|
+
gas_limit: Uint
|
|
158
|
+
"""
|
|
159
|
+
Maximum gas allowed in this block. Pre [EIP-1559], this was the maximum
|
|
160
|
+
gas that could be consumed by all transactions in the block. Post
|
|
161
|
+
[EIP-1559], this is still the maximum gas limit, but the base fee per gas
|
|
162
|
+
is also considered when calculating the effective gas limit. This can be
|
|
163
|
+
[adjusted by a factor of 1/1024] from the previous block's gas limit, up
|
|
164
|
+
until a maximum of 30 million gas.
|
|
165
|
+
|
|
166
|
+
[EIP-1559]: https://eips.ethereum.org/EIPS/eip-1559
|
|
167
|
+
[adjusted by a factor of 1/1024]:
|
|
168
|
+
https://ethereum.org/en/developers/docs/blocks/
|
|
169
|
+
"""
|
|
170
|
+
|
|
171
|
+
gas_used: Uint
|
|
172
|
+
"""
|
|
173
|
+
Total gas used by all transactions in this block.
|
|
174
|
+
"""
|
|
175
|
+
|
|
176
|
+
timestamp: U256
|
|
177
|
+
"""
|
|
178
|
+
Timestamp of when the block was mined, in seconds since the unix epoch.
|
|
179
|
+
"""
|
|
180
|
+
|
|
181
|
+
extra_data: Bytes
|
|
182
|
+
"""
|
|
183
|
+
Arbitrary data included by the miner.
|
|
184
|
+
"""
|
|
185
|
+
|
|
186
|
+
prev_randao: Bytes32
|
|
187
|
+
"""
|
|
188
|
+
Output of the RANDAO beacon for random validator selection.
|
|
189
|
+
"""
|
|
190
|
+
|
|
191
|
+
nonce: Bytes8
|
|
192
|
+
"""
|
|
193
|
+
Nonce used in the mining process (pre-PoS), set to zero in PoS.
|
|
194
|
+
"""
|
|
195
|
+
|
|
196
|
+
base_fee_per_gas: Uint
|
|
197
|
+
"""
|
|
198
|
+
Base fee per gas for transactions in this block, introduced in
|
|
199
|
+
[EIP-1559]. This is the minimum fee per gas that must be paid for a
|
|
200
|
+
transaction to be included in this block.
|
|
201
|
+
|
|
202
|
+
[EIP-1559]: https://eips.ethereum.org/EIPS/eip-1559
|
|
203
|
+
"""
|
|
204
|
+
|
|
205
|
+
withdrawals_root: Root
|
|
206
|
+
"""
|
|
207
|
+
Root hash of the withdrawals trie, which contains all withdrawals in this
|
|
208
|
+
block.
|
|
209
|
+
"""
|
|
210
|
+
|
|
211
|
+
blob_gas_used: U64
|
|
212
|
+
"""
|
|
213
|
+
Total blob gas consumed by the transactions within this block. Introduced
|
|
214
|
+
in [EIP-4844].
|
|
215
|
+
|
|
216
|
+
[EIP-4844]: https://eips.ethereum.org/EIPS/eip-4844
|
|
217
|
+
"""
|
|
218
|
+
|
|
219
|
+
excess_blob_gas: U64
|
|
220
|
+
"""
|
|
221
|
+
Running total of blob gas consumed in excess of the target, prior to this
|
|
222
|
+
block. Blocks with above-target blob gas consumption increase this value,
|
|
223
|
+
while blocks with below-target blob gas consumption decrease it (to a
|
|
224
|
+
minimum of zero). Introduced in [EIP-4844].
|
|
225
|
+
|
|
226
|
+
[EIP-4844]: https://eips.ethereum.org/EIPS/eip-4844
|
|
227
|
+
"""
|
|
228
|
+
|
|
229
|
+
parent_beacon_block_root: Root
|
|
230
|
+
"""
|
|
231
|
+
Root hash of the corresponding beacon chain block.
|
|
232
|
+
"""
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
@slotted_freezable
|
|
236
|
+
@dataclass
|
|
237
|
+
class Block:
|
|
238
|
+
"""
|
|
239
|
+
A complete block on Ethereum, which is composed of a block [`header`],
|
|
240
|
+
a list of transactions, a list of ommers (deprecated), and a list of
|
|
241
|
+
validator [withdrawals].
|
|
242
|
+
|
|
243
|
+
The block [`header`] includes fields relevant to the Proof-of-Stake
|
|
244
|
+
consensus, with deprecated Proof-of-Work fields such as `difficulty`,
|
|
245
|
+
`nonce`, and `ommersHash` set to constants. The `coinbase` field
|
|
246
|
+
denotes the address receiving priority fees from the block.
|
|
247
|
+
|
|
248
|
+
The header also contains commitments to the current state (`stateRoot`),
|
|
249
|
+
the transactions (`transactionsRoot`), the transaction receipts
|
|
250
|
+
(`receiptsRoot`), and `withdrawalsRoot` committing to the validator
|
|
251
|
+
withdrawals included in this block. It also includes a bloom filter which
|
|
252
|
+
summarizes log data from the transactions.
|
|
253
|
+
|
|
254
|
+
Withdrawals represent ETH transfers from validators to their recipients,
|
|
255
|
+
introduced by the consensus layer. Ommers remain deprecated and empty.
|
|
256
|
+
|
|
257
|
+
[`header`]: ref:ethereum.forks.cancun.blocks.Header
|
|
258
|
+
[withdrawals]: ref:ethereum.forks.cancun.blocks.Withdrawal
|
|
259
|
+
"""
|
|
260
|
+
|
|
261
|
+
header: Header
|
|
262
|
+
"""
|
|
263
|
+
The block header containing metadata and cryptographic commitments. Refer
|
|
264
|
+
[headers] for more details on the fields included in the header.
|
|
265
|
+
|
|
266
|
+
[headers]: ref:ethereum.forks.cancun.blocks.Header
|
|
267
|
+
"""
|
|
268
|
+
|
|
269
|
+
transactions: Tuple[Bytes | LegacyTransaction, ...]
|
|
270
|
+
"""
|
|
271
|
+
A tuple of transactions included in this block. Each transaction can be
|
|
272
|
+
any of a legacy transaction, an access list transaction, a fee market
|
|
273
|
+
transaction, or a blob transaction.
|
|
274
|
+
"""
|
|
275
|
+
|
|
276
|
+
ommers: Tuple[Header, ...]
|
|
277
|
+
"""
|
|
278
|
+
A tuple of ommers (uncle blocks) included in this block. Always empty in
|
|
279
|
+
Proof-of-Stake forks.
|
|
280
|
+
"""
|
|
281
|
+
|
|
282
|
+
withdrawals: Tuple[Withdrawal, ...]
|
|
283
|
+
"""
|
|
284
|
+
A tuple of withdrawals processed in this block.
|
|
285
|
+
"""
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
@slotted_freezable
|
|
289
|
+
@dataclass
|
|
290
|
+
class Log:
|
|
291
|
+
"""
|
|
292
|
+
Data record produced during the execution of a transaction. Logs are used
|
|
293
|
+
by smart contracts to emit events (using the EVM log opcodes ([`LOG0`],
|
|
294
|
+
[`LOG1`], [`LOG2`], [`LOG3`] and [`LOG4`]), which can be efficiently
|
|
295
|
+
searched using the bloom filter in the block header.
|
|
296
|
+
|
|
297
|
+
[`LOG0`]: ref:ethereum.forks.cancun.vm.instructions.log.log0
|
|
298
|
+
[`LOG1`]: ref:ethereum.forks.cancun.vm.instructions.log.log1
|
|
299
|
+
[`LOG2`]: ref:ethereum.forks.cancun.vm.instructions.log.log2
|
|
300
|
+
[`LOG3`]: ref:ethereum.forks.cancun.vm.instructions.log.log3
|
|
301
|
+
[`LOG4`]: ref:ethereum.forks.cancun.vm.instructions.log.log4
|
|
302
|
+
"""
|
|
303
|
+
|
|
304
|
+
address: Address
|
|
305
|
+
"""
|
|
306
|
+
The address of the contract that emitted the log.
|
|
307
|
+
"""
|
|
308
|
+
|
|
309
|
+
topics: Tuple[Hash32, ...]
|
|
310
|
+
"""
|
|
311
|
+
A tuple of up to four topics associated with the log, used for filtering.
|
|
312
|
+
"""
|
|
313
|
+
|
|
314
|
+
data: Bytes
|
|
315
|
+
"""
|
|
316
|
+
The data payload of the log, which can contain any arbitrary data.
|
|
317
|
+
"""
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
@slotted_freezable
|
|
321
|
+
@dataclass
|
|
322
|
+
class Receipt:
|
|
323
|
+
"""
|
|
324
|
+
Result of a transaction execution. Receipts are included in the receipts
|
|
325
|
+
trie.
|
|
326
|
+
"""
|
|
327
|
+
|
|
328
|
+
succeeded: bool
|
|
329
|
+
"""
|
|
330
|
+
Whether the transaction execution was successful.
|
|
331
|
+
"""
|
|
332
|
+
|
|
333
|
+
cumulative_gas_used: Uint
|
|
334
|
+
"""
|
|
335
|
+
Total gas used in the block up to and including this transaction.
|
|
336
|
+
"""
|
|
337
|
+
|
|
338
|
+
bloom: Bloom
|
|
339
|
+
"""
|
|
340
|
+
Bloom filter for logs generated by this transaction. This is a 2048-byte
|
|
341
|
+
bit array that allows for efficient filtering of logs.
|
|
342
|
+
"""
|
|
343
|
+
|
|
344
|
+
logs: Tuple[Log, ...]
|
|
345
|
+
"""
|
|
346
|
+
A tuple of logs generated by this transaction. Each log contains the
|
|
347
|
+
address of the contract that emitted it, a tuple of topics, and the data
|
|
348
|
+
payload.
|
|
349
|
+
"""
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
def encode_receipt(tx: Transaction, receipt: Receipt) -> Bytes | Receipt:
|
|
353
|
+
r"""
|
|
354
|
+
Encodes a transaction receipt based on the transaction type.
|
|
355
|
+
|
|
356
|
+
The encoding follows the same format as transactions encoding, where:
|
|
357
|
+
- AccessListTransaction receipts are prefixed with `b"\x01"`.
|
|
358
|
+
- FeeMarketTransaction receipts are prefixed with `b"\x02"`.
|
|
359
|
+
- BlobTransaction receipts are prefixed with `b"\x03"`.
|
|
360
|
+
- LegacyTransaction receipts are returned as is.
|
|
361
|
+
"""
|
|
362
|
+
if isinstance(tx, AccessListTransaction):
|
|
363
|
+
return b"\x01" + rlp.encode(receipt)
|
|
364
|
+
elif isinstance(tx, FeeMarketTransaction):
|
|
365
|
+
return b"\x02" + rlp.encode(receipt)
|
|
366
|
+
elif isinstance(tx, BlobTransaction):
|
|
367
|
+
return b"\x03" + rlp.encode(receipt)
|
|
368
|
+
else:
|
|
369
|
+
return receipt
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
def decode_receipt(receipt: Bytes | Receipt) -> Receipt:
|
|
373
|
+
r"""
|
|
374
|
+
Decodes a receipt from its serialized form.
|
|
375
|
+
|
|
376
|
+
The decoding follows the same format as transactions decoding, where:
|
|
377
|
+
- Receipts prefixed with `b"\x01"` are decoded as AccessListTransaction
|
|
378
|
+
receipts.
|
|
379
|
+
- Receipts prefixed with `b"\x02"` are decoded as FeeMarketTransaction
|
|
380
|
+
receipts.
|
|
381
|
+
- Receipts prefixed with `b"\x03"` are decoded as BlobTransaction
|
|
382
|
+
receipts.
|
|
383
|
+
- LegacyTransaction receipts are returned as is.
|
|
384
|
+
"""
|
|
385
|
+
if isinstance(receipt, Bytes):
|
|
386
|
+
assert receipt[0] in (1, 2, 3)
|
|
387
|
+
return rlp.decode_to(Receipt, receipt[1:])
|
|
388
|
+
else:
|
|
389
|
+
return receipt
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Ethereum Logs Bloom.
|
|
3
|
+
|
|
4
|
+
.. contents:: Table of Contents
|
|
5
|
+
:backlinks: none
|
|
6
|
+
:local:
|
|
7
|
+
|
|
8
|
+
Introduction
|
|
9
|
+
------------
|
|
10
|
+
|
|
11
|
+
This modules defines functions for calculating bloom filters of logs. For the
|
|
12
|
+
general theory of bloom filters see e.g. `Wikipedia
|
|
13
|
+
<https://en.wikipedia.org/wiki/Bloom_filter>`_. Bloom filters are used to allow
|
|
14
|
+
for efficient searching of logs by address and/or topic, by rapidly
|
|
15
|
+
eliminating blocks and receipts from their search.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from typing import Tuple
|
|
19
|
+
|
|
20
|
+
from ethereum_types.bytes import Bytes
|
|
21
|
+
from ethereum_types.numeric import Uint
|
|
22
|
+
|
|
23
|
+
from ethereum.crypto.hash import keccak256
|
|
24
|
+
|
|
25
|
+
from .blocks import Log
|
|
26
|
+
from .fork_types import Bloom
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def add_to_bloom(bloom: bytearray, bloom_entry: Bytes) -> None:
|
|
30
|
+
"""
|
|
31
|
+
Add a bloom entry to the bloom filter (`bloom`).
|
|
32
|
+
|
|
33
|
+
The number of hash functions used is 3. They are calculated by taking the
|
|
34
|
+
least significant 11 bits from the first 3 16-bit words of the
|
|
35
|
+
`keccak_256()` hash of `bloom_entry`.
|
|
36
|
+
|
|
37
|
+
Parameters
|
|
38
|
+
----------
|
|
39
|
+
bloom :
|
|
40
|
+
The bloom filter.
|
|
41
|
+
bloom_entry :
|
|
42
|
+
An entry which is to be added to bloom filter.
|
|
43
|
+
|
|
44
|
+
"""
|
|
45
|
+
hashed = keccak256(bloom_entry)
|
|
46
|
+
|
|
47
|
+
for idx in (0, 2, 4):
|
|
48
|
+
# Obtain the least significant 11 bits from the pair of bytes
|
|
49
|
+
# (16 bits), and set this bit in bloom bytearray.
|
|
50
|
+
# The obtained bit is 0-indexed in the bloom filter from the least
|
|
51
|
+
# significant bit to the most significant bit.
|
|
52
|
+
bit_to_set = Uint.from_be_bytes(hashed[idx : idx + 2]) & Uint(0x07FF)
|
|
53
|
+
# Below is the index of the bit in the bytearray (where 0-indexed
|
|
54
|
+
# byte is the most significant byte)
|
|
55
|
+
bit_index = 0x07FF - int(bit_to_set)
|
|
56
|
+
|
|
57
|
+
byte_index = bit_index // 8
|
|
58
|
+
bit_value = 1 << (7 - (bit_index % 8))
|
|
59
|
+
bloom[byte_index] = bloom[byte_index] | bit_value
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def logs_bloom(logs: Tuple[Log, ...]) -> Bloom:
|
|
63
|
+
"""
|
|
64
|
+
Obtain the logs bloom from a list of log entries.
|
|
65
|
+
|
|
66
|
+
The address and each topic of a log are added to the bloom filter.
|
|
67
|
+
|
|
68
|
+
Parameters
|
|
69
|
+
----------
|
|
70
|
+
logs :
|
|
71
|
+
List of logs for which the logs bloom is to be obtained.
|
|
72
|
+
|
|
73
|
+
Returns
|
|
74
|
+
-------
|
|
75
|
+
logs_bloom : `Bloom`
|
|
76
|
+
The logs bloom obtained which is 256 bytes with some bits set as per
|
|
77
|
+
the caller address and the log topics.
|
|
78
|
+
|
|
79
|
+
"""
|
|
80
|
+
bloom: bytearray = bytearray(b"\x00" * 256)
|
|
81
|
+
|
|
82
|
+
for log in logs:
|
|
83
|
+
add_to_bloom(bloom, log.address)
|
|
84
|
+
for topic in log.topics:
|
|
85
|
+
add_to_bloom(bloom, topic)
|
|
86
|
+
|
|
87
|
+
return Bloom(bloom)
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Exceptions specific to this fork.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING, Final
|
|
6
|
+
|
|
7
|
+
from ethereum_types.numeric import Uint
|
|
8
|
+
|
|
9
|
+
from ethereum.exceptions import InvalidTransaction
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from .transactions import Transaction
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class TransactionTypeError(InvalidTransaction):
|
|
16
|
+
"""
|
|
17
|
+
Unknown [EIP-2718] transaction type byte.
|
|
18
|
+
|
|
19
|
+
[EIP-2718]: https://eips.ethereum.org/EIPS/eip-2718
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
transaction_type: Final[int]
|
|
23
|
+
"""
|
|
24
|
+
The type byte of the transaction that caused the error.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
def __init__(self, transaction_type: int):
|
|
28
|
+
super().__init__(f"unknown transaction type `{transaction_type}`")
|
|
29
|
+
self.transaction_type = transaction_type
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class TransactionTypeContractCreationError(InvalidTransaction):
|
|
33
|
+
"""
|
|
34
|
+
Contract creation is not allowed for a transaction type.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
transaction: "Transaction"
|
|
38
|
+
"""
|
|
39
|
+
The transaction that caused the error.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def __init__(self, transaction: "Transaction"):
|
|
43
|
+
super().__init__(
|
|
44
|
+
f"transaction type `{type(transaction).__name__}` not allowed to "
|
|
45
|
+
"create contracts"
|
|
46
|
+
)
|
|
47
|
+
self.transaction = transaction
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class BlobGasLimitExceededError(InvalidTransaction):
|
|
51
|
+
"""
|
|
52
|
+
The blob gas limit for the transaction exceeds the maximum allowed.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class InsufficientMaxFeePerBlobGasError(InvalidTransaction):
|
|
57
|
+
"""
|
|
58
|
+
The maximum fee per blob gas is insufficient for the transaction.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class InsufficientMaxFeePerGasError(InvalidTransaction):
|
|
63
|
+
"""
|
|
64
|
+
The maximum fee per gas is insufficient for the transaction.
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
transaction_max_fee_per_gas: Final[Uint]
|
|
68
|
+
"""
|
|
69
|
+
The maximum fee per gas specified in the transaction.
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
block_base_fee_per_gas: Final[Uint]
|
|
73
|
+
"""
|
|
74
|
+
The base fee per gas of the block in which the transaction is included.
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
def __init__(
|
|
78
|
+
self, transaction_max_fee_per_gas: Uint, block_base_fee_per_gas: Uint
|
|
79
|
+
):
|
|
80
|
+
super().__init__(
|
|
81
|
+
f"Insufficient max fee per gas "
|
|
82
|
+
f"({transaction_max_fee_per_gas} < {block_base_fee_per_gas})"
|
|
83
|
+
)
|
|
84
|
+
self.transaction_max_fee_per_gas = transaction_max_fee_per_gas
|
|
85
|
+
self.block_base_fee_per_gas = block_base_fee_per_gas
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class InvalidBlobVersionedHashError(InvalidTransaction):
|
|
89
|
+
"""
|
|
90
|
+
The versioned hash of the blob is invalid.
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class NoBlobDataError(InvalidTransaction):
|
|
95
|
+
"""
|
|
96
|
+
The transaction does not contain any blob data.
|
|
97
|
+
"""
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class PriorityFeeGreaterThanMaxFeeError(InvalidTransaction):
|
|
101
|
+
"""
|
|
102
|
+
The priority fee is greater than the maximum fee per gas.
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
class InitCodeTooLargeError(InvalidTransaction):
|
|
107
|
+
"""
|
|
108
|
+
The init code of the transaction is too large.
|
|
109
|
+
"""
|