From e244d0ed096eb1dce7480a9942f7712ad14ebf64 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 16 Sep 2024 13:59:19 +0200 Subject: [PATCH 1/3] core/tracing: add verkle gas change reasons to changelog --- core/tracing/CHANGELOG.md | 12 +++++++++++- core/tracing/hooks.go | 8 ++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/core/tracing/CHANGELOG.md b/core/tracing/CHANGELOG.md index cddc728fc0f1..70076a8adf2d 100644 --- a/core/tracing/CHANGELOG.md +++ b/core/tracing/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to the tracing interface will be documented in this file. +## [Unreleased] + +### Modified types + +- `GasChangeReason` has been extended with the following reasons which will be enabled only post-Verkle. There shouldn't be any gas changes with those reasons prior to the fork. + - `GasChangeWitnessContractInit` flags the event of adding to the witness during the contract creation initialization step. + - `GasChangeWitnessContractCreation` flags the event of adding to the witness during the contract creation finalization step. + - `GasChangeWitnessCodeChunk` flags the event of adding one or more contract code chunks to the witness. + - `GasChangeWitnessContractCollisionCheck` flags the event of adding to the witness when checking for contract address collision. + ## [v1.14.3] There have been minor backwards-compatible changes to the tracing interface to explicitly mark the execution of **system** contracts. As of now the only system call updates the parent beacon block root as per [EIP-4788](https://eips.ethereum.org/EIPS/eip-4788). Other system calls are being considered for the future hardfork. @@ -75,6 +85,6 @@ The hooks `CaptureStart` and `CaptureEnd` have been removed. These hooks signale - `CaptureState` -> `OnOpcode(pc uint64, op byte, gas, cost uint64, scope tracing.OpContext, rData []byte, depth int, err error)`. `op` is of type `byte` which can be cast to `vm.OpCode` when necessary. A `*vm.ScopeContext` is not passed anymore. It is replaced by `tracing.OpContext` which offers access to the memory, stack and current contract. - `CaptureFault` -> `OnFault(pc uint64, op byte, gas, cost uint64, scope tracing.OpContext, depth int, err error)`. Similar to above. -[unreleased]: https://github.com/ethereum/go-ethereum/compare/v1.14.0...master +[unreleased]: https://github.com/ethereum/go-ethereum/compare/v1.14.8...master [v1.14.0]: https://github.com/ethereum/go-ethereum/releases/tag/v1.14.0 [v1.14.3]: https://github.com/ethereum/go-ethereum/releases/tag/v1.14.3 diff --git a/core/tracing/hooks.go b/core/tracing/hooks.go index d3c86485483b..d0b1d36deb43 100644 --- a/core/tracing/hooks.go +++ b/core/tracing/hooks.go @@ -300,13 +300,13 @@ const ( GasChangeCallStorageColdAccess GasChangeReason = 13 // GasChangeCallFailedExecution is the burning of the remaining gas when the execution failed without a revert. GasChangeCallFailedExecution GasChangeReason = 14 - // GasChangeWitnessContractInit flags the event of of adding to the witness during the contract creation initialization step + // GasChangeWitnessContractInit flags the event of of adding to the witness during the contract creation initialization step. GasChangeWitnessContractInit GasChangeReason = 15 - // GasChangeWitnessContractCreation flags the event of adding to the witness during the contract creation finalization step + // GasChangeWitnessContractCreation flags the event of adding to the witness during the contract creation finalization step. GasChangeWitnessContractCreation GasChangeReason = 16 - // GasChangeWitnessCodeChunk flags the event of adding one or more contract code chunks to the witness + // GasChangeWitnessCodeChunk flags the event of adding one or more contract code chunks to the witness. GasChangeWitnessCodeChunk GasChangeReason = 17 - // GasChangeWitnessContractCollisionCheck flags the event of adding to the witness when checking for contract address collision + // GasChangeWitnessContractCollisionCheck flags the event of adding to the witness when checking for contract address collision. GasChangeWitnessContractCollisionCheck GasChangeReason = 18 // GasChangeIgnored is a special value that can be used to indicate that the gas change should be ignored as From 1fff45de3bc3bd7ce2e9abb5830ba9d88c220c26 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 16 Sep 2024 14:05:47 +0200 Subject: [PATCH 2/3] fix already released changes --- core/tracing/CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/tracing/CHANGELOG.md b/core/tracing/CHANGELOG.md index 70076a8adf2d..6ca319d92c16 100644 --- a/core/tracing/CHANGELOG.md +++ b/core/tracing/CHANGELOG.md @@ -7,10 +7,18 @@ All notable changes to the tracing interface will be documented in this file. ### Modified types - `GasChangeReason` has been extended with the following reasons which will be enabled only post-Verkle. There shouldn't be any gas changes with those reasons prior to the fork. + - `GasChangeWitnessContractCollisionCheck` flags the event of adding to the witness when checking for contract address collision. + +## [v1.14.4] + +This release contained only minor extensions to the tracing interface. + +### Modified types + +- `GasChangeReason` has been extended with the following reasons will be active only post-Verkle. - `GasChangeWitnessContractInit` flags the event of adding to the witness during the contract creation initialization step. - `GasChangeWitnessContractCreation` flags the event of adding to the witness during the contract creation finalization step. - `GasChangeWitnessCodeChunk` flags the event of adding one or more contract code chunks to the witness. - - `GasChangeWitnessContractCollisionCheck` flags the event of adding to the witness when checking for contract address collision. ## [v1.14.3] @@ -88,3 +96,4 @@ The hooks `CaptureStart` and `CaptureEnd` have been removed. These hooks signale [unreleased]: https://github.com/ethereum/go-ethereum/compare/v1.14.8...master [v1.14.0]: https://github.com/ethereum/go-ethereum/releases/tag/v1.14.0 [v1.14.3]: https://github.com/ethereum/go-ethereum/releases/tag/v1.14.3 +[v1.14.4]: https://github.com/ethereum/go-ethereum/releases/tag/v1.14.4 From d9d59bbe2e61b961fe0a384c4a617137a292c961 Mon Sep 17 00:00:00 2001 From: Sina M <1591639+s1na@users.noreply.github.com> Date: Tue, 17 Sep 2024 14:52:52 +0200 Subject: [PATCH 3/3] Update core/tracing/CHANGELOG.md Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com> --- core/tracing/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tracing/CHANGELOG.md b/core/tracing/CHANGELOG.md index 6ca319d92c16..e8aa3a9e2ebe 100644 --- a/core/tracing/CHANGELOG.md +++ b/core/tracing/CHANGELOG.md @@ -15,7 +15,7 @@ This release contained only minor extensions to the tracing interface. ### Modified types -- `GasChangeReason` has been extended with the following reasons will be active only post-Verkle. +- `GasChangeReason` has been extended with the following reasons that will only be active post-Verkle. - `GasChangeWitnessContractInit` flags the event of adding to the witness during the contract creation initialization step. - `GasChangeWitnessContractCreation` flags the event of adding to the witness during the contract creation finalization step. - `GasChangeWitnessCodeChunk` flags the event of adding one or more contract code chunks to the witness.