- Add error returns to Database.Reader() and NodeIterator() methods
- Introduce committed flag to prevent usage of tries after commit
- Update callers to handle new error signatures
- Add MustNodeIterator() helper for backward compatibility
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Add defer cleanup for global variables and remove t.Parallel() where
global state is modified to prevent race conditions and test pollution.
Changes:
1. tests/vm_test.go:
- Add defer to restore common.TIPXDCXCancellationFee
- Remove t.Parallel() since modifying global variable makes concurrent
execution unsafe, even with defer cleanup
- Prevents potential race conditions with other tests in the package
2. contracts/tests/Inherited_test.go:
- Add defer to restore common.TIPXDCXCancellationFee
- No t.Parallel() present, so safe with defer alone
3. contracts/trc21issuer/trc21issuer_test.go:
- Add defer to restore common.TRC21IssuerSMC (was missing)
- Fix existing bug: restore correct variable common.TRC21GasPriceBefore
instead of common.TIPTRC21Fee
- Remove unused variables: token, delay
Rationale for removing t.Parallel():
While defer ensures cleanup after test completion, during test execution
the modified global variable is visible to all concurrent tests. Even
though tests/vm_test.go is currently the only test modifying
TIPXDCXCancellationFee, removing t.Parallel() is the safer approach to
ensure complete test isolation and prevent timing-dependent behavior.
This follows the same principles as the txpool MinGasPrice fix: global
variable modifications should not occur during concurrent test execution.
This PR introduces a node scheme abstraction. The interface is only implemented by `hashScheme` at the moment, but will be extended by `pathScheme` very soon.
Apart from that, a few changes are also included which is worth mentioning:
- port the changes in the stacktrie, tracking the path prefix of nodes during commit
- use ethdb.Database for constructing trie.Database. This is not necessary right now, but it is required for path-based used to open reverse diff freezer
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Here we add a Go API for running tracing plugins within the main block import process.
As an advanced user of geth, you can now create a Go file in eth/tracers/live/, and within
that file register your custom tracer implementation. Then recompile geth and select your tracer
on the command line. Hooks defined in the tracer will run whenever a block is processed.
The hook system is defined in package core/tracing. It uses a struct with callbacks, instead of
requiring an interface, for several reasons:
- We plan to keep this API stable long-term. The core/tracing hook API does not depend on
on deep geth internals.
- There are a lot of hooks, and tracers will only need some of them. Using a struct allows you
to implement only the hooks you want to actually use.
All existing tracers in eth/tracers/native have been rewritten to use the new hook system.
This change breaks compatibility with the vm.EVMLogger interface that we used to have.
If you are a user of vm.EVMLogger, please migrate to core/tracing, and sorry for breaking
your stuff. But we just couldn't have both the old and new tracing APIs coexist in the EVM.
---------
Co-authored-by: Sina M <1591639+s1na@users.noreply.github.com>
Co-authored-by: Matthieu Vachon <matthieu.o.vachon@gmail.com>
Co-authored-by: Delweng <delweng@gmail.com>
Co-authored-by: Martin HS <martin@swende.se>
---
**Description:**
- Replaced outdated GitHub wiki links with current, official
documentation URLs.
- Removed links that redirect or are no longer relevant.
- Ensured all references point to up-to-date and reliable sources.
---
Co-authored-by: Maxim Evtush <154841002+maximevtush@users.noreply.github.com>
Adds marshaling fuzzing for G1 and G2 to oss-fuzz.
Also aligns the behavior of the google library to that of gnark and
cloudflare, which only ever read the first 64 / 128 bytes of the input,
regardless of how long the input is
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
* core: change handling of dirty objects in state #15225
* core/state: fix bug in copy of copy State #16485
* core/state: fix ripemd-cornercase in Copy #16491