-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to incrementally build a block #579
Comments
cc @gsalgado (just an FYI) |
link: ethereum/eth-tester#81 |
Trying to reason about this.... When doing a full block import we need to re-execute the block and verify that the final resulting block is identical to the input block. Optimization here includes skipping rebuilding the receipt and transaction tries. When incrementally building a block we need to execute the transaction and build the transaction and receipt tries. This seems like we should be able to fix this as follows by separating concerns to the appropriate level.
This isn't exactly right, but the idea is to move more of the block stuff up to the VM level so that |
I don't think this is an optimization, really, but maybe my understanding is not correct. More below... I'm not familiar with eth-tester APIs but if we keep the current block's transactions/receipts in memory, we should only need to generate the tx/receipt tries when finalizing the block, no? I mean, if the |
I think you're probably right. I think what we're really talking about here is shuffling around what state we store, where we store it, and what parts of the architecture are responsible for what |
What is wrong?
This PR added optimizations to the process of importing blocks #565
The underlying changes to
apply_transaction
are causing problems in eth-tester. Now, there is no way to leave the chain in a half state with some transactions applied to the HEAD block. This removes the ability to incrementally apply transactions to a block without digging into internals.How can it be fixed
Not sure but:
import_block
to delay building the transaction trie until the end of the block.apply_transaction
functionality did, executing the transaction and fully updating the pending block with the latest state.The text was updated successfully, but these errors were encountered: