alpha touchup
This commit is contained in:
@@ -47,7 +47,7 @@ Mumbai = Blockchain(80001, 'Mumbai')
|
|||||||
BSC = Blockchain(56, 'BSC')
|
BSC = Blockchain(56, 'BSC')
|
||||||
Arbitrum = Blockchain(42161, 'Arbitrum', 3, batch_size=1000) # todo configure batch size... does it depend on log count? :(
|
Arbitrum = Blockchain(42161, 'Arbitrum', 3, batch_size=1000) # todo configure batch size... does it depend on log count? :(
|
||||||
Mock = Blockchain(31337, 'Mock', 3, batch_size=10000)
|
Mock = Blockchain(31337, 'Mock', 3, batch_size=10000)
|
||||||
Alpha = Blockchain(1337, 'Dexorder Alpha', 3, batch_size=10000)
|
Alpha = Blockchain(1337, 'Dexorder Alpha', 3, batch_size=100)
|
||||||
|
|
||||||
current_chain = ContextVar[Blockchain]('current_chain')
|
current_chain = ContextVar[Blockchain]('current_chain')
|
||||||
|
|
||||||
|
|||||||
@@ -71,12 +71,15 @@ class BlockStateRunner:
|
|||||||
|
|
||||||
async def run_ws(self):
|
async def run_ws(self):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
NOTE: This doc is old and not strictly true but still the basic idea
|
||||||
|
|
||||||
1. load root stateBlockchain
|
1. load root stateBlockchain
|
||||||
a. if no root, init from head
|
a. if no root, init from head
|
||||||
b. if root is old, batch forward by height
|
b. if root is old, batch forward by height
|
||||||
2. discover new heads
|
2. discover new heads
|
||||||
2b. find in-state parent block else use root
|
2b. find in-state parent block else use root
|
||||||
3. context = ancestor->head diff
|
3. fork = ancestor->head diff
|
||||||
4. query global log filter
|
4. query global log filter
|
||||||
5. process new vaults
|
5. process new vaults
|
||||||
6. process new orders and cancels
|
6. process new orders and cancels
|
||||||
|
|||||||
Reference in New Issue
Block a user