Skip to content

Commit 12cc993

Browse files
committed
Move forks into namespace package
1 parent e7e00a1 commit 12cc993

File tree

770 files changed

+1438
-1419
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

770 files changed

+1438
-1419
lines changed

pyproject.toml

Lines changed: 92 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -131,101 +131,101 @@ packages = [
131131
"ethereum_spec_tools.lint",
132132
"ethereum_spec_tools.lint.lints",
133133
"ethereum",
134-
"ethereum.frontier",
135-
"ethereum.frontier.utils",
136-
"ethereum.frontier.vm",
137-
"ethereum.frontier.vm.instructions",
138-
"ethereum.frontier.vm.precompiled_contracts",
134+
"ethereum.forks.frontier",
135+
"ethereum.forks.frontier.utils",
136+
"ethereum.forks.frontier.vm",
137+
"ethereum.forks.frontier.vm.instructions",
138+
"ethereum.forks.frontier.vm.precompiled_contracts",
139139
"ethereum.utils",
140140
"ethereum.crypto",
141141
"ethereum_optimized",
142-
"ethereum.homestead",
143-
"ethereum.homestead.utils",
144-
"ethereum.homestead.vm",
145-
"ethereum.homestead.vm.instructions",
146-
"ethereum.homestead.vm.precompiled_contracts",
147-
"ethereum.dao_fork",
148-
"ethereum.dao_fork.utils",
149-
"ethereum.dao_fork.vm",
150-
"ethereum.dao_fork.vm.instructions",
151-
"ethereum.dao_fork.vm.precompiled_contracts",
152-
"ethereum.tangerine_whistle",
153-
"ethereum.tangerine_whistle.utils",
154-
"ethereum.tangerine_whistle.vm",
155-
"ethereum.tangerine_whistle.vm.instructions",
156-
"ethereum.tangerine_whistle.vm.precompiled_contracts",
157-
"ethereum.spurious_dragon",
158-
"ethereum.spurious_dragon.utils",
159-
"ethereum.spurious_dragon.vm",
160-
"ethereum.spurious_dragon.vm.instructions",
161-
"ethereum.spurious_dragon.vm.precompiled_contracts",
162-
"ethereum.byzantium",
163-
"ethereum.byzantium.utils",
164-
"ethereum.byzantium.vm",
165-
"ethereum.byzantium.vm.instructions",
166-
"ethereum.byzantium.vm.precompiled_contracts",
167-
"ethereum.constantinople",
168-
"ethereum.constantinople.utils",
169-
"ethereum.constantinople.vm",
170-
"ethereum.constantinople.vm.instructions",
171-
"ethereum.constantinople.vm.precompiled_contracts",
172-
"ethereum.istanbul",
173-
"ethereum.istanbul.utils",
174-
"ethereum.istanbul.vm",
175-
"ethereum.istanbul.vm.instructions",
176-
"ethereum.istanbul.vm.precompiled_contracts",
177-
"ethereum.muir_glacier",
178-
"ethereum.muir_glacier.utils",
179-
"ethereum.muir_glacier.vm",
180-
"ethereum.muir_glacier.vm.instructions",
181-
"ethereum.muir_glacier.vm.precompiled_contracts",
182-
"ethereum.berlin",
183-
"ethereum.berlin.utils",
184-
"ethereum.berlin.vm",
185-
"ethereum.berlin.vm.instructions",
186-
"ethereum.berlin.vm.precompiled_contracts",
187-
"ethereum.london",
188-
"ethereum.london.utils",
189-
"ethereum.london.vm",
190-
"ethereum.london.vm.instructions",
191-
"ethereum.london.vm.precompiled_contracts",
192-
"ethereum.arrow_glacier",
193-
"ethereum.arrow_glacier.utils",
194-
"ethereum.arrow_glacier.vm",
195-
"ethereum.arrow_glacier.vm.instructions",
196-
"ethereum.arrow_glacier.vm.precompiled_contracts",
197-
"ethereum.gray_glacier",
198-
"ethereum.gray_glacier.utils",
199-
"ethereum.gray_glacier.vm",
200-
"ethereum.gray_glacier.vm.instructions",
201-
"ethereum.gray_glacier.vm.precompiled_contracts",
202-
"ethereum.paris",
203-
"ethereum.paris.utils",
204-
"ethereum.paris.vm",
205-
"ethereum.paris.vm.instructions",
206-
"ethereum.paris.vm.precompiled_contracts",
207-
"ethereum.shanghai",
208-
"ethereum.shanghai.utils",
209-
"ethereum.shanghai.vm",
210-
"ethereum.shanghai.vm.instructions",
211-
"ethereum.shanghai.vm.precompiled_contracts",
212-
"ethereum.cancun",
213-
"ethereum.cancun.utils",
214-
"ethereum.cancun.vm",
215-
"ethereum.cancun.vm.instructions",
216-
"ethereum.cancun.vm.precompiled_contracts",
217-
"ethereum.prague",
218-
"ethereum.prague.utils",
219-
"ethereum.prague.vm",
220-
"ethereum.prague.vm.instructions",
221-
"ethereum.prague.vm.precompiled_contracts",
222-
"ethereum.prague.vm.precompiled_contracts.bls12_381",
223-
"ethereum.osaka",
224-
"ethereum.osaka.utils",
225-
"ethereum.osaka.vm",
226-
"ethereum.osaka.vm.instructions",
227-
"ethereum.osaka.vm.precompiled_contracts",
228-
"ethereum.osaka.vm.precompiled_contracts.bls12_381",
142+
"ethereum.forks.homestead",
143+
"ethereum.forks.homestead.utils",
144+
"ethereum.forks.homestead.vm",
145+
"ethereum.forks.homestead.vm.instructions",
146+
"ethereum.forks.homestead.vm.precompiled_contracts",
147+
"ethereum.forks.dao_fork",
148+
"ethereum.forks.dao_fork.utils",
149+
"ethereum.forks.dao_fork.vm",
150+
"ethereum.forks.dao_fork.vm.instructions",
151+
"ethereum.forks.dao_fork.vm.precompiled_contracts",
152+
"ethereum.forks.tangerine_whistle",
153+
"ethereum.forks.tangerine_whistle.utils",
154+
"ethereum.forks.tangerine_whistle.vm",
155+
"ethereum.forks.tangerine_whistle.vm.instructions",
156+
"ethereum.forks.tangerine_whistle.vm.precompiled_contracts",
157+
"ethereum.forks.spurious_dragon",
158+
"ethereum.forks.spurious_dragon.utils",
159+
"ethereum.forks.spurious_dragon.vm",
160+
"ethereum.forks.spurious_dragon.vm.instructions",
161+
"ethereum.forks.spurious_dragon.vm.precompiled_contracts",
162+
"ethereum.forks.byzantium",
163+
"ethereum.forks.byzantium.utils",
164+
"ethereum.forks.byzantium.vm",
165+
"ethereum.forks.byzantium.vm.instructions",
166+
"ethereum.forks.byzantium.vm.precompiled_contracts",
167+
"ethereum.forks.constantinople",
168+
"ethereum.forks.constantinople.utils",
169+
"ethereum.forks.constantinople.vm",
170+
"ethereum.forks.constantinople.vm.instructions",
171+
"ethereum.forks.constantinople.vm.precompiled_contracts",
172+
"ethereum.forks.istanbul",
173+
"ethereum.forks.istanbul.utils",
174+
"ethereum.forks.istanbul.vm",
175+
"ethereum.forks.istanbul.vm.instructions",
176+
"ethereum.forks.istanbul.vm.precompiled_contracts",
177+
"ethereum.forks.muir_glacier",
178+
"ethereum.forks.muir_glacier.utils",
179+
"ethereum.forks.muir_glacier.vm",
180+
"ethereum.forks.muir_glacier.vm.instructions",
181+
"ethereum.forks.muir_glacier.vm.precompiled_contracts",
182+
"ethereum.forks.berlin",
183+
"ethereum.forks.berlin.utils",
184+
"ethereum.forks.berlin.vm",
185+
"ethereum.forks.berlin.vm.instructions",
186+
"ethereum.forks.berlin.vm.precompiled_contracts",
187+
"ethereum.forks.london",
188+
"ethereum.forks.london.utils",
189+
"ethereum.forks.london.vm",
190+
"ethereum.forks.london.vm.instructions",
191+
"ethereum.forks.london.vm.precompiled_contracts",
192+
"ethereum.forks.arrow_glacier",
193+
"ethereum.forks.arrow_glacier.utils",
194+
"ethereum.forks.arrow_glacier.vm",
195+
"ethereum.forks.arrow_glacier.vm.instructions",
196+
"ethereum.forks.arrow_glacier.vm.precompiled_contracts",
197+
"ethereum.forks.gray_glacier",
198+
"ethereum.forks.gray_glacier.utils",
199+
"ethereum.forks.gray_glacier.vm",
200+
"ethereum.forks.gray_glacier.vm.instructions",
201+
"ethereum.forks.gray_glacier.vm.precompiled_contracts",
202+
"ethereum.forks.paris",
203+
"ethereum.forks.paris.utils",
204+
"ethereum.forks.paris.vm",
205+
"ethereum.forks.paris.vm.instructions",
206+
"ethereum.forks.paris.vm.precompiled_contracts",
207+
"ethereum.forks.shanghai",
208+
"ethereum.forks.shanghai.utils",
209+
"ethereum.forks.shanghai.vm",
210+
"ethereum.forks.shanghai.vm.instructions",
211+
"ethereum.forks.shanghai.vm.precompiled_contracts",
212+
"ethereum.forks.cancun",
213+
"ethereum.forks.cancun.utils",
214+
"ethereum.forks.cancun.vm",
215+
"ethereum.forks.cancun.vm.instructions",
216+
"ethereum.forks.cancun.vm.precompiled_contracts",
217+
"ethereum.forks.prague",
218+
"ethereum.forks.prague.utils",
219+
"ethereum.forks.prague.vm",
220+
"ethereum.forks.prague.vm.instructions",
221+
"ethereum.forks.prague.vm.precompiled_contracts",
222+
"ethereum.forks.prague.vm.precompiled_contracts.bls12_381",
223+
"ethereum.forks.osaka",
224+
"ethereum.forks.osaka.utils",
225+
"ethereum.forks.osaka.vm",
226+
"ethereum.forks.osaka.vm.instructions",
227+
"ethereum.forks.osaka.vm.precompiled_contracts",
228+
"ethereum.forks.osaka.vm.precompiled_contracts.bls12_381",
229229
]
230230

231231
[tool.setuptools.package-data]
File renamed without changes.

src/ethereum/gray_glacier/blocks.py renamed to src/ethereum/forks/arrow_glacier/blocks.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ class Header:
7272
of the Merkle-Patricia [Trie] representing the Ethereum world state.
7373
7474
[`keccak256`]: ref:ethereum.crypto.hash.keccak256
75-
[`state_root()`]: ref:ethereum.gray_glacier.state.state_root
76-
[Trie]: ref:ethereum.gray_glacier.trie.Trie
75+
[`state_root()`]: ref:ethereum.forks.arrow_glacier.state.state_root
76+
[Trie]: ref:ethereum.forks.arrow_glacier.trie.Trie
7777
"""
7878

7979
transactions_root: Root
@@ -84,8 +84,8 @@ class Header:
8484
transactions as the parameter.
8585
8686
[`keccak256`]: ref:ethereum.crypto.hash.keccak256
87-
[`root()`]: ref:ethereum.gray_glacier.trie.root
88-
[Trie]: ref:ethereum.gray_glacier.trie.Trie
87+
[`root()`]: ref:ethereum.forks.arrow_glacier.trie.root
88+
[Trie]: ref:ethereum.forks.arrow_glacier.trie.Trie
8989
"""
9090

9191
receipt_root: Root
@@ -95,16 +95,16 @@ class Header:
9595
function over the Merkle-Patricia [trie] constructed from the receipts.
9696
9797
[`keccak256`]: ref:ethereum.crypto.hash.keccak256
98-
[`root()`]: ref:ethereum.gray_glacier.trie.root
99-
[Trie]: ref:ethereum.gray_glacier.trie.Trie
98+
[`root()`]: ref:ethereum.forks.arrow_glacier.trie.root
99+
[Trie]: ref:ethereum.forks.arrow_glacier.trie.Trie
100100
"""
101101

102102
bloom: Bloom
103103
"""
104104
Bloom filter for logs generated by transactions in this block.
105105
Constructed from all logs in the block using the [logs bloom] mechanism.
106106
107-
[logs bloom]: ref:ethereum.gray_glacier.bloom.logs_bloom
107+
[logs bloom]: ref:ethereum.forks.arrow_glacier.bloom.logs_bloom
108108
"""
109109

110110
difficulty: Uint
@@ -115,7 +115,7 @@ class Header:
115115
[`calculate_block_difficulty()`] function.
116116
117117
[`calculate_block_difficulty()`]:
118-
ref:ethereum.gray_glacier.fork.calculate_block_difficulty
118+
ref:ethereum.forks.arrow_glacier.fork.calculate_block_difficulty
119119
"""
120120

121121
number: Uint
@@ -155,19 +155,19 @@ class Header:
155155
mix_digest: Bytes32
156156
"""
157157
Mix hash used in the mining process, which is a cryptographic commitment
158-
to the block's contents. It [validates] that PoW was done on the correct
158+
to the block's contents. It [validates][u] that PoW was done on the correct
159159
block.
160160
161-
[validates]: ref:ethereum.gray_glacier.fork.validate_proof_of_work
161+
[u]: ref:ethereum.forks.arrow_glacier.fork.validate_proof_of_work
162162
"""
163163

164164
nonce: Bytes8
165165
"""
166166
Nonce used in the mining process, which is a value that miners
167-
increment to find a valid block hash. This is also used to [validate] the
168-
proof-of-work for this block.
167+
increment to find a valid block hash. This is also used to [validate][v]
168+
the proof-of-work for this block.
169169
170-
[validate]: ref:ethereum.gray_glacier.fork.validate_proof_of_work
170+
[v]: ref:ethereum.forks.arrow_glacier.fork.validate_proof_of_work
171171
"""
172172

173173
base_fee_per_gas: Uint
@@ -200,15 +200,15 @@ class Block:
200200
Ommers are used to provide rewards for near-valid mined blocks that didn't
201201
become part of the canonical chain.
202202
203-
[`header`]: ref:ethereum.gray_glacier.blocks.Header
203+
[`header`]: ref:ethereum.forks.arrow_glacier.blocks.Header
204204
"""
205205

206206
header: Header
207207
"""
208208
The block header containing metadata and cryptographic commitments. Refer
209209
[headers] for more details on the fields included in the header.
210210
211-
[headers]: ref:ethereum.gray_glacier.blocks.Header
211+
[headers]: ref:ethereum.forks.arrow_glacier.blocks.Header
212212
"""
213213

214214
transactions: Tuple[Bytes | LegacyTransaction, ...]
@@ -235,11 +235,11 @@ class Log:
235235
[`LOG1`], [`LOG2`], [`LOG3`] and [`LOG4`]), which can be efficiently
236236
searched using the bloom filter in the block header.
237237
238-
[`LOG0`]: ref:ethereum.gray_glacier.vm.instructions.log.log0
239-
[`LOG1`]: ref:ethereum.gray_glacier.vm.instructions.log.log1
240-
[`LOG2`]: ref:ethereum.gray_glacier.vm.instructions.log.log2
241-
[`LOG3`]: ref:ethereum.gray_glacier.vm.instructions.log.log3
242-
[`LOG4`]: ref:ethereum.gray_glacier.vm.instructions.log.log4
238+
[`LOG0`]: ref:ethereum.forks.arrow_glacier.vm.instructions.log.log0
239+
[`LOG1`]: ref:ethereum.forks.arrow_glacier.vm.instructions.log.log1
240+
[`LOG2`]: ref:ethereum.forks.arrow_glacier.vm.instructions.log.log2
241+
[`LOG3`]: ref:ethereum.forks.arrow_glacier.vm.instructions.log.log3
242+
[`LOG4`]: ref:ethereum.forks.arrow_glacier.vm.instructions.log.log4
243243
"""
244244

245245
address: Address
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/ethereum/arrow_glacier/trie.py renamed to src/ethereum/forks/arrow_glacier/trie.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
from ethereum_types.numeric import U256, Uint
3737

3838
from ethereum.crypto.hash import keccak256
39-
from ethereum.london import trie as previous_trie
39+
from ethereum.forks.london import trie as previous_trie
4040
from ethereum.utils.hexadecimal import hex_to_bytes
4141

4242
from .blocks import Receipt

0 commit comments

Comments
 (0)