-
Notifications
You must be signed in to change notification settings - Fork 13
core/state: add BalanceChangeReason to state db and state object #74
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
Merged
sonhv0212
merged 4 commits into
ronin-chain:evm-tracer-struct
from
sonhv0212:evm-tracer-balance-change-reason
May 14, 2025
Merged
core/state: add BalanceChangeReason to state db and state object #74
sonhv0212
merged 4 commits into
ronin-chain:evm-tracer-struct
from
sonhv0212:evm-tracer-balance-change-reason
May 14, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chiphamskymavis
approved these changes
May 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
chiphamskymavis
pushed a commit
that referenced
this pull request
Jul 1, 2025
* core/state: add BalanceChangeReason to state object * core/state: add BalanceChangeReason to StateDB.AddBalance * core/state: add BalanceChangeReason to StateDB.SubBalance * core/state: add BalanceChangeReason to StateDB.SetBalance
chiphamskymavis
pushed a commit
that referenced
this pull request
Jul 2, 2025
* core/state: add BalanceChangeReason to state object * core/state: add BalanceChangeReason to StateDB.AddBalance * core/state: add BalanceChangeReason to StateDB.SubBalance * core/state: add BalanceChangeReason to StateDB.SetBalance
sonhv0212
added a commit
that referenced
this pull request
Aug 11, 2025
* core/state: add BalanceChangeReason to state object * core/state: add BalanceChangeReason to StateDB.AddBalance * core/state: add BalanceChangeReason to StateDB.SubBalance * core/state: add BalanceChangeReason to StateDB.SetBalance
sonhv0212
added a commit
that referenced
this pull request
Aug 11, 2025
* core/state: add BalanceChangeReason to state object * core/state: add BalanceChangeReason to StateDB.AddBalance * core/state: add BalanceChangeReason to StateDB.SubBalance * core/state: add BalanceChangeReason to StateDB.SetBalance
trantienduchn
pushed a commit
that referenced
this pull request
Sep 3, 2025
* core/state: add BalanceChangeReason to state object * core/state: add BalanceChangeReason to StateDB.AddBalance * core/state: add BalanceChangeReason to StateDB.SubBalance * core/state: add BalanceChangeReason to StateDB.SetBalance
trantienduchn
pushed a commit
that referenced
this pull request
Sep 3, 2025
* core/state: add BalanceChangeReason to state object * core/state: add BalanceChangeReason to StateDB.AddBalance * core/state: add BalanceChangeReason to StateDB.SubBalance * core/state: add BalanceChangeReason to StateDB.SetBalance
trantienduchn
added a commit
that referenced
this pull request
Sep 3, 2025
* all: remove Message interface * core: renaming isFake to skipAccountChecks * all: expose message fields to remove getter func * simulate: call apply message for short * light: remove unused callmsg struct * core: refactor TransactionToMessage to use NewMessage constructor * ci: update job name in EVM tests * core: enhance TransactionToMessage to include ExpiredTime field * core: update NewMessage constructor to include SetCodeAuthorizations * core: rename TransactionToMessage function for clarity * core: update TransactionToMessage to utilize SetCodeAuthorizations * core/tracing: add hooks for live tracing of block processing and transaction execution * core: add VM new tracing support with new configuration options * core/state: add tracing hook to state db and state object (#73) * core/state: add tracing hook to state db * core/state: add tracing hook to state object * workflows: enable unit test * core/state: add BalanceChangeReason to state db and state object (#74) * core/state: add BalanceChangeReason to state object * core/state: add BalanceChangeReason to StateDB.AddBalance * core/state: add BalanceChangeReason to StateDB.SubBalance * core/state: add BalanceChangeReason to StateDB.SetBalance * core: state transition, processor, evm support live tracer (#75) * core/vm: add VMError * core/vm: use live tracer in EVMInterpreter.Run * core: add live tracer to applyTransaction * core: add live tracer to state transition flow * core/vm: run precompiled contract with live tracer * core/vm/runtime: add live tracer for runtime execution * core: blockchain supports live tracer (#77) * all: replace the older tracer by live tracer (#78) * core/vm: remove usages of older tracer from interpreter * core: remove usages of older tracer from state transition * core/vm: remove usages of older tracer from evm * core/vm: remove usages of older tracer from instructions * all: replace the older tracer by live tracer * eth/tracer/logger,internal/ethapi: update access list tracer * all: replace LiveTracer by Tracer * all: support calltracer2 * eth/tracer/internal/tracetest: fix test * core, tests: add missing usages of live tracer in blockchain and statetest (#83) * core: set logger for blockchain * tests: state test supports live tracer * eth/tracer/live: add supply live tracer (#84) * eth/tracer/live: add supply live tracer * eth/tracers: fix supply live tracer test * core: Close all tracers when stop blockchain * eth/tracers: fix supply live tracer test * core, eth/tracers: move chainconfig to tracers and some refactors (#86) * core, eth/tracers: move chainconfig to tracers * eth/tracer/live: add noop live tracer * core/tracers/live: rename supply to supplyTracer * cmd/utils, eth/tracers: set default tracer config to empty object * evm: remove EVMLogger interface (#91) * core: minor cleanup in stateDB and Call (#96) * core/vm/runtime: call OnTxStart before prepare state DB in Call * core/state: simplify state selfdestruct * core/vm: update gas usage to use Tracer instead of LiveTracer in EIP-7702 gas call variant * eth/tracers/internal/tracetest: disable KotaroBlock in pre-Cancun tests * core/vm/runtime: fix type error * core/tracing: extends tracing.Hooks with OnSystemCallStartV2 (#30786) This PR extends the Hooks interface with a new method, `OnSystemCallStartV2`, which takes `VMContext` as its parameter. Motivation By including `VMContext` as a parameter, the `OnSystemCallStartV2` hook achieves parity with the `OnTxStart` hook in terms of provided insights. This alignment simplifies the inner tracer logic, enabling consistent handling of state changes and internal calls within the same framework. --------- Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com> * core: capture on gas change when applying eip-7623 Ref PR: ethereum/go-ethereum#30946 * all: remove Message interface * core/state: add BalanceChangeReason to state db and state object (#74) * core/state: add BalanceChangeReason to state object * core/state: add BalanceChangeReason to StateDB.AddBalance * core/state: add BalanceChangeReason to StateDB.SubBalance * core/state: add BalanceChangeReason to StateDB.SetBalance * core: state transition, processor, evm support live tracer (#75) * core/vm: add VMError * core/vm: use live tracer in EVMInterpreter.Run * core: add live tracer to applyTransaction * core: add live tracer to state transition flow * core/vm: run precompiled contract with live tracer * core/vm/runtime: add live tracer for runtime execution * all: replace the older tracer by live tracer (#78) * core/vm: remove usages of older tracer from interpreter * core: remove usages of older tracer from state transition * core/vm: remove usages of older tracer from evm * core/vm: remove usages of older tracer from instructions * all: replace the older tracer by live tracer * eth/tracer/logger,internal/ethapi: update access list tracer * all: replace LiveTracer by Tracer * all: support calltracer2 * eth/tracer/internal/tracetest: fix test * internal/ethapi: eth_multicall (#27720) This is a successor PR to #25743. This PR is based on a new iteration of the spec: ethereum/execution-apis#484. `eth_multicall` takes in a list of blocks, each optionally overriding fields like number, timestamp, etc. of a base block. Each block can include calls. At each block users can override the state. There are extra features, such as: - Include ether transfers as part of the logs - Overriding precompile codes with evm bytecode - Redirecting accounts to another address This PR includes the following breaking changes: - Block override fields of eth_call and debug_traceCall have had the following fields renamed - `coinbase` -> `feeRecipient` - `random` -> `prevRandao` - `baseFee` -> `baseFeePerGas` --------- Co-authored-by: Gary Rong <garyrong0905@gmail.com> Co-authored-by: Martin Holst Swende <martin@swende.se> * core/vm: init precompile logic, update tests * core/vm: init precompile logic, update tests * gethclient: update block overwrite json * ethapi: move validation from ToMessage to CallDefault * ethapi: remove un-used fee logic * ci: try enable test report * internal/ethapi/api: for simulated calls, set gaspool to max value if global gascap is 0 (#30474) In #27720, we introduced RPC global gas cap. A value of `0` means an unlimited gas cap. However, this was not the case for simulated calls. This PR fixes the behaviour. * core/types: remove redundance hashes * ethapi: correct simulate blocktime to 3s * ethapi: add tests for simulate * genesis: support nil balance when init genesis * eth/api: remove err unmarshal block rpc * simulate: apply evm txcontext, fix state hook * internal/ethapi: fix simulate tests related to gas, base fee (#95) * internal/ethapi: fix simulate tests related to gas, base fee * ethapi: fix simulate validation tests * ethapi: pass nonce to message --------- Co-authored-by: chiphamskymavis <chi.pham@skymavis.com> * core: remove redundant receipt bloom * eth: lower blob basefee for gasestimator * eth, internal: remove err in transaction to msg func * core: remove receipt generator * simulate: skip system transactions during simulation when signTxFn is unavailable (#110) * ethapi: update gas used values in simulation tests for accuracy * ci: trigger build nightly for simulate * eth: Fix movePrecompileToAddress ignored on debug_traceCall (#114) * eth/tracers: set logger hooks for stateDB (#115) * eth/tracers: set logger hooks for stateDB * core/state: ensure logger is included in StateDB copy * cmd: add vm trace flags * eth: add tracer initialization * cmd: init live tracer * internal/ethapi: remove hard code timeout * ci: revert custom actions * ci: revert custom trigger condition * ethapi: remove duplicated code * consensus,ethapi: remove skip system tx when simulate, remove unused allLogs, changed from engine FinalizeAndAssemble to manual types.NewBlock * ci: trigger build nightly for simulate * internal/ethapi: process EIP-2935 in simulation * ci: revert build nightly * internal/ethapi: use skipChecks in applyMessage() * internal/ethapi: use vmConfig * eth/gasestimator: use gasLimit * internal/ethapi: fix test fails * internal/ethapi: resolve comments --------- Co-authored-by: sonhv0212 <son.ho@skymavis.com> Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com> Co-authored-by: Gary Rong <garyrong0905@gmail.com> Co-authored-by: Martin Holst Swende <martin@swende.se> Co-authored-by: jwasinger <j-wasinger@hotmail.com> Co-authored-by: Tran Tien Duc <trantienduchn@gmail.com> Co-authored-by: TuDo1403 <tudo.dev@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reference PRs: