question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to incrementally build a block

See original GitHub issue

What is wrong?

This PR added optimizations to the process of importing blocks https://github.com/ethereum/py-evm/pull/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:

  • Need a way for import_block to delay building the transaction trie until the end of the block.
  • Need a way to do what the previous apply_transaction functionality did, executing the transaction and fully updating the pending block with the latest state.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gsalgadocommented, Apr 20, 2018

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.

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 transaction_root and receipt_root are only needed to lookup the transactions/receipts from the DB, we shouldn’t need to generate them if the txs/receipts are available from somewhere else, but even if there’s a need for transaction_root and receipt_root to be exposed before a block is finalized, we could still calculate them on the fly when needed.

0reactions
pipermerriamcommented, Apr 20, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scaling Tool | Build a boat for treasure Wiki - Fandom
The scale tool can select material blocks by clicking on them with the tool equipped. Partial and Ability Blocks can not be scaled,...
Read more >
Accelerating player builds with an incremental build pipeline
The Build Program is a .NET program that takes, as input, all of the source and configuration files on disk and uses them...
Read more >
Principle #10 – Organize around value
This principle, Principle 10-Organizing around value, describes how applying this second operating system frees the enterprise to arrange itself ...
Read more >
Have You Tried: Create a Stretchable Dynamic Block
In this article, you'll create a window block that starts with a size of 36" wide x 72" ... Select Increment from the...
Read more >
Building Efficient Data Pipelines With Incremental Updates
A key feature of an efficient data pipeline is the ability to incrementally update. The alternative to incremental updates is to sync entire ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found