verkle: Implement Trie, NodeIterator and Database ifs
Fix crash in TestDump
Fix TestDump
Fix TrieCopy
remove unnecessary traces
fix: Error() returned errIteratorEnd in verkle node iterator
rewrite the iterator and change the signature of OpenStorageTrie
add the adapter to reuse the account trie for storage
don't try to deserialize a storage leaf into an account
Fix statedb unit tests (#14)
* debug code
* Fix more unit tests
* remove traces
* Go back to the full range
One tree to rule them all
remove updateRoot, there is no root to update
store code inside the account leaf
fix build
save current state for Sina
Update go-verkle to latest
Charge WITNESS_*_COST gas on storage loads
Add witness costs for SSTORE as well
Charge witness gas in the case of code execution
corresponding code deletion
add a --verkle flag to separate verkle experiments from regular geth operations
use the snapshot to get data
stateless execution from block witness
AccessWitness functions
Add block generation test + genesis snapshot generation
test stateless block execution (#18)
* test stateless block execution
* Force tree resolution before generating the proof
increased coverage in stateless test execution (#19)
* test stateless block execution
* Force tree resolution before generating the proof
* increase coverage in stateless test execution
ensure geth compiles
fix issues in tests with verkle trees deactivated
Ensure stateless data is available when executing statelessly (#20)
* Ensure stateless data is available when executing statelessly
* Actual execution of a statless block
* bugfixes in stateless block execution
* code cleanup
- Reduce PR footprint by reverting NewEVM to its original signature
- Move the access witness to the block context
- prepare for a change in AW semantics
Need to store the initial values.
- Use the touch helper function, DRY
* revert the signature of MustCommit to its original form (#21)
fix leaf proofs in stateless execution (#22)
* Fixes in witness pre-state
* Add the recipient's nonce to the witness
* reduce PR footprint and investigate issue in root state calculation
* quick build fix
cleanup: Remove extra parameter in ToBlock
revert ToBlock to its older signature
fix import cycle in vm tests
fix linter issue
fix appveyor build
fix nil pointers in tests
Add indices, yis and Cis to the block's Verkle proof
upgrade geth dependency to drop geth's common dep
fix cmd/devp2p tests
fix rebase issues
quell an appveyor warning
fix address touching in SLOAD and SSTORE
fix access witness for code size
touch target account data before calling
make sure the proper locations get touched in (ext)codecopy
touch all code pages in execution
add pushdata to witness
remove useless code in genesis snapshot generation
testnet: fix some of the rebase/drift issues
Fix verkle proof generation in block
fix an issue occuring when chunking past the code size
fix: ensure the code copy doesn't extend past the code size
* all: work for eth1/2 transtition
* consensus/beacon, eth: change beacon difficulty to 0
* eth: updates
* all: add terminalBlockDifficulty config, fix rebasing issues
* eth: implemented merge interop spec
* internal/ethapi: update to v1.0.0.alpha.2
This commit updates the code to the new spec, moving payloadId into
it's own object. It also fixes an issue with finalizing an empty blockhash.
It also properly sets the basefee
* all: sync polishes, other fixes + refactors
* core, eth: correct semantics for LeavePoW, EnterPoS
* core: fixed rebasing artifacts
* core: light: performance improvements
* core: use keyed field (f)
* core: eth: fix compilation issues + tests
* eth/catalyst: dbetter error codes
* all: move Merger to consensus/, remove reliance on it in bc
* all: renamed EnterPoS and LeavePoW to ReachTDD and FinalizePoS
* core: make mergelogs a function
* core: use InsertChain instead of InsertBlock
* les: drop merger from lightchain object
* consensus: add merger
* core: recoverAncestors in catalyst mode
* core: fix nitpick
* all: removed merger from beacon, use TTD, nitpicks
* consensus: eth: add docstring, removed unnecessary code duplication
* consensus/beacon: better comment
* all: easy to fix nitpicks by karalabe
* consensus/beacon: verify known headers to be sure
* core: comments
* core: eth: don't drop peers who advertise blocks, nitpicks
* core: never add beacon blocks to the future queue
* core: fixed nitpicks
* consensus/beacon: simplify IsTTDReached check
* consensus/beacon: correct IsTTDReached check
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
* all: mv loggers to eth/tracers
* core/vm: minor
* eth/tracers: tmp comment out testStoreCapture
* eth/tracers: uncomment and fix logger test
* eth/tracers: simplify test
* core/vm: re-add license
* core/vm: minor
* rename LogConfig to Config
Some benchmarks in eth/filters were not good: they weren't reproducible, relying on geth chaindata to be present.
Another one was rejected because the receipt was lacking a backing transcation.
The p2p simulation benchmark had a lot of the warnings below, due to the framework calling both
Stop() and Close(). Apparently, the simulated adapter is the only implementation which has a Close(),
and there is no need to call both Stop and Close on it.
This doesn't fix all go-critic warnings, just the most serious ones.
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
* eth,rpc: allow for flag configured timeouts for eth_call
* lint: account for package-local import order
* cr: rename `rpc.calltimeout` to `rpc.evmtimeout`
This removes some code:
- The clique engine calculated the snapshot twice when verifying headers/blocks.
- The method GetBlockHashesFromHash in Header/Block/Lightchain was only used by tests. It
is now removed from the API.
- The method GetTdByHash internally looked up the number before calling GetTd(hash, num).
In many cases, callers already had the number, and used this method just because it has a
shorter name. I have removed the method to make the API surface smaller.
This fixes a data race on worker.current by moving the call to StopPrefetcher
into the main loop.
The commit also contains fixes for two other races in unit tests of unrelated packages.
Fixes#23681
After the fix I get the address 0x6d6d02e83c4ced98204e20126acf27e9d87b8af2 for the
tx mentioned in the ticket, which agrees with etherscan.
The test did not synchronize with per-case goroutines, and thus didn't notice
that some tests were just hanging. This change adds missing synchronization
and fixes the broken tests.
This PR fixes an issue in traceChain, where the statedb Commit operation was performed asynchronously with dereference-operations agains the underlying trie.Database instance. Due to how the reference counting works within the trie database (where parent count is recursively updated when new parents are added), doing dereferencing in the middle of Commit can cause the refcount to become wrong, leading to an inconsistent state.
This was fixed by doing Commit/Deref from the same routine.
* core/types: rm extranous check in test
* core/rawdb: add lightweight types for block logs
* core/rawdb,eth: use lightweight accessor for log filtering
* core/rawdb: add bench for decoding into rlpLogs
This PR implements a new debug method, which I've talked briefly about to some other client developers. It allows the caller to obtain the intermediate state roots for a block (which might be either a canon block or a 'bad' block).
This change introduces 2 new optional methods; `enter()` and `exit()` for js tracers, and makes `step()` optiona. The two new methods are invoked when entering and exiting a call frame (but not invoked for the outermost scope, which has it's own methods). Currently these are the data fields passed to each of them:
enter: type (opcode), from, to, input, gas, value
exit: output, gasUsed, error
The PR also comes with a re-write of the callTracer. As a backup we keep the previous tracing script under the name `callTracerLegacy`. Behaviour of both tracers are equivalent for the most part, although there are some small differences (improvements), where the new tracer is more correct / has more information.