diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000000..4cc7ee80b5 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,154 @@ +name: Build, push and release (if tag) + +on: + push: + tags: + - "*-v*" + branches: + - "firehose-fh3.0" + - "release/*" + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build: + strategy: + matrix: + include: + - platform: linux/amd64 + platform_suffix: amd64 + runner: ubuntu-22.04 + + - platform: linux/arm64 + platform_suffix: arm64 + runner: ubuntu-22.04-arm + + runs-on: [ "${{ matrix.runner }}" ] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate docker tags/labels from github build context + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=tag,prefix= + type=sha,prefix= + type=sha,prefix=,suffix=-${{ matrix.platform_suffix }} + type=edge,branch=firehose-fh3.0,priority=1 + type=edge,branch=release/*,priority=1 + flavor: | + latest=${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'beta') && !contains(github.ref, 'rc') }} + prefix=geth-,onlatest=true + + - name: Extract version + id: extract-version + run: | + version="edge" + if [[ "${GITHUB_REF}" == refs/tags/* ]]; then + version=${GITHUB_REF#refs/tags/} + fi + + echo "VERSION=${version} (Commit ${GITHUB_SHA::7}, Commit Date $(git show -s --format=%cI))" >> "$GITHUB_OUTPUT" + + - name: Build and push Docker image (${{ matrix.platform }}) + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + platforms: ${{ matrix.platform }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + provenance: false + build-args: | + BUILDNUM="" + COMMIT=${{ github.sha }} + VERSION=${{ steps.extract-version.outputs.VERSION }} + + push: + needs: build + runs-on: ubuntu-22.04 + + permissions: + contents: read + packages: write + + steps: + - name: Docker login + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate docker tags/labels from github build context + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=tag,prefix= + type=sha,prefix= + type=edge,branch=firehose-fh3.0,priority=1 + type=edge,branch=release/*,priority=1 + flavor: | + latest=${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'beta') && !contains(github.ref, 'rc') }} + prefix=geth-,onlatest=true + sep-tags: "," + + - name: Extract image + id: image + run: | + echo "ID=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" + + - name: Create and push manifest images + uses: Noelware/docker-manifest-action@0.4.3 + with: + inputs: "${{ steps.meta.outputs.tags }}" + images: "${{ steps.image.outputs.ID }}-amd64, ${{ steps.image.outputs.ID }}-arm64" + push: true + + release: + if: startsWith(github.ref, 'refs/tags/') + needs: build + runs-on: ubuntu-22.04 + + permissions: + contents: write + + steps: + - name: Extract image + id: image + run: | + echo "ID=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" + + - name: Extract assets + if: startsWith(github.ref, 'refs/tags/') + run: | + # The --platform are not really needed here, but it removes the warning + docker cp $(docker create --platform=linux/amd64 ${{ steps.image.outputs.ID }}-amd64):/usr/local/bin/geth ./geth_linux + docker cp $(docker create --platform=linux/arm64 ${{ steps.image.outputs.ID }}-arm64):/usr/local/bin/geth ./geth_linux_arm64 + + - name: Release + uses: softprops/action-gh-release@v2 + with: + prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }} + files: | + ./geth_linux + ./geth_linux_arm64 diff --git a/README.fh.md b/README.fh.md new file mode 100644 index 0000000000..20305cfecd --- /dev/null +++ b/README.fh.md @@ -0,0 +1,166 @@ +## StreamingFast Firehose Fork of `Ethereum` (`geth` client) + +This is our Firehose instrumented fork of [ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) repository. In this README, you will find instructions about how to work with this repository. + +### Protocols + +The Firehose instrumentation have a protocol version for the messages exchanges with Firehose on Ethereum binary (`fireeth`). The +protocols we currently develop are: + +- Protocol `fh2.4` using the `firehose-fh2.4` branch and `fh2.4` tag(s) suffix +- Protocol `fh3.0` using the `firehose-fh3.0` branch and `fh3.0` tag(s) suffix + +Read [Branches & Workflow](#branches-&-workflow) section for more details about how we handle branching model and versions. + +### Initialization + +The tooling and other instructions expect the following project +structure, it's easier to work with the Firehose fork when you use +the same names and settings. + +``` +cd ~/work +git clone --branch="firehose-fh3.0" git@github.com:streamingfast/go-ethereum.git +cd go-ethereum + +git remote rename origin sf + +git checkout firehose-fh3.0 + +git remote add origin https://github.com/ethereum/go-ethereum.git +git remote add polygon https://github.com/maticnetwork/bor.git +git remote add bnb https://github.com/binance-chain/bsc.git +# Add other remotes as needed + +git fetch origin +git fetch polygon +git fetch bnb +# Fetch other remotes as needed + +git checkout release/geth-1.x-fh3.0 +git checkout release/bnb-1.x-fh3.0 +git checkout release/polygon-1.x-fh2.4 +``` + +##### Assumptions + +For the best result when working with this repository and the scripts it contains: + +- The remote `sf` exists on main module and points to `git@github.com:streamingfast/go-ethereum.git` +- The remote `origin` exists on main module and points to https://github.com/ethereum/go-ethereum.git + +### Branches & Workflow + +Dealing with a big repository like Ethereum that have multiple versions for which we need +to track multiple forks (`Matic`, `BSC`) pose a branch management challenges. + +Even more that we have our own set of patches to enable deep data extraction +for Firehose consumption. + +We use merging of the branches into one another to make that work manageable. +The first and foremost important rule is that we always put new development +in the `firehose-fh3.0` branch. + +This branch must always be tracking the lowest supported version of all. Indeed, +this is our "work" branch for our patches, **new development must go there**. If you +perform our work with newer code, the problem that will arise is that this new +firehose work will not be mergeable into forks or older release that we still +support! + +The lowest supported Geth version today is `1.15.0`. + +We then create `release/` branch that tracks the version of interest +for us, versions that we will manages and deploy. + +Currently supported forks & version and the release branch + +- `firehose-fh3.0` - Default branch with all Firehose commits in it, based on Geth `1.15.0`. +- [release/geth-1.x-fh3.0](https://github.com/streamingfast/go-ethereum/tree/release/geth-1.x-fh3.0) - Ethereum Geth, latest update for this branch is `1.15.3` ([https://github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum)). +- [release/polygon-1.x-fh2.4](https://github.com/streamingfast/go-ethereum/tree/release/polygon-1.x-fh2.4) - Polygon fork (a.k.a Matic), based on Geth `1.13.5`, latest update for this branch is `v1.3.0` ([https://github.com/maticnetwork/bor](https://github.com/maticnetwork/bor)). +- [release/bnb-1.x-fh3.0](https://github.com/streamingfast/go-ethereum/tree/release/bsc-1.x-fh2.5) - BSC fork (Binance), based on Geth `1.15.2`, latest update for this branch is `v1.5.6` ([https://github.com/binance-chain/bsc](https://github.com/binance-chain/bsc)). + +> **Note** To find on which Geth version a particular fork is, you can do `git merge-base sf/release/geth-1.x-fh3.0 origin/master` where `origin/master` is the `master` branch of the original Geth repository (https://github.com/ethereum/go-ethereum). + +#### Making New Firehose Changes + +Making new changes should be performed on the `firehose-fh3.0` branch. When happy +with the changes, simply merge the `firehose-fh3.0` branch in all the release branches we track +and support. + + git checkout firehose-fh3.0 + git pull -p + + # Perform necessary changes, tests and commit(s) + + git checkout release/geth-1.x-fh3.0 + git pull -p + git merge firehose-fh3.0 + + git checkout release/polygon-1.x-fh2.4 + git pull -p + git merge firehose-fh2.4 + + git checkout release/bnb-1.x-fh3.0 + git pull -p + git merge firehose-fh3.0 + + git push sf firehose-fh3.0 release/geth-1.x-fh3.0 release/polygon-1.x-fh3.0 release/bnb-1.x-fh3.0 + +### Update to New Upstream Version + +We assume you are in the top directory of the repository when performing the following +operations. Here, we outline the rough idea. Extra details and command lines to use +will be completed later if missing. + +We are using `v1.15.2` as the example release tag that we want to update to, assuming +`v1.15.1` was the previous latest merged tag. Change +those with your own values. + +First step is to checkout the release branch of the series you are currently +updating to: + + git checkout release/geth-1.x-fh3.0 + git pull -p + +You first fetch the origin repository new data from Git: + + git fetch origin -p + +Then apply the update + + git merge v1.15.2 + +Solve conflicts if any. Once all conflicts have been resolved, commit then +create a tag with release + + git tag geth-v1.15.2-fh3.0 + +Then push all that to the repository: + + git push sf release/geth-1.x-fh3.0 geth-v1.15.2-fh3.0 + +> [!NOTE] +> If you need to issue a Firehose bug fix for an existing version of upstream, for example a Firehose fix on `v1.10.8`, you append `-N` at the end where `N` is 1 then increments further is newer revisions are needed, so you would got tag `geth-v1.15.2-fh3.0-1` + +### Development + +All the *new* development should happen in the `firehose-fh3.0` branch, this is our own branch +containing our commits. + +##### Build Locally + + go install ./cmd/geth + +#### Release + + Github actions are automatically created when creating a tag + +### View only our commits + +**Important** To correctly work, you need to use the right base branch, otherwise, it will be screwed up. The `firehose-fh3.0` +branch was based on `v1.15.2` at time of writing. + +* From `gitk`: `gitk --first-parent v1.15.2..firehose-fh3.0` +* From terminal: `git log --decorate --pretty=oneline --abbrev-commit --first-parent=v1.15.2..firehose-fh3.0` +* From `GitHub`: [https://github.com/streamingfast/go-ethereum/compare/v1.15.2...firehose-fh3.0](https://github.com/streamingfast/go-ethereum/compare/v1.15.2...firehose-fh3.0) +* Modified files in our fork: `git diff --name-status v1.15.2..firehose-fh3.0 | grep -E "^M" | cut -d $'\t' -f 2` diff --git a/build/ci.go b/build/ci.go index 61a0839609..35ef0c7b83 100644 --- a/build/ci.go +++ b/build/ci.go @@ -57,6 +57,7 @@ import ( "github.com/cespare/cp" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto/signify" + "github.com/ethereum/go-ethereum/eth/tracers" "github.com/ethereum/go-ethereum/internal/build" "github.com/ethereum/go-ethereum/params" ) @@ -664,7 +665,7 @@ func maybeSkipArchive(env build.Environment) { log.Printf("skipping archive creation because this is a PR build") os.Exit(0) } - if env.Branch != "master" && !strings.HasPrefix(env.Tag, "v1.") { + if env.Branch != "master" && !strings.HasPrefix(env.Branch, "firehose") && !strings.HasPrefix(env.Tag, "v1.") && !strings.Contains(env.Tag, "fh") { log.Printf("skipping archive creation because branch %q, tag %q is not on the inclusion list", env.Branch, env.Tag) os.Exit(0) } @@ -708,6 +709,10 @@ func doDocker(cmdline []string) { tags = []string{"latest"} case strings.HasPrefix(env.Tag, "v1."): tags = []string{"stable", fmt.Sprintf("release-1.%d", params.VersionMinor), "v" + params.Version} + case strings.HasPrefix(env.Branch, "firehose"): + tags = []string{"edge-fh" + tracers.FirehoseProtocolVersion} + case strings.Contains(env.Tag, "fh"): + tags = []string{"stable-fh" + tracers.FirehoseProtocolVersion, "v" + params.Version + "-fh" + tracers.FirehoseProtocolVersion} } // If architecture specific image builds are requested, build and push them if *image { diff --git a/core/state/statedb.go b/core/state/statedb.go index 709658f813..909b10586e 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -1091,6 +1091,10 @@ func (s *StateDB) mvRecordWritten(object *stateObject) *stateObject { // existing account with the given address, otherwise it will be silently overwritten. func (s *StateDB) createObject(addr common.Address) *stateObject { obj := newObject(s, addr, nil) + if s.logger != nil && s.logger.OnNewAccount != nil { + s.logger.OnNewAccount(addr) + } + s.journal.append(createObjectChange{account: &addr}) s.setStateObject(obj) MVWrite(s, blockstm.NewAddressKey(addr)) diff --git a/core/tracing/hooks.go b/core/tracing/hooks.go index aa66dc49ff..372f0cbfa9 100644 --- a/core/tracing/hooks.go +++ b/core/tracing/hooks.go @@ -193,6 +193,13 @@ type Hooks struct { OnCodeChange CodeChangeHook OnStorageChange StorageChangeHook OnLog LogHook + + // Firehose backward compatibility + // This hook exist because some current Firehose supported chains requires it + // but this field is going to be deprecated and newer chains will not produced + // those events anymore. The hook is registered conditionally based on the + // tracer configuration. + OnNewAccount func(address common.Address) } // BalanceChangeReason is used to indicate the reason for a balance change, useful diff --git a/core/vm/evm.go b/core/vm/evm.go index 4624bc110f..7bb3c295fb 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -517,7 +517,22 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, snapshot := evm.StateDB.Snapshot() if !evm.StateDB.Exist(address) { evm.StateDB.CreateAccount(address) + } else { + // Firehose: In previous versions of the EVM, there was no `evm.StateDB.Exist` + // above and the `CreateAccount` was always called. This was leading to + // always get a `OnNewAccount` event in the tracer as we were not checking + // previous existence of the account. + // + // With the introduction of the `Exist` method, there is now cases where + // `CreateAccount` is not called if it was previously existing. + // + // To keep the same tracing behavior as before, we call the `OnNewAccount` + // manually here if the account was previously existing. + if evm.Config.Tracer != nil && evm.Config.Tracer.OnNewAccount != nil { + evm.Config.Tracer.OnNewAccount(address) + } } + // CreateContract means that regardless of whether the account previously existed // in the state trie or not, it _now_ becomes created as a _contract_ account. // This is performed _prior_ to executing the initcode, since the initcode diff --git a/eth/tracers/firehose.go b/eth/tracers/firehose.go new file mode 100644 index 0000000000..74792882f5 --- /dev/null +++ b/eth/tracers/firehose.go @@ -0,0 +1,2798 @@ +package tracers + +import ( + "bytes" + "cmp" + "encoding/base64" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "io" + "math/big" + "os" + "regexp" + "runtime" + "runtime/debug" + "slices" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/tracing" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/internal/version" + "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/params" + "github.com/ethereum/go-ethereum/rlp" + "github.com/holiman/uint256" + pbeth "github.com/streamingfast/firehose-ethereum/types/pb/sf/ethereum/type/v2" + "golang.org/x/exp/maps" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/timestamppb" +) + +// Here what you can expect from the debugging levels: +// - Info == block start/end + trx start/end +// - Debug == Info + call start/end + error +// - Trace == Debug + state db changes, log, balance, nonce, code, storage, gas +// - TraceFull == Trace + opcode +var firehoseTracerLogLevel = strings.ToLower(os.Getenv("FIREHOSE_ETHEREUM_TRACER_LOG_LEVEL")) +var isFirehoseInfoEnabled = firehoseTracerLogLevel == "info" || firehoseTracerLogLevel == "debug" || firehoseTracerLogLevel == "trace" || firehoseTracerLogLevel == "trace_full" +var isFirehoseDebugEnabled = firehoseTracerLogLevel == "debug" || firehoseTracerLogLevel == "trace" || firehoseTracerLogLevel == "trace_full" +var isFirehoseTraceEnabled = firehoseTracerLogLevel == "trace" || firehoseTracerLogLevel == "trace_full" +var isFirehoseTraceFullEnabled = firehoseTracerLogLevel == "trace_full" + +var emptyCommonAddress = common.Address{} +var emptyCommonHash = common.Hash{} + +func init() { + staticFirehoseChainValidationOnInit() + + LiveDirectory.Register("firehose", newFirehoseTracer) + + // Those 2 are defined but not used in this branch, they are kept because used in other branches + // so it's easier to keep them here and suppress the warning by faking a usage. + _ = new(Firehose).newIsolatedTransactionTracer + _ = new(FinalityStatus).populate +} + +func newFirehoseTracer(cfg json.RawMessage) (*tracing.Hooks, error) { + firehoseTracer, err := NewFirehoseFromRawJSON(cfg) + if err != nil { + return nil, err + } + + return NewTracingHooksFromFirehose(firehoseTracer), nil +} + +func NewTracingHooksFromFirehose(tracer *Firehose) *tracing.Hooks { + return &tracing.Hooks{ + OnBlockchainInit: tracer.OnBlockchainInit, + OnGenesisBlock: tracer.OnGenesisBlock, + OnBlockStart: tracer.OnBlockStart, + OnBlockEnd: tracer.OnBlockEnd, + OnSkippedBlock: tracer.OnSkippedBlock, + + OnTxStart: tracer.OnTxStart, + OnTxEnd: tracer.OnTxEnd, + OnEnter: tracer.OnCallEnter, + OnExit: tracer.OnCallExit, + OnOpcode: tracer.OnOpcode, + OnFault: tracer.OnOpcodeFault, + + OnBalanceChange: tracer.OnBalanceChange, + OnNonceChange: tracer.OnNonceChange, + OnCodeChange: tracer.OnCodeChange, + OnStorageChange: tracer.OnStorageChange, + OnGasChange: tracer.OnGasChange, + OnLog: tracer.OnLog, + + // This is being discussed in PR https://github.com/ethereum/go-ethereum/pull/29355 + // but Firehose needs them so we add handling for them in our patch. + OnSystemCallStart: tracer.OnSystemCallStart, + OnSystemCallEnd: tracer.OnSystemCallEnd, + + // This should actually be conditional but it's not possible to do it in the hooks + // directly because the chain ID will be known only after the `OnBlockchainInit` call. + // So we register it unconditionally and the actual `OnNewAccount` hook will decide + // what it needs to do. + OnNewAccount: tracer.OnNewAccount, + } +} + +type FirehoseConfig struct { + ApplyBackwardCompatibility *bool `json:"applyBackwardCompatibility"` + + // Only used for testing, only possible through JSON configuration + private *privateFirehoseConfig +} + +type privateFirehoseConfig struct { + FlushToTestBuffer bool `json:"flushToTestBuffer"` + IgnoreGenesisBlock bool `json:"ignoreGenesisBlock"` + ForcedBackwardCompatibility bool `json:"forcedBackwardCompatibility"` +} + +// LogKeValues returns a list of key-values to be logged when the config is printed. +func (c *FirehoseConfig) LogKeyValues() []any { + applyBackwardCompatibility := "" + if c.ApplyBackwardCompatibility != nil { + applyBackwardCompatibility = strconv.FormatBool(*c.ApplyBackwardCompatibility) + } + + return []any{ + "config.applyBackwardCompatibility", applyBackwardCompatibility, + } +} + +func (c *FirehoseConfig) ForcedBackwardCompatibility() bool { + if c.private != nil { + return c.private.ForcedBackwardCompatibility + } + + return false +} + +type Firehose struct { + // Global state + outputBuffer *bytes.Buffer + initSent *atomic.Bool + config *FirehoseConfig + chainConfig *params.ChainConfig + hasher crypto.KeccakState // Keccak256 hasher instance shared across tracer needs (non-concurrent safe) + hasherBuf common.Hash // Keccak256 hasher result array shared across tracer needs (non-concurrent safe) + tracerID string + // The FirehoseTracer is used in multiple chains, some for which were produced using a legacy version + // of the whole tracing infrastructure. This legacy version had many small bugs here and there that + // we must "reproduce" on some chain to ensure that the FirehoseTracer produces the same output + // as the legacy version. + // + // This value is fed from the tracer configuration. If explicitly set, the value set will be used + // here. If not set in the config, then we inspect `OnBlockchainInit` the chain config to determine + // if it's a network for which we must reproduce the legacy bugs. + applyBackwardCompatibility *bool + + // Block state + block *pbeth.Block + blockBaseFee *big.Int + blockOrdinal *Ordinal + blockFinality *FinalityStatus + blockRules params.Rules + blockIsPrecompiledAddr func(addr common.Address) bool + blockReorderOrdinal bool + blockReorderOrdinalSnapshot uint64 + blockReorderOrdinalOnce sync.Once + blockIsGenesis bool + + // Transaction state + evm *tracing.VMContext + transaction *pbeth.TransactionTrace + transactionLogIndex uint32 + inSystemCall bool + transactionIsolated bool + transactionTransient *pbeth.TransactionTrace + + // Call state + callStack *CallStack + deferredCallState *DeferredCallState + latestCallEnterSuicided bool + + // Testing state, only used in tests and private configs + testingBuffer *bytes.Buffer + testingIgnoreGenesisBlock bool +} + +const FirehoseProtocolVersion = "3.0" + +func NewFirehoseFromRawJSON(cfg json.RawMessage) (*Firehose, error) { + var config FirehoseConfig + if len([]byte(cfg)) > 0 { + if err := json.Unmarshal(cfg, &config); err != nil { + return nil, fmt.Errorf("failed to parse Firehose config: %w", err) + } + + // Special handling of some "private" fields + type privateConfigRoot struct { + Private *privateFirehoseConfig `json:"_private"` + } + + var privateConfig privateConfigRoot + if err := json.Unmarshal(cfg, &privateConfig); err != nil { + log.Error("Firehose failed to parse private config, ignoring", "error", err) + } else { + config.private = privateConfig.Private + } + } + + return NewFirehose(&config), nil +} + +func NewFirehose(config *FirehoseConfig) *Firehose { + log.Info("Firehose tracer created", config.LogKeyValues()...) + + firehose := &Firehose{ + // Global state + outputBuffer: bytes.NewBuffer(make([]byte, 0, 100*1024*1024)), + initSent: new(atomic.Bool), + config: config, + chainConfig: nil, + hasher: crypto.NewKeccakState(), + tracerID: "global", + applyBackwardCompatibility: config.ApplyBackwardCompatibility, + + // Block state + blockOrdinal: &Ordinal{}, + blockFinality: &FinalityStatus{}, + blockReorderOrdinal: false, + + // Transaction state + transactionLogIndex: 0, + + // Call state + callStack: NewCallStack(), + deferredCallState: NewDeferredCallState(), + latestCallEnterSuicided: false, + } + + if config.private != nil { + firehose.testingIgnoreGenesisBlock = config.private.IgnoreGenesisBlock + if config.private.FlushToTestBuffer { + firehose.testingBuffer = bytes.NewBuffer(nil) + } + } + + return firehose +} + +func (f *Firehose) newIsolatedTransactionTracer(tracerID string) *Firehose { + f.ensureInBlock(0) + + return &Firehose{ + // Global state + initSent: f.initSent, + config: f.config, + chainConfig: f.chainConfig, + hasher: crypto.NewKeccakState(), + hasherBuf: common.Hash{}, + tracerID: tracerID, + + // Block state + block: f.block, + blockBaseFee: f.blockBaseFee, + blockOrdinal: &Ordinal{}, + blockFinality: f.blockFinality, + blockIsPrecompiledAddr: f.blockIsPrecompiledAddr, + blockRules: f.blockRules, + + // Transaction state + transactionLogIndex: 0, + transactionIsolated: true, + + // Call state + callStack: NewCallStack(), + deferredCallState: NewDeferredCallState(), + latestCallEnterSuicided: false, + } +} + +// resetBlock resets the block state only, do not reset transaction or call state +func (f *Firehose) resetBlock() { + f.block = nil + f.blockBaseFee = nil + f.blockOrdinal.Reset() + f.blockFinality.Reset() + f.blockIsPrecompiledAddr = nil + f.blockRules = params.Rules{} + f.blockReorderOrdinal = false + f.blockReorderOrdinalSnapshot = 0 + f.blockReorderOrdinalOnce = sync.Once{} + f.blockIsGenesis = false +} + +// resetTransaction resets the transaction state and the call state in one shot +func (f *Firehose) resetTransaction() { + firehoseDebug("resetting transaction state") + + f.transaction = nil + f.evm = nil + f.transactionLogIndex = 0 + f.inSystemCall = false + f.transactionTransient = nil + + f.callStack.Reset() + f.latestCallEnterSuicided = false + f.deferredCallState.Reset() +} + +func (f *Firehose) OnBlockchainInit(chainConfig *params.ChainConfig) { + f.chainConfig = chainConfig + + if wasNeverSent := f.initSent.CompareAndSwap(false, true); wasNeverSent { + version, _ := version.Info() + f.printToFirehose("INIT", FirehoseProtocolVersion, "geth", version) + } else { + f.panicInvalidState("The OnBlockchainInit callback was called more than once", 0) + } + + applyBackwardCompatibilityLogSuffix := "" + if f.applyBackwardCompatibility == nil { + if f.config.ForcedBackwardCompatibility() { + f.applyBackwardCompatibility = ptr(true) + applyBackwardCompatibilityLogSuffix = " (forced by private config)" + } else if chainNeedsLegacyBackwardCompatibility(chainConfig.ChainID) { + f.applyBackwardCompatibility = ptr(true) + applyBackwardCompatibilityLogSuffix = " (inferred, up to Prague hard-fork)" + } else { + f.applyBackwardCompatibility = ptr(false) + applyBackwardCompatibilityLogSuffix = " (inferred, disabled)" + } + } else if *f.applyBackwardCompatibility { + applyBackwardCompatibilityLogSuffix = " (forced, up to Prague hard-fork)" + if f.config.ForcedBackwardCompatibility() { + applyBackwardCompatibilityLogSuffix = " (forced by private config)" + } + } else { + applyBackwardCompatibilityLogSuffix = " (disabled)" + } + + log.Info("Firehose tracer initialized", + "chain_id", chainConfig.ChainID, + "apply_backward_compatibility", fmt.Sprintf("%t%s", *f.applyBackwardCompatibility, applyBackwardCompatibilityLogSuffix), + "protocol_version", FirehoseProtocolVersion, + ) +} + +var gethDevChainID = big.NewInt(1337) +var mainnetChainID = big.NewInt(1) +var sepoliaChainID = big.NewInt(11155111) +var holeskyChainID = big.NewInt(17000) +var polygonMainnetChainID = big.NewInt(137) +var polygonMumbaiChainID = big.NewInt(80001) +var polygonAmoyChainID = big.NewInt(80002) +var bscMainnetChainID = big.NewInt(56) +var bscTestnetChainID = big.NewInt(97) + +func chainNeedsLegacyBackwardCompatibility(id *big.Int) bool { + return isChainIDOneOf(id, + mainnetChainID, + sepoliaChainID, + holeskyChainID, + polygonMainnetChainID, + polygonMumbaiChainID, + polygonAmoyChainID, + bscMainnetChainID, + bscTestnetChainID, + ) +} + +func (f *Firehose) OnBlockStart(event tracing.BlockEvent) { + f.ensureBlockChainInit() + + // Hash is usually pre-computed within `event.Block`, so it's better to take from there + block := event.Block + hash := block.Hash() + // FIXME: Avoid calling 'Header()', it makes a copy while accessing event.Block getters directly avoids it + header := event.Block.Header() + + // There was a lot of "over time" bugs introduced in Firehose 2.x, e.g. bugs that were fixed or + // introduced in a version without even knowing it. This means that for example, reprocessing + // a chain with latest Firehose 2.x would not produce the same output as the original Firehose 2.x + // making the final dataset indeterministic. + // + // In the optic and with the switch to a new tracer Firehose 3.0 that as a backward compatibility + // mode, we decided that from Prague and onwards, we would stop doing the backward compatibility + // mode and simply switch to the new mode right away. + // + // This will not be worst for the users because the Firehose 2.x is already not deterministic and + // the Firehose 3.x will be deterministic (hopefully). + // + // Also, it means it limits our needed back processing up to Prague only, stopping the "contagion" + // at some point. + blockRules := f.chainConfig.Rules(header.Number, blockIsMerge(event.Block), block.Time()) + + // If are applying backward compatibility and the block is now Prague, stop applying backward compatibility + if *f.applyBackwardCompatibility && blockRules.IsPrague && !f.config.ForcedBackwardCompatibility() { + *f.applyBackwardCompatibility = false + } + + firehoseInfo("block start (number=%d hash=%s, backward_compatibility=%t)", block.NumberU64(), hash, *f.applyBackwardCompatibility) + + f.blockRules = blockRules + f.blockIsPrecompiledAddr = getActivePrecompilesChecker(f.blockRules) + + f.block = &pbeth.Block{ + Hash: hash.Bytes(), + Number: block.NumberU64(), + Header: newBlockHeaderFromChainHeader(hash, header), + Ver: 4, + + // FIXME: 'block.Size()' is a relatively heavy operation, could we do it async? + Size: block.Size(), + } + + if *f.applyBackwardCompatibility { + f.block.Ver = 3 + } + + for _, uncle := range block.Uncles() { + f.block.Uncles = append(f.block.Uncles, newBlockHeaderFromChainHeader(uncle.Hash(), uncle)) + } + + if f.block.Header.BaseFeePerGas != nil { + f.blockBaseFee = f.block.Header.BaseFeePerGas.Native() + } + + f.blockFinality.populateFromChain(event.Finalized) +} + +func blockIsMerge(block *types.Block) bool { + return block.Difficulty().Sign() == 0 +} + +func (f *Firehose) OnSkippedBlock(event tracing.BlockEvent) { + // Blocks that are skipped from blockchain that were known and should contain 0 transactions. + // It happened in the past, on Polygon if I recall right, that we missed block because some block + // went in this code path. + // + // See https://github.com/streamingfast/go-ethereum/blob/a46903cf0cad829479ded66b369017914bf82314/core/blockchain.go#L1797-L1814 + if event.Block.Transactions().Len() > 0 { + panic(fmt.Sprintf("The tracer received an `OnSkippedBlock` block #%d (%s) with %d transactions, this according to core/blockchain.go should never happen and is an error", + event.Block.NumberU64(), + event.Block.Hash().Hex(), + event.Block.Transactions().Len(), + )) + } + + // Trace the block as normal, worst case the Firehose system will simply discard it at some point + f.OnBlockStart(event) + f.OnBlockEnd(nil) +} + +func getActivePrecompilesChecker(rules params.Rules) func(addr common.Address) bool { + activePrecompiles := vm.ActivePrecompiles(rules) + + activePrecompilesMap := make(map[common.Address]bool, len(activePrecompiles)) + for _, addr := range activePrecompiles { + activePrecompilesMap[addr] = true + } + + return func(addr common.Address) bool { + _, found := activePrecompilesMap[addr] + return found + } +} + +func (f *Firehose) OnBlockEnd(err error) { + firehoseInfo("block ending (err=%s)", errorView(err)) + + if err == nil { + if f.blockReorderOrdinal { + f.reorderIsolatedTransactionsAndOrdinals() + } + + if *f.applyBackwardCompatibility && len(f.block.SystemCalls) > 0 && len(f.block.TransactionTraces) > 0 { + // Known Firehose issue: Wrong ordinals re-ordering in presence of system calls. + // + // See comment ref 5b4ef712dd18 within this file for more details. + f.fixOrdinalsForEndOfBlockChanges() + } + + f.ensureInBlockAndNotInTrx() + f.printBlockToFirehose(f.block, f.blockFinality) + } else { + // An error occurred, could have happen in transaction/call context, we must not check if in trx/call, only check in block + f.ensureInBlock(0) + } + + f.resetBlock() + f.resetTransaction() + + firehoseInfo("block end") +} + +func (f *Firehose) fixOrdinalsForEndOfBlockChanges() { + lastSystemCallOrdinal := f.block.SystemCalls[len(f.block.SystemCalls)-1].EndOrdinal + lastTransactionOrdinal := uint64(0) + lastTransactionOrdinal = f.block.TransactionTraces[len(f.block.TransactionTraces)-1].EndOrdinal + + // Change balance changes and code changes that happened after the last transaction + for _, ch := range f.block.BalanceChanges { + if ch.Ordinal >= lastTransactionOrdinal { + ch.Ordinal += lastSystemCallOrdinal + } + } + + for _, ch := range f.block.CodeChanges { + if ch.Ordinal >= lastTransactionOrdinal { + ch.Ordinal += lastSystemCallOrdinal + } + } +} + +// reorderIsolatedTransactionsAndOrdinals is called right after all transactions have completed execution. It will sort transactions +// according to their index. +// +// But most importantly, will re-assign all the ordinals of each transaction recursively. When the parallel execution happened, +// all ordinal were made relative to the transaction they were contained in. But now, we are going to re-assign them to the +// global block ordinal by getting the current ordinal and ad it to the transaction ordinal and so forth. +func (f *Firehose) reorderIsolatedTransactionsAndOrdinals() { + if !f.blockReorderOrdinal { + firehoseInfo("post process isolated transactions skipped (block_reorder_ordinals=false)") + return + } + + ordinalBase := f.blockReorderOrdinalSnapshot + firehoseInfo("post processing isolated transactions sorting & re-assigning ordinals (ordinal_base=%d)", ordinalBase) + + slices.SortStableFunc(f.block.TransactionTraces, func(i, j *pbeth.TransactionTrace) int { + return int(i.Index) - int(j.Index) + }) + + baseline := ordinalBase + for _, trx := range f.block.TransactionTraces { + trx.BeginOrdinal += baseline + for _, call := range trx.Calls { + f.reorderCallOrdinals(call, baseline) + } + + for _, log := range trx.Receipt.Logs { + log.Ordinal += baseline + } + + trx.EndOrdinal += baseline + baseline = trx.EndOrdinal + } + + for _, ch := range f.block.BalanceChanges { + if ch.Ordinal >= ordinalBase { + ch.Ordinal += baseline + } + } + for _, ch := range f.block.CodeChanges { + if ch.Ordinal >= ordinalBase { + ch.Ordinal += baseline + } + } + for _, call := range f.block.SystemCalls { + if call.BeginOrdinal >= ordinalBase { + f.reorderCallOrdinals(call, baseline) + } + } +} + +func (f *Firehose) reorderCallOrdinals(call *pbeth.Call, ordinalBase uint64) (ordinalEnd uint64) { + if *f.applyBackwardCompatibility { + if call.BeginOrdinal != 0 { + call.BeginOrdinal += ordinalBase // consistent with a known small bug: root call has beginOrdinal set to 0 + } + } else { + call.BeginOrdinal += ordinalBase + } + + for _, log := range call.Logs { + log.Ordinal += ordinalBase + } + for _, act := range call.AccountCreations { + act.Ordinal += ordinalBase + } + for _, ch := range call.BalanceChanges { + ch.Ordinal += ordinalBase + } + for _, ch := range call.GasChanges { + ch.Ordinal += ordinalBase + } + for _, ch := range call.NonceChanges { + ch.Ordinal += ordinalBase + } + for _, ch := range call.StorageChanges { + ch.Ordinal += ordinalBase + } + for _, ch := range call.CodeChanges { + ch.Ordinal += ordinalBase + } + + call.EndOrdinal += ordinalBase + + return call.EndOrdinal +} + +func (f *Firehose) OnSystemCallStart() { + firehoseInfo("system call start") + f.ensureInBlockAndNotInTrx() + + f.inSystemCall = true + f.transaction = &pbeth.TransactionTrace{} +} + +func (f *Firehose) OnSystemCallEnd() { + f.ensureInBlockAndInTrx() + f.ensureInSystemCall() + + f.block.SystemCalls = append(f.block.SystemCalls, f.transaction.Calls...) + + f.resetTransaction() +} + +func (f *Firehose) OnTxStart(evm *tracing.VMContext, tx *types.Transaction, from common.Address) { + firehoseInfo("trx start (tracer=%s hash=%s %s type=%d gas=%d isolated=%t input=%s)", f.tracerID, tx.Hash(), fromToTxView(&from, tx), tx.Type(), tx.Gas(), f.transactionIsolated, inputView(tx.Data())) + + f.ensureInBlockAndNotInTrxAndNotInCall() + + f.evm = evm + var to common.Address + if tx.To() == nil { + to = crypto.CreateAddress(from, evm.StateDB.GetNonce(from)) + } else { + to = *tx.To() + } + + if *f.applyBackwardCompatibility { + // Known Firehose issue: At some point in the Firehose 2.x release lifecycle, a bug was introduced that caused + // ordinals within the block to be broken. The problem was that system calls and block level balance changes + // were done using a block level ordinals and transactions were done using their own level ordinals. + // + // Then in the console reader, the ordinals were re-ordered correctly. While block level balance changes + // were re-ordered correctly, the system calls were not. + // + // Here, we re-apply the same bug to the transactions to ensure that the Firehose 3.x release lifecycle. + // First, we are going to reset the ordinal once we detect this is the first transaction. + // + // Then in the end block, we are going to fix balance & code changes ordinals. + // + // See comment ref 5b4ef712dd18 within this file for more details. + if len(f.block.TransactionTraces) == 0 && len(f.block.SystemCalls) > 0 { + f.blockOrdinal.Reset() + } + } + + f.onTxStart(tx, tx.Hash(), from, to) +} + +// onTxStart is used internally a two places, in the normal "tracer" and in the "OnGenesisBlock", +// we manually pass some override to the `tx` because genesis block has a different way of creating +// the transaction that wraps the genesis block. +func (f *Firehose) onTxStart(tx *types.Transaction, hash common.Hash, from, to common.Address) { + v, r, s := tx.RawSignatureValues() + + trx := &pbeth.TransactionTrace{ + BeginOrdinal: f.blockOrdinal.Next(), + Hash: hash.Bytes(), + From: from.Bytes(), + To: to.Bytes(), + Nonce: tx.Nonce(), + GasLimit: tx.Gas(), + GasPrice: gasPrice(tx, f.blockBaseFee), + Value: firehoseBigIntFromNative(tx.Value()), + Input: tx.Data(), + V: emptyBytesToNil(v.Bytes()), + R: normalizeSignaturePoint(r.Bytes()), + S: normalizeSignaturePoint(s.Bytes()), + Type: transactionTypeFromChainTxType(tx.Type()), + AccessList: newAccessListFromChain(tx.AccessList()), + MaxFeePerGas: maxFeePerGas(tx), + MaxPriorityFeePerGas: maxPriorityFeePerGas(tx), + } + + switch tx.Type() { + case types.BlobTxType: + trx.BlobGas = ptr(tx.BlobGas()) + trx.BlobGasFeeCap = firehoseBigIntFromNative(tx.BlobGasFeeCap()) + trx.BlobHashes = newBlobHashesFromChain(tx.BlobHashes()) + + // Not supported by Polygon yet + // case types.SetCodeTxType: + // trx.SetCodeAuthorizations = newSetCodeAuthorizationsFromChain(tx.SetCodeAuthorizations()) + } + + f.transaction = trx +} + +func (f *Firehose) OnTxEnd(receipt *types.Receipt, err error) { + firehoseInfo("trx ending (tracer=%s, isolated=%t, err=%s)", f.tracerID, f.transactionIsolated, errorView(err)) + f.ensureInBlockAndInTrx() + + trxTrace := f.completeTransaction(receipt) + + // In this case, we are in some kind of parallel processing and we must simply add the transaction + // to a transient storage (and not in the block directly). Adding it to the block will be done by the + // `OnTxCommit` callback. + if f.transactionIsolated { + f.transactionTransient = trxTrace + + // We must not reset transaction here. In the isolated transaction tracer, the transaction is reset + // by the `OnTxReset` callback which comes from outside the tracer. Second, resetting the transaction + // also resets the [f.transactionTransient] field which is the one we want to keep on completion + // of an isolated transaction. + } else { + f.block.TransactionTraces = append(f.block.TransactionTraces, trxTrace) + + // The reset must be done as the very last thing as the CallStack needs to be + // properly populated for the `completeTransaction` call above to complete correctly. + f.resetTransaction() + } + + firehoseInfo("trx end (tracer=%s)", f.tracerID) +} + +func (f *Firehose) completeTransaction(receipt *types.Receipt) *pbeth.TransactionTrace { + firehoseInfo("completing transaction (call_count=%d receipt=%s)", len(f.transaction.Calls), receiptView(receipt)) + + // Sorting needs to happen first, before we populate the state reverted + slices.SortFunc(f.transaction.Calls, func(i, j *pbeth.Call) int { + return cmp.Compare(i.Index, j.Index) + }) + + rootCall := f.transaction.Calls[0] + + // Can be done prior moving last deferred call state to the root call as we are only interested from the initial + // deferred state that already been transferred into the root call (in `onCallStart(...)`). + f.discardUncommittedSetCodeAuthorization(rootCall) + + if !f.deferredCallState.IsEmpty() { + f.deferredCallState.MaybePopulateCallAndReset("root", rootCall) + } + + // Receipt can be nil if an error occurred during the transaction execution, right now we don't have it + if receipt != nil { + f.transaction.Index = uint32(receipt.TransactionIndex) + f.transaction.GasUsed = receipt.GasUsed + f.transaction.Receipt = newTxReceiptFromChain(receipt, f.transaction.Type) + f.transaction.Status = transactionStatusFromChainTxReceipt(receipt.Status) + } + + // It's possible that the transaction was reverted, but we still have a receipt, in that case, we must + // check the root call + if rootCall.StatusReverted { + f.transaction.Status = pbeth.TransactionTraceStatus_REVERTED + } + + // Order is important, we must populate the state reverted before we remove the log block index and re-assign ordinals + f.populateStateReverted() + f.removeLogBlockIndexOnStateRevertedCalls() + f.assignOrdinalAndIndexToReceiptLogs() + + if *f.applyBackwardCompatibility { + // Known Firehose issue: Failed call logging a log with no topics were not fixed in the old Firehose instrumentation + // leading to them to be rendered as `topics: [""]` instead of `topics: nil` like successful calls. + // Here we re-apply this bogus behavior. + f.noTopicsLogOnFailedCallSetToEmptyHash() + } + + if *f.applyBackwardCompatibility { + // Known Firehose issue: This field has never been populated in the old Firehose instrumentation + } else { + f.transaction.ReturnData = rootCall.ReturnData + } + + f.transaction.EndOrdinal = f.blockOrdinal.Next() + + return f.transaction +} + +func (f *Firehose) populateStateReverted() { + // Calls are ordered by execution index. So the algo is quite simple. + // We loop through the flat calls, at each call, if the parent is present + // and reverted, the current call is reverted. Otherwise, if the current call + // is failed, the state is reverted. In all other cases, we simply continue + // our iteration loop. + // + // This works because we see the parent before its children, and since we + // trickle down the state reverted value down the children, checking the parent + // of a call will always tell us if the whole chain of parent/child should + // be reverted + // + calls := f.transaction.Calls + for _, call := range f.transaction.Calls { + var parent *pbeth.Call + if call.ParentIndex > 0 { + parent = calls[call.ParentIndex-1] + } + + call.StateReverted = (parent != nil && parent.StateReverted) || call.StatusFailed + } +} + +// discardUncommittedSetCodeAuthorization set `discarded = true` for all the SetCodeAuthorization element +// that don't have a corresponding NonceChange coming from the root call of the transaction, which +// means they weren't committed to the state. +// +// Indeed, EIP-7702 states that are invalid SetCodeAuthorization is simply discard and it's not recorded +// to chain's state. +func (f *Firehose) discardUncommittedSetCodeAuthorization(rootCall *pbeth.Call) { + usedNonceChange := map[int]bool{} + findNonceChange := func(forAddress []byte, nonce uint64) *pbeth.NonceChange { + for i, change := range rootCall.NonceChanges { + if change.OldValue == nonce && change.NewValue == nonce+1 && bytes.Equal(change.Address, forAddress) && usedNonceChange[i] == false { + usedNonceChange[i] = true + return change + } + } + + return nil + } + + for _, auth := range f.transaction.SetCodeAuthorizations { + if len(auth.Authority) == 0 { + // Nothing to check, authority is empty, it's not a valid authorization + auth.Discarded = true + continue + } + + if findNonceChange(auth.Authority, auth.Nonce) == nil { + firehoseDebug("discarded set code authorization, no corresponding nonce change found (address=%s nonce=%d)", hex.EncodeToString(auth.Authority), auth.Nonce) + auth.Discarded = true + } + } +} + +func (f *Firehose) removeLogBlockIndexOnStateRevertedCalls() { + for _, call := range f.transaction.Calls { + if call.StateReverted { + for _, log := range call.Logs { + log.BlockIndex = 0 + } + } + } +} + +func (f *Firehose) assignOrdinalAndIndexToReceiptLogs() { + firehoseTrace("assigning ordinal and index to logs") + defer func() { + firehoseTrace("assigning ordinal and index to logs terminated") + }() + + trx := f.transaction + + callLogs := []*pbeth.Log{} + for _, call := range trx.Calls { + if call.StateReverted { + continue + } + + callLogs = append(callLogs, call.Logs...) + } + + slices.SortFunc(callLogs, func(i, j *pbeth.Log) int { + return cmp.Compare(i.Ordinal, j.Ordinal) + }) + + // When a transaction failed the receipt can be nil, so we need to deal with this + var receiptsLogs []*pbeth.Log + if trx.Receipt == nil { + if len(callLogs) == 0 { + // No logs in the transaction (nor in calls), nothing to do + return + } + + panic(fmt.Errorf( + "mismatch between Firehose call logs and Ethereum transaction %s receipt logs at block #%d, the transaction has no receipt (failed) so there is no logs but it exists %d Firehose call logs", + hex.EncodeToString(trx.Hash), + f.block.Number, + len(callLogs), + )) + } else { + receiptsLogs = trx.Receipt.Logs + } + + if len(callLogs) != len(receiptsLogs) { + panic(fmt.Errorf( + "mismatch between Firehose call logs and Ethereum transaction %s receipt logs at block #%d, transaction receipt has %d logs but there is %d Firehose call logs", + hex.EncodeToString(trx.Hash), + f.block.Number, + len(receiptsLogs), + len(callLogs), + )) + } + + for i := 0; i < len(callLogs); i++ { + callLog := callLogs[i] + receiptsLog := receiptsLogs[i] + + result := &validationResult{} + // Ordinal must **not** be checked as we are assigning it here below after the validations + validateBytesField(result, "Address", callLog.Address, receiptsLog.Address) + validateUint32Field(result, "BlockIndex", callLog.BlockIndex, receiptsLog.BlockIndex) + validateBytesField(result, "Data", callLog.Data, receiptsLog.Data) + validateArrayOfBytesField(result, "Topics", callLog.Topics, receiptsLog.Topics) + + if len(result.failures) > 0 { + result.panicOnAnyFailures("mismatch between Firehose call log and Ethereum transaction receipt log at index %d", i) + } + + receiptsLog.Index = callLog.Index + receiptsLog.Ordinal = callLog.Ordinal + } +} + +func (f *Firehose) noTopicsLogOnFailedCallSetToEmptyHash() { + for _, call := range f.transaction.Calls { + if call.StateReverted { + for _, log := range call.Logs { + if len(log.Topics) == 0 { + log.Topics = make([][]byte, 1) + } + } + } + } +} + +// OnCallEnter implements the EVMLogger interface to initialize the tracing operation. +func (f *Firehose) OnCallEnter(depth int, typ byte, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { + opCode := vm.OpCode(typ) + + var callType pbeth.CallType + if isRootCall := depth == 0; isRootCall { + callType = rootCallType(opCode == vm.CREATE) + } else { + // The invocation for vm.SELFDESTRUCT is called while already in another call and is recorded specially + // in the Geth tracer and generates `OnEnter/OnExit` callbacks. However in Firehose, self destruction + // simply sets the call as having called suicided so there is no extra call. + // + // So we ignore `OnEnter/OnExit` callbacks for `SELFDESTRUCT` opcode, we ignore it here and set + // a special sentinel variable that will tell `OnExit` to ignore itself. + if opCode == vm.SELFDESTRUCT { + // Firehose tracer 2.3 is recording the self destruct balance changes in a specific order which is + // the self destruct increase followed by the self destruct decrease. However Geth tracing API + // we now leverages to implement Firehose tracer does record the balance change in reversed order + // which is the self destruct decrease followed by the self destruct increase. + // + // To improve complexity, this is only true for Cancun rules, before Cancun, the order is actually + // still correct. This is because in the older Selfdestruct opcode, the balance was set to 0 + // after the opcode ran so the decreased happened there before the increased. + // + // So if we are in compatibility mode and the block is Cancun, we must reorder the balance changes + // to match the Firehose 2.3 behavior. + if *f.applyBackwardCompatibility && f.blockRules.IsCancun { + f.fixSelfDestructBalanceChanges() + } + + firehoseDebug("ignoring OnCallEnter for SELFDESTRUCT opcode, not recorded as a call") + + // The next OnCallExit must be ignored, this variable will make the next OnCallExit to be ignored + f.latestCallEnterSuicided = true + return + } + + callType = callTypeFromOpCode(opCode) + if callType == pbeth.CallType_UNSPECIFIED { + panic(fmt.Errorf("unexpected call type, received OpCode %s but only call related opcode (CALL, CREATE, CREATE2, STATIC, DELEGATECALL and CALLCODE) or SELFDESTRUCT is accepted", opCode)) + } + } + + f.callStart(computeCallSource(depth), callType, from, to, input, gas, value) +} + +func (f *Firehose) fixSelfDestructBalanceChanges() { + f.ensureInCall() + activeCall := f.callStack.Peek() + + if len(activeCall.BalanceChanges) == 0 { + return + } + + // It's possible in the new tracing API to get 3 balance changes for a self destruct if + // the self destruct beneficiary is the same as the contract and if the contract was + // created and destructed in the same transaction. + // + // In this case, we get first a decrease from contract to 0, then an increase from 0 to beneficiary + // (which is the contract) and finally a decrease from contract to 0 again. + // + // In the Firehose 2.3 model, this wasn't recorded properly. The first decrease was always ignored, and + // only the second one was recorded. + + withdrawIndices := make([]int, 0, 2) + refundIndices := make([]int, 0, 1) + for i, change := range activeCall.BalanceChanges { + if change.Reason == pbeth.BalanceChange_REASON_SUICIDE_WITHDRAW { + withdrawIndices = append(withdrawIndices, i) + } else if change.Reason == pbeth.BalanceChange_REASON_SUICIDE_REFUND { + refundIndices = append(refundIndices, i) + } + } + + // No suicide balance change found, nothing to do + if len(withdrawIndices) == 0 && len(refundIndices) == 0 { + return + } + + // Both side cannot be 0 (due to above condition), if only one side is 0, there is also + // nothing todo. + if len(withdrawIndices) == 0 || len(refundIndices) == 0 { + return + } + + if len(refundIndices) == 1 && len(withdrawIndices) == 1 { + f.invertWithdrawAndRefundBalanceChange(activeCall, withdrawIndices[0], refundIndices[0]) + return + } + + if len(refundIndices) == 1 && len(withdrawIndices) == 2 { + f.removeFirstWithdrawBalanceChange(activeCall, withdrawIndices[1]) + return + } + + f.panicInvalidState(fmt.Sprintf("invalid state when fixing self destruct balance changes found in call #%d, withdraw indices %v and refund indices %v not matching one of the expected case(s)", activeCall.Index, withdrawIndices, refundIndices), 0) +} + +func (f *Firehose) invertWithdrawAndRefundBalanceChange(activeCall *pbeth.Call, withdrawIndex int, refundIndex int) { + // Nothing to do if they are already ordered according to Firehose 2.3 rules + if withdrawIndex > refundIndex { + return + } + + // Otherwise, invert them to fit Firehose 2.3 rules + changes := activeCall.BalanceChanges + withdrawOrdinal := changes[withdrawIndex].Ordinal + refundOrdinal := changes[refundIndex].Ordinal + + changes[withdrawIndex].Ordinal = refundOrdinal + changes[refundIndex].Ordinal = withdrawOrdinal + + withdrawChange := changes[withdrawIndex] + changes[withdrawIndex] = changes[refundIndex] + changes[refundIndex] = withdrawChange +} + +func (f *Firehose) removeFirstWithdrawBalanceChange(activeCall *pbeth.Call, lastWithdrawIndex int) { + finalChanges := make([]*pbeth.BalanceChange, 0, len(activeCall.BalanceChanges)-1) + for i, change := range activeCall.BalanceChanges { + switch change.Reason { + case pbeth.BalanceChange_REASON_SUICIDE_WITHDRAW: + if i != lastWithdrawIndex { + // Skip all except the last withdraw change. + continue + } + + // We remove the first one, this one must be shifted by one + change.Ordinal -= 1 + + case pbeth.BalanceChange_REASON_SUICIDE_REFUND: + // We remove the first one withdraw, which always happens before the refund, + // this one must be shifted by one + change.Ordinal -= 1 + } + + finalChanges = append(finalChanges, change) + } + + // We remove one change, we must adjust the overall block ordinal to fit + f.blockOrdinal.value -= 1 + activeCall.BalanceChanges = finalChanges +} + +// OnCallExit is called after the call finishes to finalize the tracing. +func (f *Firehose) OnCallExit(depth int, output []byte, gasUsed uint64, err error, reverted bool) { + f.callEnd(computeCallSource(depth), output, gasUsed, err, reverted) +} + +// OnOpcode implements the EVMLogger interface to trace a single step of VM execution. +func (f *Firehose) OnOpcode(pc uint64, op byte, gas, cost uint64, scope tracing.OpContext, rData []byte, depth int, err error) { + firehoseTraceFull("on opcode (op=%s gas=%d cost=%d, err=%s)", vm.OpCode(op), gas, cost, errorView(err)) + + if activeCall := f.callStack.Peek(); activeCall != nil { + opCode := vm.OpCode(op) + f.captureInterpreterStep(activeCall, pc, opCode, gas, cost, scope, rData, depth, err) + + // The rest of the logic expects that a call succeeded, nothing to do more here if the interpreter failed on this OpCode + if err != nil { + return + } + + // The gas change must come first to retain Firehose backward compatibility. Indeed, before Firehose 3.0, + // we had a specific method `OnKeccakPreimage` that was called during the KECCAK256 opcode. However, in + // the new model, we do it through `OnOpcode`. + // + // The gas change recording in the previous Firehose patch was done before calling `OnKeccakPreimage` so + // we must do the same here. + // + // No need to wrap in apply backward compatibility, the old behavior is fine in all cases. + if cost > 0 { + if reason, found := opCodeToGasChangeReasonMap[opCode]; found { + activeCall.GasChanges = append(activeCall.GasChanges, f.newGasChange("state", gas, gas-cost, reason)) + } + } + + switch opCode { + case vm.KECCAK256: + f.onOpcodeKeccak256(activeCall, scope.StackData(), Memory(scope.MemoryData())) + + case vm.SELFDESTRUCT: + f.ensureInCall() + f.callStack.Peek().Suicide = true + } + } +} + +// onOpcodeKeccak256 is called during the SHA3 (a.k.a KECCAK256) opcode it's known +// in Firehose tracer as Keccak preimages. The preimage is the input data that +// was used to produce the given keccak hash. +func (f *Firehose) onOpcodeKeccak256(call *pbeth.Call, stack []uint256.Int, memory Memory) { + if call.KeccakPreimages == nil { + call.KeccakPreimages = make(map[string]string) + } + + offset, size := stack[len(stack)-1], stack[len(stack)-2] + preImage := memory.GetPtrUint256(&offset, &size) + + // We should have exclusive access to the hasher, we can safely reset it. + f.hasher.Reset() + f.hasher.Write(preImage) + f.hasher.Read(f.hasherBuf[:]) + + encodedData := hex.EncodeToString(preImage) + + if *f.applyBackwardCompatibility { + // Known Firehose issue: It appears the old Firehose instrumentation have a bug + // where when the keccak256 preimage is empty, it is written as "." which is + // completely wrong. + // + // To keep the same behavior, we will write the preimage as a "." when the encoded + // data is an empty string. + if encodedData == "" { + encodedData = "." + } + } + + call.KeccakPreimages[hex.EncodeToString(f.hasherBuf[:])] = encodedData +} + +var opCodeToGasChangeReasonMap = map[vm.OpCode]pbeth.GasChange_Reason{ + vm.CREATE: pbeth.GasChange_REASON_CONTRACT_CREATION, + vm.CREATE2: pbeth.GasChange_REASON_CONTRACT_CREATION2, + vm.CALL: pbeth.GasChange_REASON_CALL, + vm.STATICCALL: pbeth.GasChange_REASON_STATIC_CALL, + vm.CALLCODE: pbeth.GasChange_REASON_CALL_CODE, + vm.DELEGATECALL: pbeth.GasChange_REASON_DELEGATE_CALL, + vm.RETURN: pbeth.GasChange_REASON_RETURN, + vm.REVERT: pbeth.GasChange_REASON_REVERT, + vm.LOG0: pbeth.GasChange_REASON_EVENT_LOG, + vm.LOG1: pbeth.GasChange_REASON_EVENT_LOG, + vm.LOG2: pbeth.GasChange_REASON_EVENT_LOG, + vm.LOG3: pbeth.GasChange_REASON_EVENT_LOG, + vm.LOG4: pbeth.GasChange_REASON_EVENT_LOG, + vm.SELFDESTRUCT: pbeth.GasChange_REASON_SELF_DESTRUCT, + vm.CALLDATACOPY: pbeth.GasChange_REASON_CALL_DATA_COPY, + vm.CODECOPY: pbeth.GasChange_REASON_CODE_COPY, + vm.EXTCODECOPY: pbeth.GasChange_REASON_EXT_CODE_COPY, + vm.RETURNDATACOPY: pbeth.GasChange_REASON_RETURN_DATA_COPY, +} + +// OnOpcodeFault implements the EVMLogger interface to trace an execution fault. +func (f *Firehose) OnOpcodeFault(pc uint64, op byte, gas, cost uint64, scope tracing.OpContext, depth int, err error) { + firehoseTraceFull("on opcode fault (op=%s gas=%d cost=%d, err=%s)", vm.OpCode(op), gas, cost, errorView(err)) + + if activeCall := f.callStack.Peek(); activeCall != nil { + f.captureInterpreterStep(activeCall, pc, vm.OpCode(op), gas, cost, scope, nil, depth, err) + } +} + +func (f *Firehose) captureInterpreterStep(activeCall *pbeth.Call, pc uint64, op vm.OpCode, gas, cost uint64, _ tracing.OpContext, rData []byte, depth int, err error) { + if *f.applyBackwardCompatibility { + // for call, we need to process the executed code here + // since in old firehose executed code calculation depends if the code exist + if activeCall.CallType == pbeth.CallType_CALL && !activeCall.ExecutedCode { + activeCall.ExecutedCode = len(activeCall.Input) > 0 + } + } else { + activeCall.ExecutedCode = true + } +} + +func (f *Firehose) callStart(source string, callType pbeth.CallType, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { + firehoseDebug("call start (source=%s index=%d type=%s ref=%s input=%s)", source, f.callStack.NextIndex(), callType, fromToView(&from, &to), inputView(input)) + f.ensureInBlockAndInTrx() + + if *f.applyBackwardCompatibility { + // Known Firehose issue: Contract creation call's input is always `nil` in old Firehose patch + // due to an oversight that having it in `CodeChange` would be sufficient but this is wrong + // as constructor's input are not part of the code change but part of the call input. + if callType == pbeth.CallType_CREATE { + input = nil + } + } + + call := &pbeth.Call{ + CallType: callType, + Depth: 0, + Caller: from.Bytes(), + Address: to.Bytes(), + // We need to clone `input` received by the tracer as it's re-used within Geth! + Input: bytes.Clone(input), + Value: firehoseBigIntFromNative(value), + GasLimit: gas, + } + + if f.blockRules.IsPrague && !f.inSystemCall && !f.blockIsGenesis && callType != pbeth.CallType_CREATE { + firehoseTrace("call resolving delegation (from=%s)", from) + + // Polygon not supporting Prague fully yet + // code := f.evm.StateDB.GetCode(to) + // if len(code) != 0 { + // if target, ok := types.ParseDelegation(code); ok { + // firehoseDebug("call resolved delegation (from=%s, delegates_to=%s)", from, target) + // call.AddressDelegatesTo = target.Bytes() + // } + // } + } + + if *f.applyBackwardCompatibility { + // Known Firehose issue: The BeginOrdinal of the genesis block root call is never actually + // incremented and it's always 0. + // + // Ref 042a2ff03fd623f151d7726314b8aad6 + + call.BeginOrdinal = 0 + call.ExecutedCode = f.getExecutedCode(f.evm, call) + + if f.block.Number != 0 { + call.BeginOrdinal = f.blockOrdinal.Next() + } + } else { + call.BeginOrdinal = f.blockOrdinal.Next() + } + + if err := f.deferredCallState.MaybePopulateCallAndReset(source, call); err != nil { + panic(err) + } + + if *f.applyBackwardCompatibility { + // Known Firehose issue: The `BeginOrdinal` of the root call is incremented but must + // be assigned back to 0 because of a bug in the console reader. + // + // However, system calls are not affected by this bug and must keep their ordinal. + if source == "root" && !f.inSystemCall { + call.BeginOrdinal = 0 + } + } + + f.callStack.Push(call) +} + +// Known Firehose issue: How we computed `executed_code` before was not working for contract's that only +// deal with ETH transfer through Solidity `receive()` built-in since those call have `len(input) == 0` +// +// Older comment keeping for future review: +// +// For precompiled address however, interpreter does not run so determine there was a bug in Firehose instrumentation where we would +// +// if call.ExecutedCode || (f.isPrecompiledAddr != nil && f.isPrecompiledAddr(common.BytesToAddress(call.Address))) { +// // In this case, we are sure that some code executed. This translates in the old Firehose instrumentation +// // that it would have **never** emitted an `account_without_code`. +// // +// // When no `account_without_code` was executed in the previous Firehose instrumentation, +// // the `call.ExecutedCode` defaulted to the condition below +// call.ExecutedCode = call.CallType != pbeth.CallType_CREATE && len(call.Input) > 0 +// } else { +// +// // In all other cases, we are sure that no code executed. This translates in the old Firehose instrumentation +// // that it would have emitted an `account_without_code` and it would have then forced set the `call.ExecutedCode` +// // to `false`. +// call.ExecutedCode = false +// } +func (f *Firehose) getExecutedCode(evm *tracing.VMContext, call *pbeth.Call) bool { + precompile := f.blockIsPrecompiledAddr(common.BytesToAddress(call.Address)) + + if evm != nil && call.CallType == pbeth.CallType_CALL { + if !evm.StateDB.Exist(common.BytesToAddress(call.Address)) && + !precompile && f.blockRules.IsEIP158 && + (call.Value == nil || call.Value.Native().Sign() == 0) { + firehoseTrace("executed code IsSpuriousDragon (callType=%s inputLength=%d)", call.CallType.String(), len(call.Input)) + return call.CallType != pbeth.CallType_CREATE && len(call.Input) > 0 + } + } + + if precompile { + firehoseTrace("executed code is precompile (callType=%s inputLength=%d)", call.CallType.String(), len(call.Input)) + return call.CallType != pbeth.CallType_CREATE && len(call.Input) > 0 + } + + if call.CallType == pbeth.CallType_CALL { + firehoseTrace("executed code callType_CALL") + // calculation for executed code will happen in captureInterpreterStep + return false + } + + firehoseTrace("executed code default (callType=%s inputLength=%d)", call.CallType.String(), len(call.Input)) + return call.CallType != pbeth.CallType_CREATE && len(call.Input) > 0 +} + +func (f *Firehose) callEnd(source string, output []byte, gasUsed uint64, err error, reverted bool) { + firehoseDebug("call end (source=%s index=%d output=%s gasUsed=%d err=%s reverted=%t)", source, f.callStack.ActiveIndex(), outputView(output), gasUsed, errorView(err), reverted) + + if f.latestCallEnterSuicided { + if source != "child" { + panic(fmt.Errorf("unexpected source for suicided call end, expected child but got %s, suicide are always produced on a 'child' source", source)) + } + + // Geth native tracer does a `OnEnter(SELFDESTRUCT, ...)/OnExit(...)`, we must skip the `OnExit` call + // in that case because we did not push it on our CallStack. + f.latestCallEnterSuicided = false + return + } + + f.ensureInBlockAndInTrxAndInCall() + + call := f.callStack.Pop() + call.GasConsumed = gasUsed + + // For create call, we do not save the returned value which is the actual contract's code + if call.CallType != pbeth.CallType_CREATE { + call.ReturnData = bytes.Clone(output) + } + + if reverted { + failureReason := "" + if err != nil { + failureReason = err.Error() + } + + call.FailureReason = failureReason + call.StatusFailed = true + + // We also treat ErrInsufficientBalance and ErrDepth as reverted in Firehose model + // because they do not cost any gas. + call.StatusReverted = errors.Is(err, vm.ErrExecutionReverted) || errors.Is(err, vm.ErrInsufficientBalance) || errors.Is(err, vm.ErrDepth) + + if *f.applyBackwardCompatibility { + // Known Firehose issue: FIXME Document! + if !call.ExecutedCode && (errors.Is(err, vm.ErrInsufficientBalance) || errors.Is(err, vm.ErrDepth)) { + call.ExecutedCode = call.CallType != pbeth.CallType_CREATE && len(call.Input) > 0 + } + } + } + + if *f.applyBackwardCompatibility { + // Known Firehose issue: The EndOrdinal of the genesis block root call is never actually + // incremented and it's always 0. + if f.block.Number != 0 { + call.EndOrdinal = f.blockOrdinal.Next() + } + } else { + call.EndOrdinal = f.blockOrdinal.Next() + } + + f.transaction.Calls = append(f.transaction.Calls, call) +} + +func computeCallSource(depth int) string { + if depth == 0 { + return "root" + } + + return "child" +} + +func (f *Firehose) OnGenesisBlock(b *types.Block, alloc types.GenesisAlloc) { + firehoseInfo("genesis block (number=%d hash=%s)", b.NumberU64(), b.Hash()) + if f.testingIgnoreGenesisBlock { + firehoseInfo("genesis block ignored due to testing config") + return + } + + f.ensureBlockChainInit() + + // Going to be reset in OnBlockEnd + f.blockIsGenesis = true + + f.OnBlockStart(tracing.BlockEvent{Block: b, Finalized: nil, Safe: nil}) + f.onTxStart(types.NewTx(&types.LegacyTx{}), emptyCommonHash, emptyCommonAddress, emptyCommonAddress) + f.OnCallEnter(0, byte(vm.CALL), emptyCommonAddress, emptyCommonAddress, nil, 0, nil) + + for _, addr := range sortedKeys(alloc) { + account := alloc[addr] + + if *f.applyBackwardCompatibility { + f.OnNewAccount(addr) + } + + if account.Balance != nil && account.Balance.Sign() != 0 { + activeCall := f.callStack.Peek() + activeCall.BalanceChanges = append(activeCall.BalanceChanges, f.newBalanceChange("genesis", addr, common.Big0, account.Balance, pbeth.BalanceChange_REASON_GENESIS_BALANCE)) + } + + if len(account.Code) > 0 { + f.OnCodeChange(addr, emptyCommonHash, nil, common.BytesToHash(crypto.Keccak256(account.Code)), account.Code) + } + + if account.Nonce > 0 { + f.OnNonceChange(addr, 0, account.Nonce) + } + + for _, key := range sortedKeys(account.Storage) { + f.OnStorageChange(addr, key, emptyCommonHash, account.Storage[key]) + } + } + + f.OnCallExit(0, nil, 0, nil, false) + f.OnTxEnd(&types.Receipt{ + PostState: b.Root().Bytes(), + Status: types.ReceiptStatusSuccessful, + }, nil) + f.OnBlockEnd(nil) +} + +type bytesGetter interface { + comparable + Bytes() []byte +} + +func sortedKeys[K bytesGetter, V any](m map[K]V) []K { + keys := maps.Keys(m) + slices.SortFunc(keys, func(i, j K) int { + return bytes.Compare(i.Bytes(), j.Bytes()) + }) + + return keys +} + +func (f *Firehose) OnBalanceChange(a common.Address, prev, new *big.Int, reason tracing.BalanceChangeReason) { + if reason == tracing.BalanceChangeUnspecified { + // We ignore those, if they are mislabelled, too bad so particular attention needs to be ported to this + return + } + + if *f.applyBackwardCompatibility { + // Known Firehose issue: It's possible to burn Ether by sending some ether to a suicided account. In those case, + // at the end of block producing, StateDB finalize the block by burning ether from the account. This is something + // we were not tracking in the old Firehose instrumentation. + if reason == tracing.BalanceDecreaseSelfdestructBurn { + return + } + } + + f.ensureInBlockOrTrx() + + change := f.newBalanceChange("tracer", a, prev, new, balanceChangeReasonFromChain(reason)) + + if f.transaction != nil { + activeCall := f.callStack.Peek() + + // There is an initial transfer happening will the call is not yet started, we track it manually + if activeCall == nil { + f.deferredCallState.balanceChanges = append(f.deferredCallState.balanceChanges, change) + return + } + + activeCall.BalanceChanges = append(activeCall.BalanceChanges, change) + } else { + f.block.BalanceChanges = append(f.block.BalanceChanges, change) + } +} + +func (f *Firehose) newBalanceChange(tag string, address common.Address, oldValue, newValue *big.Int, reason pbeth.BalanceChange_Reason) *pbeth.BalanceChange { + firehoseTrace("balance changed (tag=%s address=%s before=%d after=%d reason=%s)", tag, shortAddressView(&address), oldValue, newValue, reason) + + if reason == pbeth.BalanceChange_REASON_UNKNOWN { + panic(fmt.Errorf("received unknown balance change reason %s", reason)) + } + + return &pbeth.BalanceChange{ + Ordinal: f.blockOrdinal.Next(), + Address: address.Bytes(), + OldValue: firehoseBigIntFromNative(oldValue), + NewValue: firehoseBigIntFromNative(newValue), + Reason: reason, + } +} + +func (f *Firehose) OnNonceChange(a common.Address, prev, new uint64) { + f.ensureInBlockAndInTrx() + + activeCall := f.callStack.Peek() + change := &pbeth.NonceChange{ + Address: a.Bytes(), + OldValue: prev, + NewValue: new, + Ordinal: f.blockOrdinal.Next(), + } + + // There is an initial nonce change happening when the call is not yet started, we track it manually + if activeCall == nil { + f.deferredCallState.nonceChanges = append(f.deferredCallState.nonceChanges, change) + return + } + + activeCall.NonceChanges = append(activeCall.NonceChanges, change) +} + +func (f *Firehose) OnCodeChange(a common.Address, prevCodeHash common.Hash, prev []byte, codeHash common.Hash, code []byte) { + firehoseDebug("code changed (address=%s prev_hash=%s new_hash=%s)", a, prevCodeHash, codeHash) + + f.ensureInBlockOrTrx() + + if f.transaction != nil { + activeCall := f.callStack.Peek() + + // Since EIP-7702 and the introduction of the `SetCode` transaction, a traced `StateDB.SetCode(...)` call + // is now happening within the "bootstrap" transaction phase which happens before any call is made. So + // in the event there is no active call, we push the code change to the deferred state and will be applied + // on the root call when it's finally created. + if activeCall == nil { + f.deferredCallState.codeChanges = append(f.deferredCallState.codeChanges, f.newCodeChange(a, prevCodeHash, prev, codeHash, code)) + return + } + + // Geth 1.14.12 introduced a new behavior where a code change is emitted when a contract + // suicides. This was not the case before and we must ignore those changes to keep backward + // compatibility with the Firehose 2.3 and 3.0 model. + // + // There is a gotcha to all that here is that a contract created that selfdestructs in the constructor + // directly does create a code change in Firehose 2.3 and 3.0. The weird thing is that the previous + // code received in the OnChangeCode in this case is empty. + // + // The new behavior introduced in Geth 1.14.12 around code change though has a check on + // `len(prevCode) > 0` which means those new added OnCodeChange calls are done only if a previous + // code existed. + // + // Since a selfdestruct in the constructor does not have a previous code, it will not enter this condition + // and will remain compatible with the Firehose 2.3 and 3.0 model in that particular corner case. + if activeCall.Suicide && len(prev) > 0 && len(code) == 0 { + firehoseDebug("ignoring code change due to suicide (prev: %s (%d), new: %s (%d)", prevCodeHash, len(prev), codeHash, len(code)) + return + } + + activeCall.CodeChanges = append(activeCall.CodeChanges, f.newCodeChange(a, prevCodeHash, prev, codeHash, code)) + } else { + f.block.CodeChanges = append(f.block.CodeChanges, f.newCodeChange(a, prevCodeHash, prev, codeHash, code)) + } +} + +func (f *Firehose) newCodeChange(addr common.Address, prevCodeHash common.Hash, prev []byte, codeHash common.Hash, code []byte) *pbeth.CodeChange { + return &pbeth.CodeChange{ + Address: addr.Bytes(), + OldHash: prevCodeHash.Bytes(), + OldCode: prev, + NewHash: codeHash.Bytes(), + NewCode: code, + Ordinal: f.blockOrdinal.Next(), + } +} + +func (f *Firehose) OnStorageChange(a common.Address, k, prev, new common.Hash) { + firehoseTrace("storage changed (address=%s key=%s, before=%s after=%s)", shortAddressView(&a), k, prev, new) + + f.ensureInBlockAndInTrxAndInCall() + + activeCall := f.callStack.Peek() + activeCall.StorageChanges = append(activeCall.StorageChanges, &pbeth.StorageChange{ + Address: a.Bytes(), + Key: k.Bytes(), + OldValue: prev.Bytes(), + NewValue: new.Bytes(), + Ordinal: f.blockOrdinal.Next(), + }) +} + +func (f *Firehose) OnLog(l *types.Log) { + f.ensureInBlockAndInTrxAndInCall() + + topics := make([][]byte, len(l.Topics)) + for i, topic := range l.Topics { + topics[i] = topic.Bytes() + } + + activeCall := f.callStack.Peek() + firehoseTrace("adding log to call (address=%s call=%d [has already %d logs])", l.Address, activeCall.Index, len(activeCall.Logs)) + + activeCall.Logs = append(activeCall.Logs, &pbeth.Log{ + Address: l.Address.Bytes(), + Topics: topics, + Data: l.Data, + Index: f.transactionLogIndex, + BlockIndex: uint32(l.Index), + Ordinal: f.blockOrdinal.Next(), + }) + + f.transactionLogIndex++ +} + +func (f *Firehose) OnNewAccount(a common.Address) { + // Newer Firehose instrumentation does not track OnNewAccount anymore since it's bogus + // and was removed from the Geth live tracer. + if !*f.applyBackwardCompatibility { + return + } + + f.ensureInBlockOrTrx() + if f.transaction == nil { + // We receive OnNewAccount on finalization of the block which means there is no + // transaction active. In that case, we do not track the account creation because + // the "old" Firehose didn't but mainly because we don't have `AccountCreation` at + // the block level so what can we do... + + // This fix was applied on Erigon branch after chain's comparison. I need to check + // with what the old patch was doing to write a meaningful comment here and ensure + // they got the logic right + f.blockOrdinal.Next() + return + } + + if call := f.callStack.Peek(); call != nil && call.CallType == pbeth.CallType_STATIC && f.blockIsPrecompiledAddr(common.Address(call.Address)) { + // Old Firehose ignore those, we do the same + return + } + + if a == params.SystemAddress { + // Old Firehose ignore those, we do the same, this is true only for direct Ethereum (Mainnet, Sepolia and Holesky), + // BNB and Polygon do not have this behavior and emits account creations for the system address + // + // See https://github.com/streamingfast/go-ethereum/blob/30ce26bfaf27af761372409b72c2d58e619775eb/firehose/context.go#L764-L766 + + // TODO: Performance wise, does it make sense cache the chain's comparison into a variable directly, to avoid doing all the compares? + // Technically the right "behavior" could be computed once at start of tracer and then used everywhere without even needing to check + // the chainID as the "behavior" object would have the right behavior for the chain. + // + // For now, shouldn't be a big deal as `OnNewAccount` on the system address is not a common thing. + if f.isChainOneOf(mainnetChainID, sepoliaChainID, holeskyChainID, gethDevChainID) { + return + } + } + + accountCreation := &pbeth.AccountCreation{ + Account: a.Bytes(), + Ordinal: f.blockOrdinal.Next(), + } + + activeCall := f.callStack.Peek() + if activeCall == nil { + f.deferredCallState.accountCreations = append(f.deferredCallState.accountCreations, accountCreation) + return + } + + activeCall.AccountCreations = append(activeCall.AccountCreations, accountCreation) +} + +func (f *Firehose) OnGasChange(old, new uint64, reason tracing.GasChangeReason) { + f.ensureInBlockAndInTrx() + + if old == new { + return + } + + if reason == tracing.GasChangeCallOpCode || reason == tracing.GasChangeIgnored { + // We ignore the 'CallOpCode' ones because we track OpCode gas consumption manually by tracking the gas value at `OnOpcode` call + // The 'Ignored' one is actually made to be ignored by tracing + return + } + + if *f.applyBackwardCompatibility { + // Known Firehose issue: New geth native tracer added more gas change, some that we were indeed missing and + // should have included in our previous patch. + // + // Ref eb1916a67d9bea03df16a7a3e2cfac72 + if reason == tracing.GasChangeTxInitialBalance || + reason == tracing.GasChangeTxRefunds || + reason == tracing.GasChangeTxLeftOverReturned || + reason == tracing.GasChangeCallInitialBalance || + reason == tracing.GasChangeCallLeftOverReturned { + return + } + } + + activeCall := f.callStack.Peek() + change := f.newGasChange("tracer", old, new, gasChangeReasonFromChain(reason)) + + // There is an initial gas consumption happening will the call is not yet started, we track it manually + if activeCall == nil { + f.deferredCallState.gasChanges = append(f.deferredCallState.gasChanges, change) + return + } + + activeCall.GasChanges = append(activeCall.GasChanges, change) +} + +func (f *Firehose) newGasChange(tag string, oldValue, newValue uint64, reason pbeth.GasChange_Reason) *pbeth.GasChange { + firehoseTrace("gas consumed (tag=%s before=%d after=%d reason=%s)", tag, oldValue, newValue, reason) + + // Should already be checked by the caller, but we keep it here for safety if the code ever change + if reason == pbeth.GasChange_REASON_UNKNOWN { + panic(fmt.Errorf("received unknown gas change reason %s", reason)) + } + + return &pbeth.GasChange{ + OldValue: oldValue, + NewValue: newValue, + Ordinal: f.blockOrdinal.Next(), + Reason: reason, + } +} + +func (f *Firehose) ensureBlockChainInit() { + if f.chainConfig == nil { + f.panicInvalidState("the OnBlockchainInit hook should have been called at this point", 2) + } +} + +func (f *Firehose) ensureInBlock(callerSkip int) { + if f.block == nil { + f.panicInvalidState("caller expected to be in block state but we were not, this is a bug", callerSkip+1) + } + + if f.chainConfig == nil { + f.panicInvalidState("the OnBlockchainInit hook should have been called at this point", callerSkip+1) + } +} + +func (f *Firehose) ensureNotInBlock(callerSkip int) { + if f.block != nil { + f.panicInvalidState("caller expected to not be in block state but we were, this is a bug", callerSkip+1) + } +} + +// Suppress lint warning about unusued method, we keep it in the patch because it's used in other +// network which pulls this branch. +var _ = new(Firehose).ensureNotInBlock + +func (f *Firehose) ensureInBlockAndInTrx() { + f.ensureInBlock(2) + + if f.transaction == nil { + f.panicInvalidState("caller expected to be in transaction state but we were not, this is a bug", 2) + } +} + +func (f *Firehose) ensureInBlockAndNotInTrx() { + f.ensureInBlock(2) + + if f.transaction != nil { + f.panicInvalidState("caller expected to not be in transaction state but we were, this is a bug", 2) + } +} + +func (f *Firehose) ensureInBlockAndNotInTrxAndNotInCall() { + f.ensureInBlock(2) + + if f.transaction != nil { + f.panicInvalidState("caller expected to not be in transaction state but we were, this is a bug", 2) + } + + if f.callStack.HasActiveCall() { + f.panicInvalidState("caller expected to not be in call state but we were, this is a bug", 2) + } +} + +func (f *Firehose) ensureInBlockOrTrx() { + if f.transaction == nil && f.block == nil { + f.panicInvalidState("caller expected to be in either block or transaction state but we were not, this is a bug", 2) + } +} + +func (f *Firehose) ensureInBlockAndInTrxAndInCall() { + if f.transaction == nil || f.block == nil { + f.panicInvalidState("caller expected to be in block and in transaction but we were not, this is a bug", 2) + } + + if !f.callStack.HasActiveCall() { + f.panicInvalidState("caller expected to be in call state but we were not, this is a bug", 2) + } +} + +func (f *Firehose) ensureInCall() { + if f.block == nil { + f.panicInvalidState("caller expected to be in call state but we were not, this is a bug", 2) + } +} + +func (f *Firehose) ensureInSystemCall() { + if !f.inSystemCall { + f.panicInvalidState("call expected to be in system call state but we were not, this is a bug", 2) + } +} + +func (f *Firehose) isChainOneOf(chainIDs ...*big.Int) bool { + f.ensureBlockChainInit() + + return isChainIDOneOf(f.chainConfig.ChainID, chainIDs...) +} + +func isChainIDOneOf(actualChainID *big.Int, chainIDs ...*big.Int) bool { + for _, chainID := range chainIDs { + if actualChainID.Cmp(chainID) == 0 { + return true + } + } + + return false +} + +func (f *Firehose) panicInvalidState(msg string, callerSkip int) string { + caller := "N/A" + if _, file, line, ok := runtime.Caller(callerSkip); ok { + caller = fmt.Sprintf("%s:%d", file, line) + } + + if f.block != nil { + msg += fmt.Sprintf(" at block #%d (%s)", f.block.Number, hex.EncodeToString(f.block.Hash)) + } + + if f.transaction != nil { + msg += fmt.Sprintf(" in transaction %s", hex.EncodeToString(f.transaction.Hash)) + } + + panic(fmt.Errorf("%s (caller=%s, init=%t, inBlock=%t, inTransaction=%t, inCall=%t)", msg, caller, f.chainConfig != nil, f.block != nil, f.transaction != nil, f.callStack.HasActiveCall())) +} + +// printBlockToFirehose is a helper function to print a block to Firehose protocl format. +func (f *Firehose) printBlockToFirehose(block *pbeth.Block, finalityStatus *FinalityStatus) { + marshalled, err := proto.Marshal(block) + if err != nil { + panic(fmt.Errorf("failed to marshal block: %w", err)) + } + + f.outputBuffer.Reset() + + previousHash := block.PreviousID() + previousNum := 0 + if block.Number > 0 { + previousNum = int(block.Number) - 1 + } + + libNum := finalityStatus.LastIrreversibleBlockNumber + if finalityStatus.IsEmpty() { + // FIXME: We should have access to the genesis block to perform this operation to ensure we never go below the + // the genesis block + if block.Number >= 200 { + libNum = block.Number - 200 + } else { + libNum = 0 + } + } + + // **Important* The final space in the Sprintf template is mandatory! + f.outputBuffer.WriteString(fmt.Sprintf("FIRE BLOCK %d %s %d %s %d %d ", block.Number, hex.EncodeToString(block.Hash), previousNum, previousHash, libNum, block.MustTime().UnixNano())) + + encoder := base64.NewEncoder(base64.StdEncoding, f.outputBuffer) + if _, err = encoder.Write(marshalled); err != nil { + panic(fmt.Errorf("write to encoder should have been infaillible: %w", err)) + } + + if err := encoder.Close(); err != nil { + panic(fmt.Errorf("closing encoder should have been infaillible: %w", err)) + } + + f.outputBuffer.WriteString("\n") + + f.flushToFirehose(f.outputBuffer.Bytes()) +} + +// printToFirehose is an easy way to print to Firehose format, it essentially +// adds the "FIRE" prefix to the input and joins the input with spaces as well +// as adding a newline at the end. +// +// It flushes this through [flushToFirehose] to the `os.Stdout` writer. +func (f *Firehose) printToFirehose(input ...string) { + f.flushToFirehose([]byte("FIRE " + strings.Join(input, " ") + "\n")) +} + +// flushToFirehose sends data to Firehose via `io.Writter` checking for errors +// and retrying if necessary. +// +// If error is still present after 10 retries, prints an error message to `writer` +// as well as writing file `/tmp/firehose_writer_failed_print.log` with the same +// error message. +func (f *Firehose) flushToFirehose(in []byte) { + var writer io.Writer = os.Stdout + if f.testingBuffer != nil { + writer = f.testingBuffer + } + + var written int + var err error + loops := 10 + for i := 0; i < loops; i++ { + written, err = writer.Write(in) + + if len(in) == written { + return + } + + in = in[written:] + if i == loops-1 { + break + } + } + + errstr := fmt.Sprintf("\nFIREHOSE FAILED WRITING %dx: %s\n", loops, err) + os.WriteFile("/tmp/firehose_writer_failed_print.log", []byte(errstr), 0644) + fmt.Fprint(writer, errstr) +} + +// TestingBuffer is an internal method only used for testing purposes +// that should never be used in production code. +// +// There is no public api guaranteed for this method. +func (f *Firehose) InternalTestingBuffer() *bytes.Buffer { + return f.testingBuffer +} + +// FIXME: Create a unit test that is going to fail as soon as any header is added in +func newBlockHeaderFromChainHeader(hash common.Hash, h *types.Header) *pbeth.BlockHeader { + var withdrawalsHashBytes []byte + if hash := h.WithdrawalsHash; hash != nil { + withdrawalsHashBytes = hash.Bytes() + } + + var parentBeaconRootBytes []byte + if root := h.ParentBeaconRoot; root != nil { + parentBeaconRootBytes = root.Bytes() + } + + // Polygon don't have Prague request hash(s) yet + // var requestHashBytes []byte + // if hash := h.RequestsHash; hash != nil { + // requestHashBytes = hash.Bytes() + // } + + pbHead := &pbeth.BlockHeader{ + Hash: hash.Bytes(), + Number: h.Number.Uint64(), + ParentHash: h.ParentHash.Bytes(), + UncleHash: h.UncleHash.Bytes(), + Coinbase: h.Coinbase.Bytes(), + StateRoot: h.Root.Bytes(), + TransactionsRoot: h.TxHash.Bytes(), + ReceiptRoot: h.ReceiptHash.Bytes(), + LogsBloom: h.Bloom.Bytes(), + Difficulty: firehoseBigIntFromNative(h.Difficulty), + GasLimit: h.GasLimit, + GasUsed: h.GasUsed, + Timestamp: timestamppb.New(time.Unix(int64(h.Time), 0)), + ExtraData: h.Extra, + MixHash: h.MixDigest.Bytes(), + Nonce: h.Nonce.Uint64(), + BaseFeePerGas: firehoseBigIntFromNative(h.BaseFee), + WithdrawalsRoot: withdrawalsHashBytes, + BlobGasUsed: h.BlobGasUsed, + ExcessBlobGas: h.ExcessBlobGas, + ParentBeaconRoot: parentBeaconRootBytes, + // RequestsHash: requestHashBytes, + + // This has been removed from Geth entirely, nothing best to do here than to set to nil (e.g. 0) + TotalDifficulty: nil, + + // Only set on Polygon fork(s) + TxDependency: nil, + } + + if pbHead.Difficulty == nil { + pbHead.Difficulty = &pbeth.BigInt{Bytes: []byte{0}} + } + + return pbHead +} + +// FIXME: Bring back Firehose test that ensures no new tx type are missed +func transactionTypeFromChainTxType(txType uint8) pbeth.TransactionTrace_Type { + switch txType { + case types.AccessListTxType: + return pbeth.TransactionTrace_TRX_TYPE_ACCESS_LIST + case types.DynamicFeeTxType: + return pbeth.TransactionTrace_TRX_TYPE_DYNAMIC_FEE + case types.LegacyTxType: + return pbeth.TransactionTrace_TRX_TYPE_LEGACY + case types.BlobTxType: + return pbeth.TransactionTrace_TRX_TYPE_BLOB + // Polygon don't have Prague SetCode tx yet + // case types.SetCodeTxType: + // return pbeth.TransactionTrace_TRX_TYPE_SET_CODE + default: + panic(fmt.Errorf("unknown transaction type %d", txType)) + } +} + +func transactionStatusFromChainTxReceipt(txStatus uint64) pbeth.TransactionTraceStatus { + switch txStatus { + case types.ReceiptStatusSuccessful: + return pbeth.TransactionTraceStatus_SUCCEEDED + case types.ReceiptStatusFailed: + return pbeth.TransactionTraceStatus_FAILED + default: + panic(fmt.Errorf("unknown transaction status %d", txStatus)) + } +} + +func rootCallType(create bool) pbeth.CallType { + if create { + return pbeth.CallType_CREATE + } + + return pbeth.CallType_CALL +} + +func callTypeFromOpCode(typ vm.OpCode) pbeth.CallType { + switch typ { + case vm.CALL: + return pbeth.CallType_CALL + case vm.STATICCALL: + return pbeth.CallType_STATIC + case vm.DELEGATECALL: + return pbeth.CallType_DELEGATE + case vm.CREATE, vm.CREATE2: + return pbeth.CallType_CREATE + case vm.CALLCODE: + return pbeth.CallType_CALLCODE + } + + return pbeth.CallType_UNSPECIFIED +} + +func newTxReceiptFromChain(receipt *types.Receipt, txType pbeth.TransactionTrace_Type) (out *pbeth.TransactionReceipt) { + out = &pbeth.TransactionReceipt{ + StateRoot: receipt.PostState, + CumulativeGasUsed: receipt.CumulativeGasUsed, + LogsBloom: receipt.Bloom[:], + } + + if txType == pbeth.TransactionTrace_TRX_TYPE_BLOB { + out.BlobGasUsed = &receipt.BlobGasUsed + out.BlobGasPrice = firehoseBigIntFromNative(receipt.BlobGasPrice) + } + + if len(receipt.Logs) > 0 { + out.Logs = make([]*pbeth.Log, len(receipt.Logs)) + for i, log := range receipt.Logs { + out.Logs[i] = &pbeth.Log{ + Address: log.Address.Bytes(), + Topics: func() [][]byte { + if len(log.Topics) == 0 { + return nil + } + + out := make([][]byte, len(log.Topics)) + for i, topic := range log.Topics { + out[i] = topic.Bytes() + } + return out + }(), + Data: log.Data, + Index: uint32(i), + BlockIndex: uint32(log.Index), + + // Ordinal on transaction receipt logs is populated at the very end, so pairing + // between call logs and receipt logs is made + } + } + } + + return out +} + +func newAccessListFromChain(accessList types.AccessList) (out []*pbeth.AccessTuple) { + if len(accessList) == 0 { + return nil + } + + out = make([]*pbeth.AccessTuple, len(accessList)) + for i, tuple := range accessList { + out[i] = &pbeth.AccessTuple{ + Address: tuple.Address.Bytes(), + StorageKeys: func() [][]byte { + out := make([][]byte, len(tuple.StorageKeys)) + for i, key := range tuple.StorageKeys { + out[i] = key.Bytes() + } + return out + }(), + } + } + + return +} + +func newBlobHashesFromChain(blobHashes []common.Hash) (out [][]byte) { + if len(blobHashes) == 0 { + return nil + } + + out = make([][]byte, len(blobHashes)) + for i, blobHash := range blobHashes { + out[i] = blobHash.Bytes() + } + + return +} + +// Polygon don't have Prague SetCode tx yet +// func newSetCodeAuthorizationsFromChain(authorizations []types.SetCodeAuthorization) (out []*pbeth.SetCodeAuthorization) { +// if len(authorizations) == 0 { +// return nil +// } + +// out = make([]*pbeth.SetCodeAuthorization, len(authorizations)) +// for i, authorization := range authorizations { +// pbAuthorization := &pbeth.SetCodeAuthorization{ +// ChainId: authorization.ChainID.Bytes(), +// Nonce: authorization.Nonce, +// V: uint32(authorization.V), +// R: normalizeSignaturePoint(authorization.R.Bytes()), +// S: normalizeSignaturePoint(authorization.S.Bytes()), +// } + +// authority, err := authorization.Authority() +// if err != nil { +// // The node skips invalid authorizations, we do the same, at transaction's end, we will +// // also remove authorizations that didn't result into a code change. +// firehoseDebug("failed to compute authority for authorization at index %d (err=%s)", i, errorView(err)) +// pbAuthorization.Discarded = true +// } else { +// pbAuthorization.Authority = authority.Bytes() +// } + +// out[i] = pbAuthorization +// } + +// return +// } + +var balanceChangeReasonToPb = map[tracing.BalanceChangeReason]pbeth.BalanceChange_Reason{ + tracing.BalanceIncreaseRewardMineUncle: pbeth.BalanceChange_REASON_REWARD_MINE_UNCLE, + tracing.BalanceIncreaseRewardMineBlock: pbeth.BalanceChange_REASON_REWARD_MINE_BLOCK, + tracing.BalanceIncreaseDaoContract: pbeth.BalanceChange_REASON_DAO_REFUND_CONTRACT, + tracing.BalanceDecreaseDaoAccount: pbeth.BalanceChange_REASON_DAO_ADJUST_BALANCE, + tracing.BalanceChangeTransfer: pbeth.BalanceChange_REASON_TRANSFER, + tracing.BalanceIncreaseGenesisBalance: pbeth.BalanceChange_REASON_GENESIS_BALANCE, + tracing.BalanceDecreaseGasBuy: pbeth.BalanceChange_REASON_GAS_BUY, + tracing.BalanceIncreaseRewardTransactionFee: pbeth.BalanceChange_REASON_REWARD_TRANSACTION_FEE, + tracing.BalanceIncreaseGasReturn: pbeth.BalanceChange_REASON_GAS_REFUND, + tracing.BalanceChangeTouchAccount: pbeth.BalanceChange_REASON_TOUCH_ACCOUNT, + tracing.BalanceIncreaseSelfdestruct: pbeth.BalanceChange_REASON_SUICIDE_REFUND, + tracing.BalanceDecreaseSelfdestruct: pbeth.BalanceChange_REASON_SUICIDE_WITHDRAW, + tracing.BalanceDecreaseSelfdestructBurn: pbeth.BalanceChange_REASON_BURN, + tracing.BalanceIncreaseWithdrawal: pbeth.BalanceChange_REASON_WITHDRAWAL, + + tracing.BalanceChangeUnspecified: pbeth.BalanceChange_REASON_UNKNOWN, +} + +func balanceChangeReasonFromChain(reason tracing.BalanceChangeReason) pbeth.BalanceChange_Reason { + if r, ok := balanceChangeReasonToPb[reason]; ok { + return r + } + + panic(fmt.Errorf("unknown tracer balance change reason value '%d', check state.BalanceChangeReason so see to which constant it refers to", reason)) +} + +var gasChangeReasonToPb = map[tracing.GasChangeReason]pbeth.GasChange_Reason{ + tracing.GasChangeTxInitialBalance: pbeth.GasChange_REASON_TX_INITIAL_BALANCE, + tracing.GasChangeTxRefunds: pbeth.GasChange_REASON_TX_REFUNDS, + tracing.GasChangeTxLeftOverReturned: pbeth.GasChange_REASON_TX_LEFT_OVER_RETURNED, + tracing.GasChangeCallInitialBalance: pbeth.GasChange_REASON_CALL_INITIAL_BALANCE, + tracing.GasChangeCallLeftOverReturned: pbeth.GasChange_REASON_CALL_LEFT_OVER_RETURNED, + tracing.GasChangeTxIntrinsicGas: pbeth.GasChange_REASON_INTRINSIC_GAS, + tracing.GasChangeCallContractCreation: pbeth.GasChange_REASON_CONTRACT_CREATION, + tracing.GasChangeCallContractCreation2: pbeth.GasChange_REASON_CONTRACT_CREATION2, + tracing.GasChangeCallCodeStorage: pbeth.GasChange_REASON_CODE_STORAGE, + tracing.GasChangeCallPrecompiledContract: pbeth.GasChange_REASON_PRECOMPILED_CONTRACT, + tracing.GasChangeCallStorageColdAccess: pbeth.GasChange_REASON_STATE_COLD_ACCESS, + tracing.GasChangeCallLeftOverRefunded: pbeth.GasChange_REASON_REFUND_AFTER_EXECUTION, + tracing.GasChangeCallFailedExecution: pbeth.GasChange_REASON_FAILED_EXECUTION, + tracing.GasChangeWitnessContractInit: pbeth.GasChange_REASON_WITNESS_CONTRACT_INIT, + tracing.GasChangeWitnessContractCreation: pbeth.GasChange_REASON_WITNESS_CONTRACT_CREATION, + tracing.GasChangeWitnessCodeChunk: pbeth.GasChange_REASON_WITNESS_CODE_CHUNK, + // Polygon don't have Prague witness contract collision check yet and tx data floor + // tracing.GasChangeWitnessContractCollisionCheck: pbeth.GasChange_REASON_WITNESS_CONTRACT_COLLISION_CHECK, + // tracing.GasChangeTxDataFloor: pbeth.GasChange_REASON_TX_DATA_FLOOR, + + // Ignored, we track them manually, [newGasChange] ensure that we panic if we see Unknown + tracing.GasChangeCallOpCode: pbeth.GasChange_REASON_UNKNOWN, +} + +func gasChangeReasonFromChain(reason tracing.GasChangeReason) pbeth.GasChange_Reason { + if r, ok := gasChangeReasonToPb[reason]; ok { + if r == pbeth.GasChange_REASON_UNKNOWN { + panic(fmt.Errorf("tracer gas change reason value '%d' mapped to %s which is not accepted", reason, r)) + } + + return r + } + + panic(fmt.Errorf("unknown tracer gas change reason value '%d', check vm.GasChangeReason so see to which constant it refers to", reason)) +} + +func maxFeePerGas(tx *types.Transaction) *pbeth.BigInt { + switch tx.Type() { + case types.LegacyTxType, types.AccessListTxType: + return nil + + case types.DynamicFeeTxType, types.BlobTxType /*, types.SetCodeTxType*/ : + return firehoseBigIntFromNative(tx.GasFeeCap()) + + } + + panic(errUnhandledTransactionType("maxFeePerGas", tx.Type())) +} + +func maxPriorityFeePerGas(tx *types.Transaction) *pbeth.BigInt { + switch tx.Type() { + case types.LegacyTxType, types.AccessListTxType: + return nil + + case types.DynamicFeeTxType, types.BlobTxType /*, types.SetCodeTxType*/ : + return firehoseBigIntFromNative(tx.GasTipCap()) + } + + panic(errUnhandledTransactionType("maxPriorityFeePerGas", tx.Type())) +} + +func gasPrice(tx *types.Transaction, baseFee *big.Int) *pbeth.BigInt { + switch tx.Type() { + case types.LegacyTxType, types.AccessListTxType: + return firehoseBigIntFromNative(tx.GasPrice()) + + // In the context of dynamic fee transactions, `GasPrice() == GasFeeCap()` + case types.DynamicFeeTxType, types.BlobTxType /*, types.SetCodeTxType*/ : + if baseFee == nil { + return firehoseBigIntFromNative(tx.GasPrice()) + } + + return firehoseBigIntFromNative(bigMin(new(big.Int).Add(tx.GasTipCap(), baseFee), tx.GasFeeCap())) + } + + panic(errUnhandledTransactionType("gasPrice", tx.Type())) +} + +func bigMin(x, y *big.Int) *big.Int { + if x.Cmp(y) > 0 { + return y + } + return x +} + +func FirehoseDebug(msg string, args ...interface{}) { + firehoseDebug(msg, args...) +} + +func firehoseInfo(msg string, args ...interface{}) { + if isFirehoseInfoEnabled { + fmt.Fprintf(os.Stderr, "[Firehose] "+msg+"\n", args...) + } +} + +func firehoseDebug(msg string, args ...interface{}) { + if isFirehoseDebugEnabled { + fmt.Fprintf(os.Stderr, "[Firehose] "+msg+"\n", args...) + } +} + +func firehoseTrace(msg string, args ...interface{}) { + if isFirehoseTraceEnabled { + fmt.Fprintf(os.Stderr, "[Firehose] "+msg+"\n", args...) + } +} + +func firehoseTraceFull(msg string, args ...interface{}) { + if isFirehoseTraceFullEnabled { + fmt.Fprintf(os.Stderr, "[Firehose] "+msg+"\n", args...) + } +} + +// Ignore unused, we keep it around for debugging purposes +var _ = firehoseDebugPrintStack + +func firehoseDebugPrintStack() { + if isFirehoseDebugEnabled { + fmt.Fprintf(os.Stderr, "[Firehose] Stacktrace\n") + + // PrintStack prints to Stderr + debug.PrintStack() + } +} + +func errUnhandledTransactionType(tag string, value uint8) error { + return fmt.Errorf("unhandled transaction type's %d for firehose.%s(), carefully review the patch, if this new transaction type add new fields, think about adding them to Firehose Block format, when you see this message, it means something changed in the chain model and great care and thinking most be put here to properly understand the changes and the consequences they bring for the instrumentation", value, tag) +} + +type Ordinal struct { + value uint64 +} + +// Reset resets the ordinal to zero. +func (o *Ordinal) Reset() { + o.value = 0 +} + +// Next gives you the next sequential ordinal value that you should +// use to assign to your exeuction trace (block, transaction, call, etc). +func (o *Ordinal) Next() (out uint64) { + o.value++ + + return o.value +} + +type CallStack struct { + index uint32 + stack []*pbeth.Call + depth int +} + +func NewCallStack() *CallStack { + return &CallStack{} +} + +func (s *CallStack) Reset() { + s.index = 0 + s.stack = s.stack[:0] + s.depth = 0 +} + +func (s *CallStack) HasActiveCall() bool { + return len(s.stack) > 0 +} + +// Push a call onto the stack. The `Index` and `ParentIndex` of this call are +// assigned by this method which knowns how to find the parent call and deal with +// it. +func (s *CallStack) Push(call *pbeth.Call) { + s.index++ + call.Index = s.index + + call.Depth = uint32(s.depth) + s.depth++ + + // If a current call is active, it's the parent of this call + if parent := s.Peek(); parent != nil { + call.ParentIndex = parent.Index + } + + s.stack = append(s.stack, call) +} + +func (s *CallStack) ActiveIndex() uint32 { + if len(s.stack) == 0 { + return 0 + } + + return s.stack[len(s.stack)-1].Index +} + +func (s *CallStack) NextIndex() uint32 { + return s.index + 1 +} + +func (s *CallStack) Pop() (out *pbeth.Call) { + if len(s.stack) == 0 { + panic(fmt.Errorf("pop from empty call stack")) + } + + out = s.stack[len(s.stack)-1] + s.stack = s.stack[:len(s.stack)-1] + s.depth-- + + return +} + +// Peek returns the top of the stack without removing it, it's the +// activate call. +func (s *CallStack) Peek() *pbeth.Call { + if len(s.stack) == 0 { + return nil + } + + return s.stack[len(s.stack)-1] +} + +// DeferredCallState is a helper struct that can be used to accumulate call's state +// that is recorded before the Call has been started. This happens on the "starting" +// portion of the call/created. +type DeferredCallState struct { + accountCreations []*pbeth.AccountCreation + balanceChanges []*pbeth.BalanceChange + gasChanges []*pbeth.GasChange + nonceChanges []*pbeth.NonceChange + codeChanges []*pbeth.CodeChange +} + +func NewDeferredCallState() *DeferredCallState { + return &DeferredCallState{} +} + +func (d *DeferredCallState) MaybePopulateCallAndReset(source string, call *pbeth.Call) error { + if d.IsEmpty() { + return nil + } + + if source != "root" { + return fmt.Errorf("unexpected source for deferred call state, expected root but got %s, deferred call's state are always produced on the 'root' call", source) + } + + // We must happen because it's populated at beginning of the call as well as at the very end + call.AccountCreations = append(call.AccountCreations, d.accountCreations...) + call.BalanceChanges = append(call.BalanceChanges, d.balanceChanges...) + call.GasChanges = append(call.GasChanges, d.gasChanges...) + call.NonceChanges = append(call.NonceChanges, d.nonceChanges...) + call.CodeChanges = append(call.CodeChanges, d.codeChanges...) + + d.Reset() + + return nil +} + +func (d *DeferredCallState) IsEmpty() bool { + return len(d.accountCreations) == 0 && len(d.balanceChanges) == 0 && len(d.gasChanges) == 0 && len(d.nonceChanges) == 0 && len(d.codeChanges) == 0 +} + +func (d *DeferredCallState) Reset() { + d.accountCreations = nil + d.balanceChanges = nil + d.gasChanges = nil + d.nonceChanges = nil + d.codeChanges = nil +} + +//go:inline +func errorView(err error) _errorView { + return _errorView{err} +} + +type _errorView struct { + err error +} + +func (e _errorView) String() string { + if e.err == nil { + return "" + } + + return `"` + e.err.Error() + `"` +} + +//go:inline +func fromToTxView(from *common.Address, tx *types.Transaction) _fromToView { + return _fromToView{from, tx.To()} +} + +//go:inline +func fromToView(from *common.Address, to *common.Address) _fromToView { + return _fromToView{from, to} +} + +type _fromToView struct { + // from is actually always set + from *common.Address + to *common.Address +} + +func (b _fromToView) String() string { + if b.from == nil && b.to == nil { + return "" + } + + to := "" + if b.to != nil { + to = shortenAddress(b.to) + } + + return fmt.Sprintf("(%s -> %s)", shortenAddress(b.from), to) +} + +//go:inline +func shortAddressView(addr *common.Address) *_shortAddressView { + return (*_shortAddressView)(addr) +} + +type _shortAddressView common.Address + +func (a *_shortAddressView) String() string { + if a == nil { + return "" + } + + return shortenAddress((*common.Address)(a)) +} + +func shortenAddress(addr *common.Address) string { + full := addr.String() + + return full[:6] + ".." + full[len(full)-4:] +} + +type inputView []byte + +func (b inputView) String() string { + if len(b) == 0 { + return "" + } + + if len(b) < 4 { + return common.Bytes2Hex(b) + } + + method := b[:4] + rest := b[4:] + + if len(rest)%32 == 0 { + return fmt.Sprintf("%s (%d params)", common.Bytes2Hex(method), len(rest)/32) + } + + // Contract input starts with pre-defined chracters AFAIK, we could show them more nicely + + return fmt.Sprintf("%d bytes", len(rest)) +} + +type outputView []byte + +func (b outputView) String() string { + if len(b) == 0 { + return "" + } + + return fmt.Sprintf("%d bytes", len(b)) +} + +//go:inline +func receiptView(receipt *types.Receipt) *_receiptView { + return (*_receiptView)(receipt) +} + +type _receiptView types.Receipt + +func (r *_receiptView) String() string { + if r == nil { + return "" + } + + status := "unknown" + switch r.Status { + case types.ReceiptStatusSuccessful: + status = "success" + case types.ReceiptStatusFailed: + status = "failed" + } + + return fmt.Sprintf("[status=%s, gasUsed=%d, logs=%d]", status, r.GasUsed, len(r.Logs)) +} + +func emptyBytesToNil(in []byte) []byte { + if len(in) == 0 { + return nil + } + + return in +} + +func normalizeSignaturePoint(value []byte) []byte { + if len(value) == 0 { + return nil + } + + if len(value) < 32 { + offset := 32 - len(value) + + out := make([]byte, 32) + copy(out[offset:32], value) + + return out + } + + return value[0:32] +} + +func firehoseBigIntFromNative(in *big.Int) *pbeth.BigInt { + if in == nil || in.Sign() == 0 { + return nil + } + + return &pbeth.BigInt{Bytes: in.Bytes()} +} + +type FinalityStatus struct { + LastIrreversibleBlockNumber uint64 + LastIrreversibleBlockHash []byte +} + +func (s *FinalityStatus) populate(finalNumber uint64, finalHash []byte) { + s.LastIrreversibleBlockNumber = finalNumber + s.LastIrreversibleBlockHash = finalHash +} + +func (s *FinalityStatus) populateFromChain(finalHeader *types.Header) { + if finalHeader == nil { + s.Reset() + return + } + + s.LastIrreversibleBlockNumber = finalHeader.Number.Uint64() + s.LastIrreversibleBlockHash = finalHeader.Hash().Bytes() +} + +func (s *FinalityStatus) Reset() { + s.LastIrreversibleBlockNumber = 0 + s.LastIrreversibleBlockHash = nil +} + +func (s *FinalityStatus) IsEmpty() bool { + return s.LastIrreversibleBlockNumber == 0 && len(s.LastIrreversibleBlockHash) == 0 +} + +var errFirehoseUnknownType = errors.New("firehose unknown tx type") +var sanitizeRegexp = regexp.MustCompile(`[\t( ){2,}]+`) + +func staticFirehoseChainValidationOnInit() { + firehoseKnownTxTypes := map[byte]bool{ + types.LegacyTxType: true, + types.AccessListTxType: true, + types.DynamicFeeTxType: true, + types.BlobTxType: true, + //types.SetCodeTxType: true, + } + + for txType := byte(0); txType < 255; txType++ { + err := validateFirehoseKnownTransactionType(txType, firehoseKnownTxTypes[txType]) + if err != nil { + panic(fmt.Errorf(sanitizeRegexp.ReplaceAllString(` + If you see this panic message, it comes from a sanity check of Firehose instrumentation + around Ethereum transaction types. + + Over time, Ethereum added new transaction types but there is no easy way for Firehose to + report a compile time check that a new transaction's type must be handled. As such, we + have a runtime check at initialization of the process that encode/decode each possible + transaction's receipt and check proper handling. + + This panic means that a transaction that Firehose don't know about has most probably + been added and you must take **great care** to instrument it. One of the most important place + to look is in 'firehose.StartTransaction' where it should be properly handled. Think + carefully, read the EIP and ensure that any new "semantic" the transactions type's is + bringing is handled and instrumented (it might affect Block and other execution units also). + + For example, when London fork appeared, semantic of 'GasPrice' changed and it required + a different computation for 'GasPrice' when 'DynamicFeeTx' transaction were added. If you determined + it was indeed a new transaction's type, fix 'firehoseKnownTxTypes' variable above to include it + as a known Firehose type (after proper instrumentation of course). + + It's also possible the test itself is now flaky, we do 'receipt := types.Receipt{Type: }' + then 'buffer := receipt.EncodeRLP(...)' and then 'receipt.DecodeRLP(buffer)'. This should catch + new transaction types but could be now generate false positive. + + Received error: %w + `, " "), err)) + } + } +} + +func validateFirehoseKnownTransactionType(txType byte, isKnownFirehoseTxType bool) error { + writerBuffer := bytes.NewBuffer(nil) + + receipt := types.Receipt{Type: txType} + err := receipt.EncodeRLP(writerBuffer) + if err != nil { + if err == types.ErrTxTypeNotSupported { + if isKnownFirehoseTxType { + return fmt.Errorf("firehose known type but encoding RLP of receipt led to 'types.ErrTxTypeNotSupported'") + } + + // It's not a known type and encoding reported the same, so validation is OK + return nil + } + + // All other cases results in an error as we should have been able to encode it to RLP + return fmt.Errorf("encoding RLP: %w", err) + } + + readerBuffer := bytes.NewBuffer(writerBuffer.Bytes()) + err = receipt.DecodeRLP(rlp.NewStream(readerBuffer, 0)) + if err != nil { + if err == types.ErrTxTypeNotSupported { + if isKnownFirehoseTxType { + return fmt.Errorf("firehose known type but decoding of RLP of receipt led to 'types.ErrTxTypeNotSupported'") + } + + // It's not a known type and decoding reported the same, so validation is OK + return nil + } + + // All other cases results in an error as we should have been able to decode it from RLP + return fmt.Errorf("decoding RLP: %w", err) + } + + // If we reach here, encoding/decoding accepted the transaction's type, so let's ensure we expected the same + if !isKnownFirehoseTxType { + return fmt.Errorf("unknown tx type value %d: %w", txType, errFirehoseUnknownType) + } + + return nil +} + +type validationResult struct { + failures []string +} + +func (r *validationResult) panicOnAnyFailures(msg string, args ...any) { + if len(r.failures) > 0 { + panic(fmt.Errorf(fmt.Sprintf(msg, args...)+": validation failed:\n %s", strings.Join(r.failures, "\n"))) + } +} + +// We keep them around, planning in the future to use them (they existed in the previous Firehose patch) +var _, _, _, _ = validateAddressField, validateBigIntField, validateHashField, validateUint64Field + +func validateAddressField(into *validationResult, field string, a, b common.Address) { + validateField(into, field, a, b, a == b, common.Address.String) +} + +func validateBigIntField(into *validationResult, field string, a, b *big.Int) { + equal := false + if a == nil && b == nil { + equal = true + } else if a == nil || b == nil { + equal = false + } else { + equal = a.Cmp(b) == 0 + } + + validateField(into, field, a, b, equal, func(x *big.Int) string { + if x == nil { + return "" + } else { + return x.String() + } + }) +} + +func validateBytesField(into *validationResult, field string, a, b []byte) { + validateField(into, field, a, b, bytes.Equal(a, b), common.Bytes2Hex) +} + +func validateArrayOfBytesField(into *validationResult, field string, a, b [][]byte) { + if len(a) != len(b) { + into.failures = append(into.failures, fmt.Sprintf("%s [(actual element) %d != %d (expected element)]", field, len(a), len(b))) + return + } + + for i := range a { + validateBytesField(into, fmt.Sprintf("%s[%d]", field, i), a[i], b[i]) + } +} + +func validateHashField(into *validationResult, field string, a, b common.Hash) { + validateField(into, field, a, b, a == b, common.Hash.String) +} + +func validateUint32Field(into *validationResult, field string, a, b uint32) { + validateField(into, field, a, b, a == b, func(x uint32) string { return strconv.FormatUint(uint64(x), 10) }) +} + +func validateUint64Field(into *validationResult, field string, a, b uint64) { + validateField(into, field, a, b, a == b, func(x uint64) string { return strconv.FormatUint(x, 10) }) +} + +// validateField, pays the price for failure message construction only when field are not equal +func validateField[T any](into *validationResult, field string, a, b T, equal bool, toString func(x T) string) { + if !equal { + into.failures = append(into.failures, fmt.Sprintf("%s [(actual) %s %s %s (expected)]", field, toString(a), "!=", toString(b))) + } +} + +func ptr[T any](t T) *T { + return &t +} + +type Memory []byte + +func (m Memory) GetPtrUint256(offset, size *uint256.Int) []byte { + return m.GetPtr(int64(offset.Uint64()), int64(size.Uint64())) +} + +func (m Memory) GetPtr(offset, size int64) []byte { + if size == 0 { + return nil + } + + if len(m) >= (int(offset) + int(size)) { + return m[offset : offset+size] + } + + // The EVM does memory expansion **after** notifying us about OnOpcode which we use + // to compute Keccak256 pre-images now. This creates problem when we want to retrieve + // the preimage data because the memory is not expanded yet but in the EVM is going to + // work because the memory is going to be expanded before the operation is actually + // executed so the memory will be of the correct size. + // + // In this situtation, we must pad with zeroes when the memory is not big enough. + reminder := m[offset:] + return append(reminder, make([]byte, int(size)-len(reminder))...) +} diff --git a/eth/tracers/firehose_test.go b/eth/tracers/firehose_test.go new file mode 100644 index 0000000000..eeff3d333e --- /dev/null +++ b/eth/tracers/firehose_test.go @@ -0,0 +1,545 @@ +package tracers + +import ( + "encoding/json" + "fmt" + "math" + "math/big" + "os" + "reflect" + "regexp" + "slices" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/tracing" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/params" + pbeth "github.com/streamingfast/firehose-ethereum/types/pb/sf/ethereum/type/v2" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "golang.org/x/exp/maps" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/timestamppb" +) + +func TestFirehoseCallStack_Push(t *testing.T) { + type actionRunner func(t *testing.T, s *CallStack) + + push := func(call *pbeth.Call) actionRunner { return func(_ *testing.T, s *CallStack) { s.Push(call) } } + pop := func() actionRunner { return func(_ *testing.T, s *CallStack) { s.Pop() } } + check := func(r actionRunner) actionRunner { return func(t *testing.T, s *CallStack) { r(t, s) } } + + tests := []struct { + name string + actions []actionRunner + }{ + { + "push/pop emtpy", []actionRunner{ + push(&pbeth.Call{}), + pop(), + check(func(t *testing.T, s *CallStack) { + require.Len(t, s.stack, 0) + }), + }, + }, + { + "push/push/push", []actionRunner{ + push(&pbeth.Call{}), + push(&pbeth.Call{}), + push(&pbeth.Call{}), + check(func(t *testing.T, s *CallStack) { + require.Len(t, s.stack, 3) + + require.Equal(t, 1, int(s.stack[0].Index)) + require.Equal(t, 0, int(s.stack[0].ParentIndex)) + + require.Equal(t, 2, int(s.stack[1].Index)) + require.Equal(t, 1, int(s.stack[1].ParentIndex)) + + require.Equal(t, 3, int(s.stack[2].Index)) + require.Equal(t, 2, int(s.stack[2].ParentIndex)) + }), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + s := NewCallStack() + + for _, action := range tt.actions { + action(t, s) + } + }) + } +} + +func Test_validateKnownTransactionTypes(t *testing.T) { + tests := []struct { + name string + txType byte + knownType bool + want error + }{ + {"legacy", 0, true, nil}, + {"access_list", 1, true, nil}, + {"inexistant", 255, false, nil}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := validateFirehoseKnownTransactionType(tt.txType, tt.knownType) + if tt.want == nil && err != nil { + t.Fatalf("Transaction of type %d expected to validate properly but received error %q", tt.txType, err) + } else if tt.want != nil && err == nil { + t.Fatalf("Transaction of type %d expected to validate improperly but generated no error", tt.txType) + } else if tt.want != nil && err != nil && tt.want.Error() != err.Error() { + t.Fatalf("Transaction of type %d expected to validate improperly but generated error %q does not match expected error %q", tt.txType, err, tt.want) + } + }) + } +} + +var ignorePbFieldNames = map[string]bool{ + "Hash": true, + "TotalDifficulty": true, + "state": true, + "unknownFields": true, + "sizeCache": true, + + // This was a Polygon specific field that existed for a while and has since been + // removed. It can be safely ignored in all protocols now. + "TxDependency": true, +} + +var pbFieldNameToGethMapping = map[string]string{ + "WithdrawalsRoot": "WithdrawalsHash", + "MixHash": "MixDigest", + "BaseFeePerGas": "BaseFee", + "StateRoot": "Root", + "ExtraData": "Extra", + "Timestamp": "Time", + "ReceiptRoot": "ReceiptHash", + "TransactionsRoot": "TxHash", + "LogsBloom": "Bloom", +} + +var ( + pbHeaderType = reflect.TypeFor[pbeth.BlockHeader]() + gethHeaderType = reflect.TypeFor[types.Header]() +) + +func Test_TypesHeader_AllConsensusFieldsAreKnown(t *testing.T) { + // This exact hash varies from protocol to protocol and also sometimes from one version to the other. + // When adding support for a new hard-fork that adds new block header fields, it's normal that this value + // changes. If you are sure the two struct are the same, then you can update the expected hash below + // to the new value. + expectedHash := common.HexToHash("4ced4916132bbf6a7819a310bbac4abf354062a00efc980ea4f0bab406546ac5") + + gethHeaderValue := reflect.New(gethHeaderType) + fillAllFieldsWithNonEmptyValues(t, gethHeaderValue, reflect.VisibleFields(gethHeaderType)) + gethHeader := gethHeaderValue.Interface().(*types.Header) + + // If you hit this assertion, it means that the fields `types.Header` of go-ethereum differs now + // versus last time this test was edited. + // + // It's important to understand that in Ethereum Block Header (e.g. `*types.Header`), the `Hash` is + // actually a computed value based on the other fields in the struct, so if you change any field, + // the hash will change also. + // + // On hard-fork, it happens that new fields are added, this test serves as a way to "detect" in code + // that the expected fields of `types.Header` changed + require.Equal(t, expectedHash, gethHeader.Hash(), + "Geth Header Hash mismatch, got %q but expecting %q on *types.Header:\n\nGeth Header (from fillNonDefault(new(*types.Header)))\n%s", + gethHeader.Hash().Hex(), + expectedHash, + asIndentedJSON(t, gethHeader), + ) +} + +func Test_FirehoseAndGethHeaderFieldMatches(t *testing.T) { + pbFields := filter(reflect.VisibleFields(pbHeaderType), func(f reflect.StructField) bool { + return !ignorePbFieldNames[f.Name] + }) + + gethFields := reflect.VisibleFields(gethHeaderType) + + pbFieldCount := len(pbFields) + gethFieldCount := len(gethFields) + + pbFieldNames := extractStructFieldNames(pbFields) + gethFieldNames := extractStructFieldNames(gethFields) + + // If you reach this assertion, it means that the fields count in the protobuf and go-ethereum are different. + // It is super important that you properly update the mapping from pbeth.BlockHeader to go-ethereum/core/types.Header + // that is done in `codecHeaderToGethHeader` function in `executor/provider_statedb.go`. + require.Equal( + t, + pbFieldCount, + gethFieldCount, + fieldsCountMismatchMessage(t, pbFieldNames, gethFieldNames)) + + for pbFieldName := range pbFieldNames { + pbFieldRenamedName, found := pbFieldNameToGethMapping[pbFieldName] + if !found { + pbFieldRenamedName = pbFieldName + } + + assert.Contains(t, gethFieldNames, pbFieldRenamedName, "pbField.Name=%q (original %q) not found in gethFieldNames", pbFieldRenamedName, pbFieldName) + } +} + +var endsWithUnknownConstant = regexp.MustCompile(`.*\(\d+\)$`) + +func TestFirehose_BalanceChangeAllMappedCorrectly(t *testing.T) { + + for i := 0; i <= math.MaxUint8; i++ { + tracingReason := tracing.BalanceChangeReason(i) + if tracingReason == tracing.BalanceChangeUnspecified || tracingReason == tracing.BalanceChangeRevert { + // Should never happen in Firehose tracer, only if tracer is wrapped with [tracing.WrapWithJournal] + continue + } + + // Here, we leverage the fact that the `tracing.BalanceChangeReason` Stringer will render the String + // as `()` if the index is not mapped to a constant in the enum. If this happens, + // we know it's not a defined constant in the Geth tracing package. + // + // Otherwise, it's defined and we should have some mapping for it in the `balanceChangeReasonFromChain` function. + // + // There is a loophole of this technique and it's that if the code generator defining the enum Stringer is + // not run, we will think it's an undefined constant and will miss it. + if !endsWithUnknownConstant.MatchString(tracingReason.String()) { + require.NotPanics(t, func() { + balanceChangeReasonFromChain(tracingReason) + }, "BalanceChangeReason panicked for value %v", tracingReason) + } + } +} + +func TestFirehose_GasChangeAllMappedCorrectly(t *testing.T) { + for i := 0; i <= math.MaxUint8; i++ { + tracingReason := tracing.GasChangeReason(i) + + // Those are ignored and never mapped + if tracingReason == tracing.GasChangeUnspecified || tracingReason == tracing.GasChangeCallOpCode || tracingReason == tracing.GasChangeIgnored { + continue + } + + // Here, we leverage the fact that the `tracing.GasChangeReason` Stringer will render the String + // as `()` if the index is not mapped to a constant in the enum. If this happens, + // we know it's not a defined constant in the Geth tracing package. + // + // Otherwise, it's defined and we should have some mapping for it in the `gasChangeReasonFromChain` function. + // + // There is a loophole of this technique and it's that if the code generator defining the enum Stringer is + // not run, we will think it's an undefined constant and will miss it. + if !endsWithUnknownConstant.MatchString(tracingReason.String()) { + require.NotPanics(t, func() { + gasChangeReasonFromChain(tracingReason) + }, "GasChangeReason panicked for value %v", tracingReason) + } + } +} + +func fillAllFieldsWithNonEmptyValues(t *testing.T, structValue reflect.Value, fields []reflect.StructField) { + t.Helper() + + for _, field := range fields { + fieldValue := structValue.Elem().FieldByName(field.Name) + require.True(t, fieldValue.IsValid(), "field %q not found", field.Name) + + switch fieldValue.Interface().(type) { + case []byte: + fieldValue.Set(reflect.ValueOf([]byte{1})) + case uint64: + fieldValue.Set(reflect.ValueOf(uint64(1))) + case *uint64: + var mockValue uint64 = 1 + fieldValue.Set(reflect.ValueOf(&mockValue)) + case *common.Hash: + var mockValue common.Hash = common.HexToHash("0x01") + fieldValue.Set(reflect.ValueOf(&mockValue)) + case common.Hash: + fieldValue.Set(reflect.ValueOf(common.HexToHash("0x01"))) + case common.Address: + fieldValue.Set(reflect.ValueOf(common.HexToAddress("0x01"))) + case types.Bloom: + fieldValue.Set(reflect.ValueOf(types.BytesToBloom([]byte{1}))) + case types.BlockNonce: + fieldValue.Set(reflect.ValueOf(types.EncodeNonce(1))) + case *big.Int: + fieldValue.Set(reflect.ValueOf(big.NewInt(1))) + case *pbeth.BigInt: + fieldValue.Set(reflect.ValueOf(&pbeth.BigInt{Bytes: []byte{1}})) + case *timestamppb.Timestamp: + fieldValue.Set(reflect.ValueOf(×tamppb.Timestamp{Seconds: 1})) + default: + // If you reach this panic in test, simply add a case above with a sane non-default + // value for the type in question. + t.Fatalf("unsupported type %T", fieldValue.Interface()) + } + } +} + +func fieldsCountMismatchMessage(t *testing.T, pbFieldNames map[string]bool, gethFieldNames map[string]bool) string { + t.Helper() + + pbRemappedFieldNames := make(map[string]bool, len(pbFieldNames)) + for pbFieldName := range pbFieldNames { + pbFieldRenamedName, found := pbFieldNameToGethMapping[pbFieldName] + if !found { + pbFieldRenamedName = pbFieldName + } + + pbRemappedFieldNames[pbFieldRenamedName] = true + } + + return fmt.Sprintf( + "Field count mistmatch between `pbeth.BlockHeader` (has %d fields) and `*types.Header` (has %d fields)\n\n"+ + "Fields in `pbeth.Blockheader`:\n%s\n\n"+ + "Fields in `*types.Header`:\n%s\n\n"+ + "Missing in `pbeth.BlockHeader`:\n%s\n\n"+ + "Missing in `*types.Header`:\n%s", + len(pbRemappedFieldNames), + len(gethFieldNames), + asIndentedJSON(t, maps.Keys(pbRemappedFieldNames)), + asIndentedJSON(t, maps.Keys(gethFieldNames)), + asIndentedJSON(t, missingInSet(gethFieldNames, pbRemappedFieldNames)), + asIndentedJSON(t, missingInSet(pbRemappedFieldNames, gethFieldNames)), + ) +} + +func asIndentedJSON(t *testing.T, v any) string { + t.Helper() + out, err := json.MarshalIndent(v, "", " ") + require.NoError(t, err) + + return string(out) +} + +func missingInSet(a, b map[string]bool) []string { + missing := make([]string, 0) + for name := range a { + if !b[name] { + missing = append(missing, name) + } + } + + return missing +} + +func extractStructFieldNames(fields []reflect.StructField) map[string]bool { + result := make(map[string]bool, len(fields)) + for _, field := range fields { + result[field.Name] = true + } + return result +} + +func filter[S ~[]T, T any](s S, f func(T) bool) (out S) { + out = make(S, 0, len(s)/4) + for i, v := range s { + if f(v) { + out = append(out, s[i]) + } + } + + return out +} + +func TestFirehose_reorderIsolatedTransactionsAndOrdinals(t *testing.T) { + tests := []struct { + name string + populate func(t *Firehose) + expectedBlockFile string + }{ + { + name: "empty", + populate: func(t *Firehose) { + t.OnBlockStart(blockEvent(1)) + + // Simulated GetTxTracer being called + t.blockReorderOrdinalOnce.Do(func() { + t.blockReorderOrdinal = true + t.blockReorderOrdinalSnapshot = t.blockOrdinal.value + }) + + t.blockOrdinal.Reset() + t.onTxStart(txEvent(), hex2Hash("CC"), from, to) + t.OnCallEnter(0, byte(vm.CALL), from, to, nil, 0, nil) + t.OnBalanceChange(empty, b(1), b(2), 0) + t.OnCallExit(0, nil, 0, nil, false) + t.OnTxEnd(txReceiptEvent(2), nil) + + t.blockOrdinal.Reset() + t.onTxStart(txEvent(), hex2Hash("AA"), from, to) + t.OnCallEnter(0, byte(vm.CALL), from, to, nil, 0, nil) + t.OnBalanceChange(empty, b(1), b(2), 0) + t.OnCallExit(0, nil, 0, nil, false) + t.OnTxEnd(txReceiptEvent(0), nil) + + t.blockOrdinal.Reset() + t.onTxStart(txEvent(), hex2Hash("BB"), from, to) + t.OnCallEnter(0, byte(vm.CALL), from, to, nil, 0, nil) + t.OnBalanceChange(empty, b(1), b(2), 0) + t.OnCallExit(0, nil, 0, nil, false) + t.OnTxEnd(txReceiptEvent(1), nil) + }, + expectedBlockFile: "testdata/firehose/reorder-ordinals-empty.golden.json", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + f := NewFirehose(&FirehoseConfig{ + ApplyBackwardCompatibility: ptr(false), + }) + f.OnBlockchainInit(params.AllEthashProtocolChanges) + + tt.populate(f) + + f.reorderIsolatedTransactionsAndOrdinals() + + goldenUpdate := os.Getenv("GOLDEN_UPDATE") == "true" + goldenPath := tt.expectedBlockFile + + if !goldenUpdate && !fileExits(t, goldenPath) { + t.Fatalf("the golden file %q does not exist, re-run with 'GOLDEN_UPDATE=true go test ./... -run %q' to generate the intial version", goldenPath, t.Name()) + } + + content, err := protojson.MarshalOptions{Indent: " "}.Marshal(f.block) + require.NoError(t, err) + + if goldenUpdate { + require.NoError(t, os.WriteFile(goldenPath, content, os.ModePerm)) + } + + expected, err := os.ReadFile(goldenPath) + require.NoError(t, err) + + expectedBlock := &pbeth.Block{} + protojson.Unmarshal(expected, expectedBlock) + + if !proto.Equal(expectedBlock, f.block) { + assert.Equal(t, expectedBlock, f.block, "Run 'GOLDEN_UPDATE=true go test ./... -run %q' to update golden file", t.Name()) + } + + seenOrdinals := make(map[uint64]int) + + walkChanges(f.block.BalanceChanges, seenOrdinals) + walkChanges(f.block.CodeChanges, seenOrdinals) + walkCalls(f.block.SystemCalls, seenOrdinals) + + for _, trx := range f.block.TransactionTraces { + seenOrdinals[trx.BeginOrdinal] = seenOrdinals[trx.BeginOrdinal] + 1 + seenOrdinals[trx.EndOrdinal] = seenOrdinals[trx.EndOrdinal] + 1 + walkCalls(trx.Calls, seenOrdinals) + } + + // No ordinal should be seen more than once + for ordinal, count := range seenOrdinals { + assert.Equal(t, 1, count, "Ordinal %d seen %d times", ordinal, count) + } + + ordinals := maps.Keys(seenOrdinals) + slices.Sort(ordinals) + + // All ordinals should be in strictly increasing order + prev := -1 + for _, ordinal := range ordinals { + if prev != -1 { + assert.Equal(t, prev+1, int(ordinal), "Ordinal %d is not in sequence", ordinal) + } + } + }) + } +} + +func walkCalls(calls []*pbeth.Call, ordinals map[uint64]int) { + for _, call := range calls { + walkCall(call, ordinals) + } +} + +func walkCall(call *pbeth.Call, ordinals map[uint64]int) { + ordinals[call.BeginOrdinal] = ordinals[call.BeginOrdinal] + 1 + ordinals[call.EndOrdinal] = ordinals[call.EndOrdinal] + 1 + + walkChanges(call.BalanceChanges, ordinals) + walkChanges(call.CodeChanges, ordinals) + walkChanges(call.Logs, ordinals) + walkChanges(call.StorageChanges, ordinals) + walkChanges(call.NonceChanges, ordinals) + walkChanges(call.GasChanges, ordinals) +} + +func walkChanges[T any](changes []T, ordinals map[uint64]int) { + for _, change := range changes { + var x any = change + if v, ok := x.(interface{ GetOrdinal() uint64 }); ok { + ordinals[v.GetOrdinal()] = ordinals[v.GetOrdinal()] + 1 + } + } +} + +var b = big.NewInt +var empty, from, to = common.HexToAddress("00"), common.HexToAddress("01"), common.HexToAddress("02") +var hex2Hash = common.HexToHash + +func fileExits(t *testing.T, path string) bool { + t.Helper() + stat, err := os.Stat(path) + return err == nil && !stat.IsDir() +} + +func txEvent() *types.Transaction { + return types.NewTx(&types.LegacyTx{ + Nonce: 0, + GasPrice: big.NewInt(1), + Gas: 1, + To: &to, + Value: big.NewInt(1), + Data: nil, + V: big.NewInt(1), + R: big.NewInt(1), + S: big.NewInt(1), + }) +} + +func txReceiptEvent(txIndex uint) *types.Receipt { + return &types.Receipt{ + Status: 1, + TransactionIndex: txIndex, + } +} + +func blockEvent(height uint64) tracing.BlockEvent { + return tracing.BlockEvent{ + Block: types.NewBlock(&types.Header{ + Number: big.NewInt(int64(height)), + }, nil, nil, nil), + } +} + +func TestMemory_GetPtr(t *testing.T) { + type args struct { + offset int64 + size int64 + } + tests := []struct { + name string + m Memory + args args + want []byte + }{ + {"memory is just a bit too small", Memory([]byte{1, 2, 3}), args{0, 4}, []byte{1, 2, 3, 0}}, + {"memory is flushed with request", Memory([]byte{1, 2, 3, 4}), args{0, 4}, []byte{1, 2, 3, 4}}, + {"memory is just a bit too big", Memory([]byte{1, 2, 3, 4, 5}), args{0, 4}, []byte{1, 2, 3, 4}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equal(t, tt.want, tt.m.GetPtr(tt.args.offset, tt.args.size)) + }) + } +} diff --git a/eth/tracers/internal/tracetest/firehose/blockchain_test.go b/eth/tracers/internal/tracetest/firehose/blockchain_test.go new file mode 100644 index 0000000000..943da49d21 --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/blockchain_test.go @@ -0,0 +1,97 @@ +package firehose_test + +import ( + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/rawdb" + "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/tracing" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/rlp" + "github.com/ethereum/go-ethereum/tests" + "github.com/ethereum/go-ethereum/trie" + "github.com/stretchr/testify/require" +) + +func runPrestateBlock(t *testing.T, prestatePath string, hooks *tracing.Hooks) { + t.Helper() + + prestate := readPrestateData(t, prestatePath) + + tx := new(types.Transaction) + require.NoError(t, rlp.DecodeBytes(common.FromHex(prestate.Input), tx)) + + context := prestate.Context.toBlockContext(prestate.Genesis) + + testState := tests.MakePreState(rawdb.NewMemoryDatabase(), prestate.Genesis.Alloc, false, rawdb.HashScheme) + defer testState.Close() + + state.NewHookedState(testState.StateDB, hooks) + + // testState.StateDB.SetLogger(hooks) + testState.StateDB.SetTxContext(tx.Hash(), 0) + + block := types.NewBlock(&types.Header{ + ParentHash: prestate.Genesis.ToBlock().Hash(), + Number: context.BlockNumber, + Difficulty: context.Difficulty, + Coinbase: context.Coinbase, + Time: context.Time, + GasLimit: context.GasLimit, + BaseFee: context.BaseFee, + ParentBeaconRoot: ptr(common.Hash{}), + }, &types.Body{ + Transactions: []*types.Transaction{tx}, + }, nil, trie.NewStackTrie(nil)) + + if hooks.OnBlockchainInit != nil { + hooks.OnBlockchainInit(prestate.Genesis.Config) + } + + if hooks.OnBlockStart != nil { + hooks.OnBlockStart(tracing.BlockEvent{ + Block: block, + }) + } + + header := block.Header() + msg, err := core.TransactionToMessage(tx, types.MakeSigner(prestate.Genesis.Config, header.Number, header.Time), header.BaseFee) + require.NoError(t, err) + + blockContext := core.NewEVMBlockContext(block.Header(), prestate, &context.Coinbase) + vmenv := vm.NewEVM(blockContext, state.NewHookedState(testState.StateDB, hooks), prestate.Genesis.Config, vm.Config{Tracer: hooks}) + + usedGas := uint64(0) + _, err = core.ApplyTransactionWithEVM( + msg, + new(core.GasPool).AddGas(block.GasLimit()), + testState.StateDB, + header.Number, + header.Hash(), + tx, + &usedGas, + vmenv, + ) + require.NoError(t, err) + + if hooks.OnBlockEnd != nil { + hooks.OnBlockEnd(nil) + } +} + +var _ core.Validator = (*ignoreValidateStateValidator)(nil) + +type ignoreValidateStateValidator struct { + core.Validator +} + +func (v ignoreValidateStateValidator) ValidateBody(block *types.Block) error { + return v.Validator.ValidateBody(block) +} + +func (v ignoreValidateStateValidator) ValidateState(block *types.Block, state *state.StateDB, res *core.ProcessResult, stateless bool) error { + return nil +} diff --git a/eth/tracers/internal/tracetest/firehose/firehose_test.go b/eth/tracers/internal/tracetest/firehose/firehose_test.go new file mode 100644 index 0000000000..b226241996 --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/firehose_test.go @@ -0,0 +1,209 @@ +package firehose_test + +import ( + "math/big" + "path/filepath" + "strings" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/consensus" + "github.com/ethereum/go-ethereum/consensus/beacon" + "github.com/ethereum/go-ethereum/consensus/ethash" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/rawdb" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/core/vm/program" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/params" + "github.com/holiman/uint256" + "github.com/stretchr/testify/require" +) + +type tracingModel string + +const ( + tracingModelFirehose2_3 tracingModel = "fh2.3" + tracingModelFirehose3_0 tracingModel = "fh3.0" +) + +var tracingModels = []tracingModel{tracingModelFirehose2_3, tracingModelFirehose3_0} + +func TestFirehosePrestate(t *testing.T) { + testFolders := []string{ + "./testdata/TestFirehosePrestate/keccak256_too_few_memory_bytes_get_padded", + "./testdata/TestFirehosePrestate/keccak256_wrong_diff", + "./testdata/TestFirehosePrestate/suicide_double_withdraw", + "./testdata/TestFirehosePrestate/extra_account_creations", + } + + for _, folder := range testFolders { + name := filepath.Base(folder) + + for _, model := range tracingModels { + t.Run(string(model)+"/"+name, func(t *testing.T) { + tracer, tracingHooks, onClose := newFirehoseTestTracer(t, model) + defer onClose() + + runPrestateBlock(t, filepath.Join(folder, "prestate.json"), tracingHooks) + + genesisLine, blockLines, unknownLines := readTracerFirehoseLines(t, tracer) + require.Len(t, unknownLines, 0, "Lines:\n%s", strings.Join(slicesMap(unknownLines, func(l unknownLine) string { return "- '" + string(l) + "'" }), "\n")) + require.NotNil(t, genesisLine) + blockLines.assertOnlyBlockEquals(t, filepath.Join(folder, string(model)), 1) + }) + } + + } + +} +func TestFirehose_EIP7702(t *testing.T) { + // Copied from ./core/blockchain_test.go#L4180 (TestEIP7702) + + var ( + config = *params.MergedTestChainConfig + signer = types.LatestSigner(&config) + engine = beacon.New(ethash.NewFaker()) + key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") + key2, _ = crypto.HexToECDSA("8a1f9a8f95be41cd7ccb6168179afb4504aefe388d1e14474d32c45c72ce7b7a") + addr1 = crypto.PubkeyToAddress(key1.PublicKey) + addr2 = crypto.PubkeyToAddress(key2.PublicKey) + aa = common.HexToAddress("0x000000000000000000000000000000000000aaaa") + bb = common.HexToAddress("0x000000000000000000000000000000000000bbbb") + cc = common.HexToAddress("0x000000000000000000000000000000000000cccc") + funds = new(big.Int).Mul(common.Big1, big.NewInt(params.Ether)) + ) + + gspec := &core.Genesis{ + Config: &config, + Alloc: types.GenesisAlloc{ + addr1: {Balance: funds}, + addr2: {Balance: funds}, + aa: { // The address 0xAAAA calls into addr2 + Code: program.New().Call(nil, addr2, 1, 0, 0, 0, 0).Bytes(), + Nonce: 0, + Balance: big.NewInt(0), + }, + bb: { // The address 0xBBBB sstores 42 into slot 42. + Code: program.New().Sstore(0x42, 0x42).Bytes(), + Nonce: 0, + Balance: big.NewInt(0), + }, + cc: { // The address 0xCCCC sstores 42 into slot 42. + Code: program.New().Sstore(0x42, 0x42).Bytes(), + Nonce: 0, + Balance: big.NewInt(0), + }, + }, + } + + // Sign authorization tuples. + // The way the auths are combined, it becomes + // 1. tx -> addr1 which is delegated to 0xaaaa + // 2. addr1:0xaaaa calls into addr2:0xbbbb + // 3. addr2:0xbbbb writes to storage + auth1, _ := types.SignSetCode(key1, types.SetCodeAuthorization{ + ChainID: *uint256.MustFromBig(gspec.Config.ChainID), + Address: aa, + Nonce: 1, + }) + auth2OverwrittenLaterInList, _ := types.SignSetCode(key2, types.SetCodeAuthorization{ + Address: cc, + Nonce: 0, + }) + auth3InvalidAuthority := auth2OverwrittenLaterInList + auth3InvalidAuthority.V = 4 + auth4, _ := types.SignSetCode(key2, types.SetCodeAuthorization{ + Address: bb, + Nonce: 1, + }) + auth5InvalidNonce, _ := types.SignSetCode(key2, types.SetCodeAuthorization{ + Address: bb, + Nonce: 1, + }) + + auth1Reset, _ := types.SignSetCode(key1, types.SetCodeAuthorization{ + ChainID: *uint256.MustFromBig(gspec.Config.ChainID), + Address: common.Address{}, + Nonce: 4, + }) + + _, blocks, _ := core.GenerateChainWithGenesis(gspec, engine, 3, func(i int, b *core.BlockGen) { + b.SetCoinbase(aa) + + if i == 0 { + txdata := &types.SetCodeTx{ + ChainID: uint256.MustFromBig(gspec.Config.ChainID), + Nonce: 0, + To: addr1, + Gas: 500000, + GasFeeCap: uint256.MustFromBig(newGwei(5)), + GasTipCap: uint256.NewInt(2), + AuthList: []types.SetCodeAuthorization{auth1, auth2OverwrittenLaterInList, auth3InvalidAuthority, auth4, auth5InvalidNonce}, + } + tx := types.MustSignNewTx(key1, signer, txdata) + b.AddTx(tx) + } else if i == 1 { + txdata := &types.LegacyTx{ + Nonce: 2, + To: &addr1, + Value: big.NewInt(0), + Gas: 500000, + GasPrice: newGwei(500), + } + tx := types.MustSignNewTx(key1, signer, txdata) + b.AddTx(tx) + } else if i == 2 { + txdata := &types.SetCodeTx{ + ChainID: uint256.MustFromBig(gspec.Config.ChainID), + Nonce: 3, + To: addr1, + Gas: 500000, + GasFeeCap: uint256.MustFromBig(newGwei(5)), + GasTipCap: uint256.NewInt(2), + AuthList: []types.SetCodeAuthorization{auth1Reset}, + } + tx := types.MustSignNewTx(key1, signer, txdata) + b.AddTx(tx) + } + }) + + testBlockTracesCorrectly(t, gspec, engine, blocks, "TestEIP7702") +} + +func TestFirehose_SystemCalls(t *testing.T) { + gspec := &core.Genesis{ + Config: params.MergedTestChainConfig, + } + + engine := beacon.New(ethash.NewFaker()) + _, blocks, _ := core.GenerateChainWithGenesis(gspec, engine, 1, func(i int, b *core.BlockGen) {}) + + testBlockTracesCorrectly(t, gspec, engine, blocks, "TestSystemCalls") +} + +func testBlockTracesCorrectly(t *testing.T, genesisSpec *core.Genesis, engine consensus.Engine, blocks []*types.Block, goldenDir string) { + t.Helper() + + for _, model := range tracingModels { + t.Run(string(model), func(t *testing.T) { + tracer, tracingHooks, onClose := newFirehoseTestTracer(t, model) + defer onClose() + + chain, err := core.NewBlockChain(rawdb.NewMemoryDatabase(), nil, genesisSpec, nil, engine, vm.Config{Tracer: tracingHooks}, nil) + require.NoError(t, err, "failed to create tester chain") + + chain.SetBlockValidatorAndProcessorForTesting( + ignoreValidateStateValidator{core.NewBlockValidator(genesisSpec.Config, chain)}, + core.NewStateProcessor(genesisSpec.Config, chain.HeaderChain()), + ) + + defer chain.Stop() + n, err := chain.InsertChain(blocks) + require.NoError(t, err, "failed to insert chain block %d", n) + + assertBlockEquals(t, tracer, filepath.Join("testdata", goldenDir, string(model)), len(blocks)) + }) + } +} diff --git a/eth/tracers/internal/tracetest/firehose/generate-prestate/main.go b/eth/tracers/internal/tracetest/firehose/generate-prestate/main.go new file mode 100644 index 0000000000..49eb428b6f --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/generate-prestate/main.go @@ -0,0 +1,261 @@ +package main + +import ( + "bytes" + "context" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "math/big" + "os" + "strings" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/params" + "github.com/ethereum/go-ethereum/rlp" + "github.com/ethereum/go-ethereum/rpc" + "golang.org/x/exp/maps" +) + +var configByName = map[string]*params.ChainConfig{ + "mainnet": params.MainnetChainConfig, + "sepolia": params.SepoliaChainConfig, + "holesky": params.HoleskyChainConfig, +} + +func main() { + ensure(len(os.Args) == 3, "Usage: generate-prestate ") + + config, found := configByName[os.Args[1]] + ensure(found, "Unknown network %q, valid networks are %q", os.Args[1], strings.Join(maps.Keys(configByName), ", ")) + + endpoint := os.Getenv("ARCHIVE_ENDPOINT") + ensure(endpoint != "", "ARCHIVE_ENDPOINT environment variable is not set") + + txHash := common.HexToHash(os.Args[2]) + ensure(txHash.Big().Sign() != 0, "Argument %q is not a valid transaction hash", os.Args[1]) + + client, err := rpc.DialOptions(context.Background(), endpoint) + noError(err, "Failed to connect to RPC server") + + log("Fetching transaction %q...", txHash.Hex()) + tx, blockHash, err := transactionByHash(context.Background(), client, txHash) + noError(err, "Failed to get transaction %q by hash", txHash) + + log("Fetching block %q...", txHash.Hex()) + block, err := blockByHash(context.Background(), client, blockHash) + noError(err, "Failed to get block %q by hash", blockHash) + + log("Fetching parent block %q...", txHash.Hex()) + parentBlock, err := blockByHash(context.Background(), client, block.ParentHash()) + noError(err, "Failed to get parent block %q by hash", block.ParentHash()) + + log("Collecting transaction prestate trace...") + var prestateTrace types.GenesisAlloc + err = client.Call(&prestateTrace, "debug_traceTransaction", txHash, map[string]interface{}{ + "tracer": "prestateTracer", + }) + noError(err, "Failed to trace transaction %q with prestateTracer", txHash) + + prestateTest := &PrestateTest{ + // Our genesis block is the parent block + Genesis: parentBlock, + Block: block, + Alloc: prestateTrace, + Config: config, + Tx: tx, + } + + output, err := json.MarshalIndent(prestateTest, "", " ") + noError(err, "Failed to marshal prestate test to JSON") + + fmt.Println(string(output)) +} + +type PrestateTest struct { + Genesis *rpcBlock + Block *rpcBlock + Alloc types.GenesisAlloc + Config *params.ChainConfig + Tx *types.Transaction +} + +func (b *PrestateTest) MarshalJSON() ([]byte, error) { + genesis := b.Genesis.Fields + + for k, v := range genesis { + if v == nil { + delete(genesis, k) + } + } + + delete(genesis, "gasUsed") + delete(genesis, "logsBloom") + delete(genesis, "parentHash") + delete(genesis, "receiptsRoot") + delete(genesis, "sha3Uncles") + delete(genesis, "size") + delete(genesis, "transactions") + delete(genesis, "transactionsRoot") + delete(genesis, "uncles") + + genesis["gasLimit"] = hexToIntegerString(genesis["gasLimit"].(string)) + genesis["number"] = hexToIntegerString(genesis["number"].(string)) + genesis["timestamp"] = hexToIntegerString(genesis["timestamp"].(string)) + genesis["difficulty"] = hexToIntegerString(genesis["difficulty"].(string)) + if genesis["totalDifficulty"] != nil { + genesis["totalDifficulty"] = hexToIntegerString(genesis["totalDifficulty"].(string)) + } else { + // Total Difficulty has been nuked from the codebase, so we might not have it anymore + genesis["totalDifficulty"] = "0" + } + + if found := genesis["baseFeePerGas"]; found != nil { + genesis["baseFeePerGas"] = hexToIntegerString(genesis["baseFeePerGas"].(string)) + } + + marshaledAlloc, err := json.Marshal(b.Alloc) + if err != nil { + return nil, err + } + + var allocOut map[string]any + if err = json.Unmarshal(marshaledAlloc, &allocOut); err != nil { + return nil, err + } + + for _, account := range allocOut { + details := account.(map[string]any) + for k, v := range details { + if k == "nonce" { + details["nonce"] = hexToIntegerString(v.(string)) + } + } + } + + genesis["alloc"] = allocOut + genesis["config"] = b.Config + + context := map[string]any{ + "number": hexToIntegerString(b.Block.Fields["number"].(string)), + "difficulty": hexToIntegerString(b.Block.Fields["difficulty"].(string)), + "timestamp": hexToIntegerString(b.Block.Fields["timestamp"].(string)), + "gasLimit": hexToIntegerString(b.Block.Fields["gasLimit"].(string)), + "miner": b.Block.Fields["miner"], + } + + if found := b.Block.Fields["baseFeePerGas"]; found != nil { + context["baseFeePerGas"] = hexToIntegerString(b.Block.Fields["baseFeePerGas"].(string)) + } + + txBuffer := bytes.NewBuffer(nil) + rlp.Encode(txBuffer, b.Tx) + + out := map[string]any{} + out["genesis"] = genesis + out["context"] = context + out["input"] = "0x" + hex.EncodeToString(txBuffer.Bytes()) + + return json.Marshal(out) +} + +func hexToIntegerString(in string) string { + value := math.HexOrDecimal256{} + noError(value.UnmarshalText([]byte(in)), "Failed to parse hex value %q", in) + + return (*big.Int)(&value).String() +} + +type CallTrace struct { + From string `json:"from"` + Gas string `json:"gas"` + GasUsed string `json:"gasUsed"` + To string `json:"to"` + Input string `json:"input"` + Value string `json:"value"` + Type string `json:"type"` + Output string `json:"output,omitempty"` + + Calls []CallTrace `json:"calls"` +} + +func blockByHash(ctx context.Context, ec *rpc.Client, hash common.Hash) (*rpcBlock, error) { + var out rpcBlock + err := ec.CallContext(ctx, &out.Fields, "eth_getBlockByHash", hash, false) + if err != nil { + return nil, err + } else if out.Fields == nil { + return nil, ethereum.NotFound + } + + return &out, nil +} + +type rpcBlock struct { + Fields map[string]any +} + +func (b *rpcBlock) ParentHash() common.Hash { + return common.HexToHash(b.Fields["parentHash"].(string)) +} + +func transactionByHash(ctx context.Context, ec *rpc.Client, hash common.Hash) (tx *types.Transaction, blockHash common.Hash, err error) { + var json *rpcTransaction + err = ec.CallContext(ctx, &json, "eth_getTransactionByHash", hash) + if err != nil { + return nil, common.Hash{}, err + } else if json == nil { + return nil, common.Hash{}, ethereum.NotFound + } else if _, r, _ := json.tx.RawSignatureValues(); r == nil { + return nil, common.Hash{}, errors.New("server returned transaction without signature") + } + + if json.BlockHash == nil { + return nil, common.Hash{}, errors.New("server returned transaction without block hash") + } + + return json.tx, *json.BlockHash, nil +} + +type rpcTransaction struct { + tx *types.Transaction + txExtraInfo +} + +type txExtraInfo struct { + BlockNumber *string `json:"blockNumber,omitempty"` + BlockHash *common.Hash `json:"blockHash,omitempty"` + From *common.Address `json:"from,omitempty"` +} + +func (tx *rpcTransaction) UnmarshalJSON(msg []byte) error { + if err := json.Unmarshal(msg, &tx.tx); err != nil { + return err + } + return json.Unmarshal(msg, &tx.txExtraInfo) +} + +func log(message string, args ...interface{}) { + fmt.Fprintf(os.Stderr, message+"\n", args...) +} + +func ensure(condition bool, message string, args ...interface{}) { + if !condition { + quit(message, args...) + } +} + +func noError(err error, message string, args ...interface{}) { + if err != nil { + quit(message+": "+err.Error(), args...) + } +} + +func quit(message string, args ...interface{}) { + fmt.Printf(message+"\n", args...) + os.Exit(1) +} diff --git a/eth/tracers/internal/tracetest/firehose/helpers_test.go b/eth/tracers/internal/tracetest/firehose/helpers_test.go new file mode 100644 index 0000000000..98d6cbba90 --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/helpers_test.go @@ -0,0 +1,213 @@ +package firehose_test + +import ( + "bytes" + "encoding/base64" + "encoding/json" + "fmt" + "math/big" + "os" + "path/filepath" + "strings" + "testing" + + "github.com/ethereum/go-ethereum/core/tracing" + "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/ethereum/go-ethereum/params" + pbeth "github.com/streamingfast/firehose-ethereum/types/pb/sf/ethereum/type/v2" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +type firehoseInitLine struct { + ProtocolVersion string + NodeName string + NodeVersion string +} + +type firehoseBlockLines []firehoseBlockLine + +func newFirehoseTestTracer(t *testing.T, model tracingModel) (*tracers.Firehose, *tracing.Hooks, func()) { + t.Helper() + + tracer, err := tracers.NewFirehoseFromRawJSON([]byte(fmt.Sprintf(`{ + "_private": { + "flushToTestBuffer": true, + "ignoreGenesisBlock": true, + "forcedBackwardCompatibility": %t + } + }`, model == tracingModelFirehose2_3))) + require.NoError(t, err) + + hooks := tracers.NewTracingHooksFromFirehose(tracer) + + return tracer, hooks, func() { + if hooks.OnClose != nil { + hooks.OnClose() + } + } +} + +func (lines firehoseBlockLines) assertEquals(t *testing.T, goldenDir string, expected ...firehoseBlockLineParams) { + actualParams := slicesMap(lines, func(l firehoseBlockLine) firehoseBlockLineParams { return l.Params }) + require.Equal(t, expected, actualParams, "Actual lines block params do not match expected lines block params") + + lines.assertOnlyBlockEquals(t, goldenDir, len(expected)) +} + +func (lines firehoseBlockLines) assertOnlyBlockEquals(t *testing.T, goldenDir string, expectedBlockCount int) { + t.Helper() + + require.Len(t, lines, expectedBlockCount, "Expected %d blocks, got %d", expectedBlockCount, len(lines)) + goldenUpdate := os.Getenv("GOLDEN_UPDATE") == "true" + + for _, line := range lines { + goldenPath := filepath.Join(goldenDir, fmt.Sprintf("block.%d.golden.json", line.Block.Header.Number)) + if !goldenUpdate && !fileExists(t, goldenPath) { + t.Fatalf("the golden file %q does not exist, re-run with 'GOLDEN_UPDATE=true go test ./... -run %q' to generate the intial version", goldenPath, t.Name()) + } + + unnormalizedContent, err := protojson.MarshalOptions{Indent: " "}.Marshal(line.Block) + require.NoError(t, err) + + if goldenUpdate { + content := normalizedJSON(t, unnormalizedContent) + + require.NoError(t, os.MkdirAll(filepath.Dir(goldenPath), 0755)) + require.NoError(t, os.WriteFile(goldenPath, content, 0644)) + } + + expected, err := os.ReadFile(goldenPath) + require.NoError(t, err) + + expectedBlock := &pbeth.Block{} + require.NoError(t, protojson.Unmarshal(expected, expectedBlock)) + + if !proto.Equal(expectedBlock, line.Block) { + assert.EqualExportedValues(t, expectedBlock, line.Block, "Run 'GOLDEN_UPDATE=true go test ./... -run %q' to update golden file", t.Name()) + } + } +} + +func fileExists(t *testing.T, path string) bool { + t.Helper() + stat, err := os.Stat(path) + if err != nil { + if os.IsNotExist(err) { + return false + } + + t.Fatal(err) + } + + return !stat.IsDir() +} + +func slicesMap[T any, U any](s []T, f func(T) U) []U { + result := make([]U, len(s)) + for i, v := range s { + result[i] = f(v) + } + return result +} + +type firehoseBlockLine struct { + // We split params and block to make it easier to compare stuff + Params firehoseBlockLineParams + Block *pbeth.Block +} + +type firehoseBlockLineParams struct { + Number string + Hash string + PreviousNum string + PreviousHash string + LibNum string + Time string +} + +type unknownLine string + +// assertBlockEquals reads the tracer output and compares it to the golden files in the given directory. +func assertBlockEquals(t *testing.T, tracer *tracers.Firehose, goldenDir string, expectedBlockCount int) { + t.Helper() + + genesisLine, blockLines, unknownLines := readTracerFirehoseLines(t, tracer) + require.Len(t, unknownLines, 0, "Lines:\n%s", strings.Join(slicesMap(unknownLines, func(l unknownLine) string { return "- '" + string(l) + "'" }), "\n")) + require.NotNil(t, genesisLine) + blockLines.assertOnlyBlockEquals(t, goldenDir, expectedBlockCount) +} + +func readTracerFirehoseLines(t *testing.T, tracer *tracers.Firehose) (genesisLine *firehoseInitLine, blockLines firehoseBlockLines, unknownLines []unknownLine) { + t.Helper() + + lines := bytes.Split(tracer.InternalTestingBuffer().Bytes(), []byte{'\n'}) + for _, line := range lines { + if len(line) == 0 { + continue + } + + parts := bytes.Split(line, []byte{' '}) + if len(parts) == 0 || string(parts[0]) != "FIRE" { + unknownLines = append(unknownLines, unknownLine(line)) + continue + } + + action := string(parts[1]) + fireParts := parts[2:] + switch action { + case "INIT": + genesisLine = &firehoseInitLine{ + ProtocolVersion: string(fireParts[0]), + NodeName: string(fireParts[1]), + NodeVersion: string(fireParts[2]), + } + + case "BLOCK": + protoBytes, err := base64.StdEncoding.DecodeString(string(fireParts[6])) + require.NoError(t, err) + + block := &pbeth.Block{} + require.NoError(t, proto.Unmarshal(protoBytes, block)) + + blockLines = append(blockLines, firehoseBlockLine{ + Params: firehoseBlockLineParams{ + Number: string(fireParts[0]), + Hash: string(fireParts[1]), + PreviousNum: string(fireParts[2]), + PreviousHash: string(fireParts[3]), + LibNum: string(fireParts[4]), + Time: string(fireParts[5]), + }, + Block: block, + }) + + default: + unknownLines = append(unknownLines, unknownLine(line)) + } + } + + return +} + +func ptr[T any](v T) *T { + return &v +} + +func newGwei(n int64) *big.Int { + return new(big.Int).Mul(big.NewInt(n), big.NewInt(params.GWei)) +} + +func normalizedJSON(t *testing.T, data []byte) []byte { + t.Helper() + + var obj map[string]any + require.NoError(t, json.Unmarshal(data, &obj)) + + normalized, err := json.MarshalIndent(obj, "", " ") + require.NoError(t, err) + + return normalized +} diff --git a/eth/tracers/internal/tracetest/firehose/prestate_test.go b/eth/tracers/internal/tracetest/firehose/prestate_test.go new file mode 100644 index 0000000000..64c97f9149 --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/prestate_test.go @@ -0,0 +1,121 @@ +package firehose_test + +import ( + "encoding/json" + "math/big" + "os" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/consensus" + "github.com/ethereum/go-ethereum/consensus/ethash" + "github.com/ethereum/go-ethereum/consensus/misc/eip4844" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/params" + "github.com/stretchr/testify/require" +) + +func readPrestateData(t *testing.T, path string) *prestateData { + t.Helper() + + // Call tracer test found, read if from disk + blob, err := os.ReadFile(path) + require.NoError(t, err) + + test := new(prestateData) + require.NoError(t, json.Unmarshal(blob, test)) + + var genesisWithTD struct { + Genesis struct { + TotalDifficulty *math.HexOrDecimal256 `json:"totalDifficulty"` + } `json:"genesis"` + } + if err := json.Unmarshal(blob, &genesisWithTD); err == nil { + test.TotalDifficulty = (*big.Int)(genesisWithTD.Genesis.TotalDifficulty) + } + + return test +} + +var _ core.ChainContext = (*prestateData)(nil) + +type prestateData struct { + Genesis *core.Genesis `json:"genesis"` + Context *callContext `json:"context"` + Input string `json:"input"` + TotalDifficulty *big.Int `json:"-"` + TracerConfig json.RawMessage `json:"tracerConfig"` + + // Populated after loading + genesisBlock *types.Block +} + +// Config implements core.ChainContext. +func (p *prestateData) Config() *params.ChainConfig { + return p.Genesis.Config +} + +// Engine implements core.ChainContext. +func (p *prestateData) Engine() consensus.Engine { + return ethash.NewFullFaker() +} + +// GetHeader implements core.ChainContext. +func (p *prestateData) GetHeader(hash common.Hash, number uint64) *types.Header { + if p.Genesis == nil { + return nil + } + + if p.genesisBlock == nil { + p.genesisBlock = p.Genesis.ToBlock() + } + + if hash == p.genesisBlock.Hash() { + return p.genesisBlock.Header() + } + + if number == p.genesisBlock.NumberU64() { + return p.genesisBlock.Header() + } + + return nil +} + +type callContext struct { + Number math.HexOrDecimal64 `json:"number"` + Difficulty *math.HexOrDecimal256 `json:"difficulty"` + Time math.HexOrDecimal64 `json:"timestamp"` + GasLimit math.HexOrDecimal64 `json:"gasLimit"` + Miner common.Address `json:"miner"` + BaseFee *math.HexOrDecimal256 `json:"baseFeePerGas"` +} + +func (c *callContext) toBlockContext(genesis *core.Genesis) vm.BlockContext { + context := vm.BlockContext{ + CanTransfer: core.CanTransfer, + Transfer: core.Transfer, + Coinbase: c.Miner, + BlockNumber: new(big.Int).SetUint64(uint64(c.Number)), + Time: uint64(c.Time), + Difficulty: (*big.Int)(c.Difficulty), + GasLimit: uint64(c.GasLimit), + } + if genesis.Config.IsLondon(context.BlockNumber) { + context.BaseFee = (*big.Int)(c.BaseFee) + } + + if genesis.Config.TerminalTotalDifficulty != nil && genesis.Config.TerminalTotalDifficulty.Sign() == 0 { + context.Random = &genesis.Mixhash + } + + if genesis.ExcessBlobGas != nil && genesis.BlobGasUsed != nil { + header := &types.Header{Number: genesis.Config.LondonBlock, Time: *genesis.Config.CancunTime} + excess := eip4844.CalcExcessBlobGas(genesis.Config, header, genesis.Timestamp) + header.ExcessBlobGas = &excess + context.BlobBaseFee = eip4844.CalcBlobFee(genesis.Config, header) + } + return context +} diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh2.3/block.1.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh2.3/block.1.golden.json new file mode 100644 index 0000000000..99802d4832 --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh2.3/block.1.golden.json @@ -0,0 +1,301 @@ +{ + "hash": "tNKSM8SZPvaEgBA4yUj9YayXYYuXnLCuHx5oWJwVOhw=", + "header": { + "baseFeePerGas": { + "bytes": "NCdwwA==" + }, + "blobGasUsed": "0", + "coinbase": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "difficulty": { + "bytes": "AA==" + }, + "excessBlobGas": "0", + "gasLimit": "4712388", + "gasUsed": "142021", + "hash": "tNKSM8SZPvaEgBA4yUj9YayXYYuXnLCuHx5oWJwVOhw=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "1", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "pWIUj7qpHz/G8tLNdaLNz8Jr1TmoyDxTXP9TdFcxi1w=", + "receiptRoot": "6LQ+xgZZXKAlBStw088D6A2kWiz7g+TtQlAALnPMSi4=", + "requestsHash": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", + "stateRoot": "wFieFJlWOhntuAXVWTxqg5Uur7kaXrFRERwFB8+qscc=", + "timestamp": "1970-01-01T00:00:10Z", + "transactionsRoot": "L6HG4v+Zoguv352C8ZdQGQ4tE5BJdzCJVbfWBHMquN0=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=", + "withdrawalsRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=" + }, + "number": "1", + "size": "1190", + "systemCalls": [ + { + "address": "AA899tcygH7xMZ+3uLuFItC+rAI=", + "beginOrdinal": "1", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "2", + "gasLimit": "30000000", + "index": 1, + "input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + }, + { + "address": "AAD5CCfxxToQy3oCM1sXUyAAKTU=", + "beginOrdinal": "3", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "4", + "gasLimit": "30000000", + "index": 1, + "input": "pWIUj7qpHz/G8tLNdaLNz8Jr1TmoyDxTXP9TdFcxi1w=" + }, + { + "address": "AAAJYe9IDrVegNGa2DV5pkwAcAI=", + "beginOrdinal": "24", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "25", + "gasLimit": "30000000", + "index": 1 + }, + { + "address": "AAC73cfOSIZC+1efiwDzpZAAclE=", + "beginOrdinal": "26", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "27", + "gasLimit": "30000000", + "index": 1 + } + ], + "transactionTraces": [ + { + "beginOrdinal": "1", + "calls": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "addressDelegatesTo": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "balanceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "Dd8ozD895cA=" + }, + "oldValue": { + "bytes": "DeC2s6dkAAA=" + }, + "ordinal": "2", + "reason": "REASON_GAS_BUY" + }, + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "DeBFrisGZrU=" + }, + "oldValue": { + "bytes": "Dd8ozD895b8=" + }, + "ordinal": "21", + "reason": "REASON_GAS_REFUND" + }, + { + "address": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "newValue": { + "bytes": "BFWK" + }, + "ordinal": "22", + "reason": "REASON_REWARD_TRANSACTION_FEE" + } + ], + "callType": "CALL", + "caller": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "codeChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newCode": "7wEAAAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "newHash": "6BOVhfT5ksAf8bXRTf8FXcJyKhFA0Cb18MtIsAn1Z9o=", + "oldHash": "xdJGAYb3IzySfn2y3McDwOUAtlPKgic7e/rYBF2FpHA=", + "ordinal": "6" + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "newCode": "7wEAAAAAAAAAAAAAAAAAAAAAAAAAzMw=", + "newHash": "2nRj6FdgztYMKwAqS2x5e7pQdCMd4bTSeffx8pbIFmU=", + "oldHash": "xdJGAYb3IzySfn2y3McDwOUAtlPKgic7e/rYBF2FpHA=", + "ordinal": "8" + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "newCode": "7wEAAAAAAAAAAAAAAAAAAAAAAAAAu7s=", + "newHash": "0mhxQ0BYDv3haWHrT7NIuLWUSlfUHjFwuLM/8Jt1SXA=", + "oldCode": "7wEAAAAAAAAAAAAAAAAAAAAAAAAAzMw=", + "oldHash": "2nRj6FdgztYMKwAqS2x5e7pQdCMd4bTSeffx8pbIFmU=", + "ordinal": "10" + } + ], + "endOrdinal": "20", + "gasChanges": [ + { + "newValue": "354000", + "oldValue": "500000", + "ordinal": "3", + "reason": "REASON_INTRINSIC_GAS" + }, + { + "newValue": "351280", + "oldValue": "353880", + "ordinal": "12", + "reason": "REASON_STATE_COLD_ACCESS" + }, + { + "newValue": "5348", + "oldValue": "353980", + "ordinal": "13", + "reason": "REASON_CALL" + }, + { + "newValue": "322474", + "oldValue": "5348", + "ordinal": "19", + "reason": "REASON_REFUND_AFTER_EXECUTION" + } + ], + "gasConsumed": "31526", + "gasLimit": "354000", + "index": 1, + "nonceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": "1", + "ordinal": "4" + }, + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": "2", + "oldValue": "1", + "ordinal": "5" + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "newValue": "1", + "ordinal": "7" + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "newValue": "2", + "oldValue": "1", + "ordinal": "9" + } + ] + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "addressDelegatesTo": "AAAAAAAAAAAAAAAAAAAAAAAAu7s=", + "balanceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "Dd8ozD895b8=" + }, + "oldValue": { + "bytes": "Dd8ozD895cA=" + }, + "ordinal": "15", + "reason": "REASON_TRANSFER" + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "newValue": { + "bytes": "DeC2s6dkAAE=" + }, + "oldValue": { + "bytes": "DeC2s6dkAAA=" + }, + "ordinal": "16", + "reason": "REASON_TRANSFER" + } + ], + "beginOrdinal": "14", + "callType": "CALL", + "caller": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "depth": 1, + "endOrdinal": "18", + "gasConsumed": "22106", + "gasLimit": "339232", + "index": 2, + "parentIndex": 1, + "storageChanges": [ + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEI=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEI=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "17" + } + ], + "value": { + "bytes": "AQ==" + } + } + ], + "endOrdinal": "23", + "from": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "gasLimit": "500000", + "gasPrice": { + "bytes": "NCdwwg==" + }, + "gasUsed": "142021", + "hash": "alLg5Yk4t0M/5q97S3ye+D/U/jP60tAc1kNI8q4G+G0=", + "maxFeePerGas": { + "bytes": "ASoF8gA=" + }, + "maxPriorityFeePerGas": { + "bytes": "Ag==" + }, + "r": "E2l+Qpz16QzQhLJM+8gu8vd/lpMS1JAC0/hIlSNzFeg=", + "receipt": { + "cumulativeGasUsed": "142021", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "s": "N9pmx9wBwi0vXsT283fImtj6D4zPzYK3ZFXwBhYmbBA=", + "setCodeAuthorizations": [ + { + "authority": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "chainId": "AQ==", + "nonce": "1", + "r": "9+Pll/wJfnHtbCaxSyXlOVvIUQ1YuRNq9DnhJxXy1yE=", + "s": "bPfD15Ob/beENz7/wOuwvXVJaRpRPzlePNq/hgJySYc=", + "v": 1 + }, + { + "authority": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "r": "2uP1vwtGC/qSZin0z+PZ2kBZ/xY3445BRUpUUwr4UOc=", + "s": "HhA+a0fj/u82ZZyD9gMoHso5vGditId+wkZrJcpo4UM=" + }, + { + "discarded": true, + "r": "2uP1vwtGC/qSZin0z+PZ2kBZ/xY3445BRUpUUwr4UOc=", + "s": "HhA+a0fj/u82ZZyD9gMoHso5vGditId+wkZrJcpo4UM=", + "v": 4 + }, + { + "authority": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "nonce": "1", + "r": "aZRYP4l48gpWJSypjCxSptjK/kDFXmphIXOrnH6LlKs=", + "s": "HLb0WRaaPuzez2ZbtK39Ch9vZGXNjm5AYg2i8X5MMwg=" + }, + { + "authority": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "discarded": true, + "nonce": "1", + "r": "aZRYP4l48gpWJSypjCxSptjK/kDFXmphIXOrnH6LlKs=", + "s": "HLb0WRaaPuzez2ZbtK39Ch9vZGXNjm5AYg2i8X5MMwg=" + } + ], + "status": "SUCCEEDED", + "to": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "type": "TRX_TYPE_SET_CODE" + } + ], + "ver": 3 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh2.3/block.2.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh2.3/block.2.golden.json new file mode 100644 index 0000000000..746c77050b --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh2.3/block.2.golden.json @@ -0,0 +1,222 @@ +{ + "hash": "Hlau1KLprrOkaDe4TNZdPEoXeJ4UGEL1PwUY/qq+/rk=", + "header": { + "baseFeePerGas": { + "bytes": "LgcbLA==" + }, + "blobGasUsed": "0", + "coinbase": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "difficulty": { + "bytes": "AA==" + }, + "excessBlobGas": "0", + "gasLimit": "4712388", + "gasUsed": "35126", + "hash": "Hlau1KLprrOkaDe4TNZdPEoXeJ4UGEL1PwUY/qq+/rk=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "2", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "tNKSM8SZPvaEgBA4yUj9YayXYYuXnLCuHx5oWJwVOhw=", + "receiptRoot": "TaaZwIwiwzd65OYkLzazOIYrFN0/DnyXzNqaA/dY3pQ=", + "requestsHash": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", + "stateRoot": "C/zDETYPAXEFuq3RDENkXppoaNjfcWKHhIQqZGC0D5c=", + "timestamp": "1970-01-01T00:00:20Z", + "transactionsRoot": "5SXnkgZs4gKgt8t4GTnSeoV1i17zHn3xbZXSln9fd2E=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=", + "withdrawalsRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=" + }, + "number": "2", + "size": "717", + "systemCalls": [ + { + "address": "AA899tcygH7xMZ+3uLuFItC+rAI=", + "beginOrdinal": "1", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "2", + "gasLimit": "30000000", + "index": 1, + "input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + }, + { + "address": "AAD5CCfxxToQy3oCM1sXUyAAKTU=", + "beginOrdinal": "3", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "4", + "gasLimit": "30000000", + "index": 1, + "input": "tNKSM8SZPvaEgBA4yUj9YayXYYuXnLCuHx5oWJwVOhw=" + }, + { + "address": "AAAJYe9IDrVegNGa2DV5pkwAcAI=", + "beginOrdinal": "18", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "19", + "gasLimit": "30000000", + "index": 1 + }, + { + "address": "AAC73cfOSIZC+1efiwDzpZAAclE=", + "beginOrdinal": "20", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "21", + "gasLimit": "30000000", + "index": 1 + } + ], + "transactionTraces": [ + { + "beginOrdinal": "1", + "calls": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "addressDelegatesTo": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "balanceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "CmgYAUEtZrU=" + }, + "oldValue": { + "bytes": "DeBFrisGZrU=" + }, + "ordinal": "2", + "reason": "REASON_GAS_BUY" + }, + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "DaHgOZLVtrQ=" + }, + "oldValue": { + "bytes": "CmgYAUEtZrQ=" + }, + "ordinal": "15", + "reason": "REASON_GAS_REFUND" + }, + { + "address": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "newValue": { + "bytes": "PkzJFSq+Qg==" + }, + "oldValue": { + "bytes": "BFWK" + }, + "ordinal": "16", + "reason": "REASON_REWARD_TRANSACTION_FEE" + } + ], + "callType": "CALL", + "caller": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "endOrdinal": "14", + "gasChanges": [ + { + "newValue": "479000", + "oldValue": "500000", + "ordinal": "3", + "reason": "REASON_INTRINSIC_GAS" + }, + { + "newValue": "476380", + "oldValue": "478880", + "ordinal": "6", + "reason": "REASON_STATE_COLD_ACCESS" + }, + { + "newValue": "473780", + "oldValue": "476380", + "ordinal": "7", + "reason": "REASON_STATE_COLD_ACCESS" + }, + { + "newValue": "7262", + "oldValue": "478980", + "ordinal": "8", + "reason": "REASON_CALL" + }, + { + "newValue": "464874", + "oldValue": "7262", + "ordinal": "13", + "reason": "REASON_REFUND_AFTER_EXECUTION" + } + ], + "gasConsumed": "14126", + "gasLimit": "479000", + "index": 1, + "nonceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": "3", + "oldValue": "2", + "ordinal": "4" + } + ] + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "addressDelegatesTo": "AAAAAAAAAAAAAAAAAAAAAAAAu7s=", + "balanceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "CmgYAUEtZrQ=" + }, + "oldValue": { + "bytes": "CmgYAUEtZrU=" + }, + "ordinal": "10", + "reason": "REASON_TRANSFER" + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "newValue": { + "bytes": "DeC2s6dkAAI=" + }, + "oldValue": { + "bytes": "DeC2s6dkAAE=" + }, + "ordinal": "11", + "reason": "REASON_TRANSFER" + } + ], + "beginOrdinal": "9", + "callType": "CALL", + "caller": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "depth": 1, + "endOrdinal": "12", + "gasConsumed": "2206", + "gasLimit": "459818", + "index": 2, + "parentIndex": 1, + "value": { + "bytes": "AQ==" + } + } + ], + "endOrdinal": "17", + "from": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "gasLimit": "500000", + "gasPrice": { + "bytes": "dGpSiAA=" + }, + "gasUsed": "35126", + "hash": "TNmQOfjPE0jeas0eba+xGMaitDgyCOKmvNIBapciCiE=", + "nonce": "2", + "r": "llnySTXnLA5URm+RriiJTQ4gvkdUifLtVOIyBCpDFTw=", + "receipt": { + "cumulativeGasUsed": "35126", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "s": "SsqOfVDTp1cpwvz0g4nLhIzrWRGwh0Jgz4l9GK/UHbE=", + "status": "SUCCEEDED", + "to": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "v": "JQ==" + } + ], + "ver": 3 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh2.3/block.3.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh2.3/block.3.golden.json new file mode 100644 index 0000000000..57e67b4969 --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh2.3/block.3.golden.json @@ -0,0 +1,186 @@ +{ + "hash": "nM0MjYrd54p5L0zQNGpHV7fxetFL1VCejCvGELDLop8=", + "header": { + "baseFeePerGas": { + "bytes": "KFws9Q==" + }, + "blobGasUsed": "0", + "coinbase": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "difficulty": { + "bytes": "AA==" + }, + "excessBlobGas": "0", + "gasLimit": "4712388", + "gasUsed": "36800", + "hash": "nM0MjYrd54p5L0zQNGpHV7fxetFL1VCejCvGELDLop8=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "3", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "Hlau1KLprrOkaDe4TNZdPEoXeJ4UGEL1PwUY/qq+/rk=", + "receiptRoot": "A2x9IEIO284ktQYhSLzoBWO0j9RTL7HAaLLJalMRcBk=", + "requestsHash": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", + "stateRoot": "vWvMYC8Hck2r4d77C3bO7nRWmEtpytSHv092DGpMjeI=", + "timestamp": "1970-01-01T00:00:30Z", + "transactionsRoot": "Bpo3ARUhIUuu9hH3yrkUNF2s22VFnHRDwdWxzM0pb5U=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=", + "withdrawalsRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=" + }, + "number": "3", + "size": "817", + "systemCalls": [ + { + "address": "AA899tcygH7xMZ+3uLuFItC+rAI=", + "beginOrdinal": "1", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "2", + "gasLimit": "30000000", + "index": 1, + "input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + }, + { + "address": "AAD5CCfxxToQy3oCM1sXUyAAKTU=", + "beginOrdinal": "3", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "4", + "gasLimit": "30000000", + "index": 1, + "input": "Hlau1KLprrOkaDe4TNZdPEoXeJ4UGEL1PwUY/qq+/rk=" + }, + { + "address": "AAAJYe9IDrVegNGa2DV5pkwAcAI=", + "beginOrdinal": "12", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "13", + "gasLimit": "30000000", + "index": 1 + }, + { + "address": "AAC73cfOSIZC+1efiwDzpZAAclE=", + "beginOrdinal": "14", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "15", + "gasLimit": "30000000", + "index": 1 + } + ], + "transactionTraces": [ + { + "beginOrdinal": "1", + "calls": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "balanceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "DaCsTVRHwNQ=" + }, + "oldValue": { + "bytes": "DaHgOZLVtrQ=" + }, + "ordinal": "2", + "reason": "REASON_GAS_BUY" + }, + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "DaHJj9CWBHQ=" + }, + "oldValue": { + "bytes": "DaCsTVRHwNQ=" + }, + "ordinal": "9", + "reason": "REASON_GAS_REFUND" + }, + { + "address": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "newValue": { + "bytes": "PkzJFSvdwg==" + }, + "oldValue": { + "bytes": "PkzJFSq+Qg==" + }, + "ordinal": "10", + "reason": "REASON_REWARD_TRANSACTION_FEE" + } + ], + "callType": "CALL", + "caller": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "codeChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newHash": "xdJGAYb3IzySfn2y3McDwOUAtlPKgic7e/rYBF2FpHA=", + "oldCode": "7wEAAAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "oldHash": "6BOVhfT5ksAf8bXRTf8FXcJyKhFA0Cb18MtIsAn1Z9o=", + "ordinal": "6" + } + ], + "endOrdinal": "8", + "gasChanges": [ + { + "newValue": "454000", + "oldValue": "500000", + "ordinal": "3", + "reason": "REASON_INTRINSIC_GAS" + } + ], + "gasLimit": "454000", + "index": 1, + "nonceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": "4", + "oldValue": "3", + "ordinal": "4" + }, + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": "5", + "oldValue": "4", + "ordinal": "5" + } + ] + } + ], + "endOrdinal": "11", + "from": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "gasLimit": "500000", + "gasPrice": { + "bytes": "KFws9w==" + }, + "gasUsed": "36800", + "hash": "vj4lUeVR72WjVf2OYUmz3Um0SH4d6qCao7cZRbBiaCI=", + "maxFeePerGas": { + "bytes": "ASoF8gA=" + }, + "maxPriorityFeePerGas": { + "bytes": "Ag==" + }, + "nonce": "3", + "r": "3+bIOst9jVy0xdYLs7dP1KfP1XrtsXepmpY0W3XBKII=", + "receipt": { + "cumulativeGasUsed": "36800", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "s": "UGXb+KJ8dparEBn0Wb2lX5fh1gB2+AiHfowzzmJWOkE=", + "setCodeAuthorizations": [ + { + "authority": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "chainId": "AQ==", + "nonce": "4", + "r": "8RpcvObxuhW9b2SyJDTKMBtrqfyaAJlzS37bOLPTKIo=", + "s": "NMkyzSai5xkwNV4ttrTli9jZHXeB7hUwej28frcnTDw=" + } + ], + "status": "SUCCEEDED", + "to": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "type": "TRX_TYPE_SET_CODE" + } + ], + "ver": 3 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh3.0/block.1.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh3.0/block.1.golden.json new file mode 100644 index 0000000000..a1105d231c --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh3.0/block.1.golden.json @@ -0,0 +1,390 @@ +{ + "hash": "tNKSM8SZPvaEgBA4yUj9YayXYYuXnLCuHx5oWJwVOhw=", + "header": { + "baseFeePerGas": { + "bytes": "NCdwwA==" + }, + "blobGasUsed": "0", + "coinbase": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "difficulty": { + "bytes": "AA==" + }, + "excessBlobGas": "0", + "gasLimit": "4712388", + "gasUsed": "142021", + "hash": "tNKSM8SZPvaEgBA4yUj9YayXYYuXnLCuHx5oWJwVOhw=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "1", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "pWIUj7qpHz/G8tLNdaLNz8Jr1TmoyDxTXP9TdFcxi1w=", + "receiptRoot": "6LQ+xgZZXKAlBStw088D6A2kWiz7g+TtQlAALnPMSi4=", + "requestsHash": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", + "stateRoot": "wFieFJlWOhntuAXVWTxqg5Uur7kaXrFRERwFB8+qscc=", + "timestamp": "1970-01-01T00:00:10Z", + "transactionsRoot": "L6HG4v+Zoguv352C8ZdQGQ4tE5BJdzCJVbfWBHMquN0=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=", + "withdrawalsRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=" + }, + "number": "1", + "size": "1190", + "systemCalls": [ + { + "address": "AA899tcygH7xMZ+3uLuFItC+rAI=", + "beginOrdinal": "1", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "4", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "2", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "3", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1, + "input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + }, + { + "address": "AAD5CCfxxToQy3oCM1sXUyAAKTU=", + "beginOrdinal": "5", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "8", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "6", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "7", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1, + "input": "pWIUj7qpHz/G8tLNdaLNz8Jr1TmoyDxTXP9TdFcxi1w=" + }, + { + "address": "AAAJYe9IDrVegNGa2DV5pkwAcAI=", + "beginOrdinal": "39", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "42", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "40", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "41", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1 + }, + { + "address": "AAC73cfOSIZC+1efiwDzpZAAclE=", + "beginOrdinal": "43", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "46", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "44", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "45", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1 + } + ], + "transactionTraces": [ + { + "beginOrdinal": "9", + "calls": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "addressDelegatesTo": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "balanceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "Dd8ozD895cA=" + }, + "oldValue": { + "bytes": "DeC2s6dkAAA=" + }, + "ordinal": "11", + "reason": "REASON_GAS_BUY" + }, + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "DeBFrisGZrU=" + }, + "oldValue": { + "bytes": "Dd8ozD895b8=" + }, + "ordinal": "35", + "reason": "REASON_GAS_REFUND" + }, + { + "address": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "newValue": { + "bytes": "BFWK" + }, + "ordinal": "37", + "reason": "REASON_REWARD_TRANSACTION_FEE" + } + ], + "beginOrdinal": "20", + "callType": "CALL", + "caller": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "codeChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newCode": "7wEAAAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "newHash": "6BOVhfT5ksAf8bXRTf8FXcJyKhFA0Cb18MtIsAn1Z9o=", + "oldHash": "xdJGAYb3IzySfn2y3McDwOUAtlPKgic7e/rYBF2FpHA=", + "ordinal": "15" + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "newCode": "7wEAAAAAAAAAAAAAAAAAAAAAAAAAzMw=", + "newHash": "2nRj6FdgztYMKwAqS2x5e7pQdCMd4bTSeffx8pbIFmU=", + "oldHash": "xdJGAYb3IzySfn2y3McDwOUAtlPKgic7e/rYBF2FpHA=", + "ordinal": "17" + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "newCode": "7wEAAAAAAAAAAAAAAAAAAAAAAAAAu7s=", + "newHash": "0mhxQ0BYDv3haWHrT7NIuLWUSlfUHjFwuLM/8Jt1SXA=", + "oldCode": "7wEAAAAAAAAAAAAAAAAAAAAAAAAAzMw=", + "oldHash": "2nRj6FdgztYMKwAqS2x5e7pQdCMd4bTSeffx8pbIFmU=", + "ordinal": "19" + } + ], + "endOrdinal": "33", + "executedCode": true, + "gasChanges": [ + { + "newValue": "500000", + "ordinal": "10", + "reason": "REASON_TX_INITIAL_BALANCE" + }, + { + "newValue": "354000", + "oldValue": "500000", + "ordinal": "12", + "reason": "REASON_INTRINSIC_GAS" + }, + { + "newValue": "354000", + "ordinal": "21", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "newValue": "351280", + "oldValue": "353880", + "ordinal": "22", + "reason": "REASON_STATE_COLD_ACCESS" + }, + { + "newValue": "5348", + "oldValue": "353980", + "ordinal": "23", + "reason": "REASON_CALL" + }, + { + "newValue": "322474", + "oldValue": "5348", + "ordinal": "31", + "reason": "REASON_REFUND_AFTER_EXECUTION" + }, + { + "oldValue": "322474", + "ordinal": "32", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + }, + { + "newValue": "357979", + "oldValue": "322474", + "ordinal": "34", + "reason": "REASON_TX_REFUNDS" + }, + { + "oldValue": "357979", + "ordinal": "36", + "reason": "REASON_TX_LEFT_OVER_RETURNED" + } + ], + "gasConsumed": "31526", + "gasLimit": "354000", + "index": 1, + "nonceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": "1", + "ordinal": "13" + }, + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": "2", + "oldValue": "1", + "ordinal": "14" + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "newValue": "1", + "ordinal": "16" + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "newValue": "2", + "oldValue": "1", + "ordinal": "18" + } + ] + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "addressDelegatesTo": "AAAAAAAAAAAAAAAAAAAAAAAAu7s=", + "balanceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "Dd8ozD895b8=" + }, + "oldValue": { + "bytes": "Dd8ozD895cA=" + }, + "ordinal": "26", + "reason": "REASON_TRANSFER" + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "newValue": { + "bytes": "DeC2s6dkAAE=" + }, + "oldValue": { + "bytes": "DeC2s6dkAAA=" + }, + "ordinal": "27", + "reason": "REASON_TRANSFER" + } + ], + "beginOrdinal": "24", + "callType": "CALL", + "caller": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "depth": 1, + "endOrdinal": "30", + "executedCode": true, + "gasChanges": [ + { + "newValue": "339232", + "ordinal": "25", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "317126", + "ordinal": "29", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasConsumed": "22106", + "gasLimit": "339232", + "index": 2, + "parentIndex": 1, + "storageChanges": [ + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEI=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEI=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "28" + } + ], + "value": { + "bytes": "AQ==" + } + } + ], + "endOrdinal": "38", + "from": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "gasLimit": "500000", + "gasPrice": { + "bytes": "NCdwwg==" + }, + "gasUsed": "142021", + "hash": "alLg5Yk4t0M/5q97S3ye+D/U/jP60tAc1kNI8q4G+G0=", + "maxFeePerGas": { + "bytes": "ASoF8gA=" + }, + "maxPriorityFeePerGas": { + "bytes": "Ag==" + }, + "r": "E2l+Qpz16QzQhLJM+8gu8vd/lpMS1JAC0/hIlSNzFeg=", + "receipt": { + "cumulativeGasUsed": "142021", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "s": "N9pmx9wBwi0vXsT283fImtj6D4zPzYK3ZFXwBhYmbBA=", + "setCodeAuthorizations": [ + { + "authority": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "chainId": "AQ==", + "nonce": "1", + "r": "9+Pll/wJfnHtbCaxSyXlOVvIUQ1YuRNq9DnhJxXy1yE=", + "s": "bPfD15Ob/beENz7/wOuwvXVJaRpRPzlePNq/hgJySYc=", + "v": 1 + }, + { + "authority": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "r": "2uP1vwtGC/qSZin0z+PZ2kBZ/xY3445BRUpUUwr4UOc=", + "s": "HhA+a0fj/u82ZZyD9gMoHso5vGditId+wkZrJcpo4UM=" + }, + { + "discarded": true, + "r": "2uP1vwtGC/qSZin0z+PZ2kBZ/xY3445BRUpUUwr4UOc=", + "s": "HhA+a0fj/u82ZZyD9gMoHso5vGditId+wkZrJcpo4UM=", + "v": 4 + }, + { + "authority": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "nonce": "1", + "r": "aZRYP4l48gpWJSypjCxSptjK/kDFXmphIXOrnH6LlKs=", + "s": "HLb0WRaaPuzez2ZbtK39Ch9vZGXNjm5AYg2i8X5MMwg=" + }, + { + "authority": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "discarded": true, + "nonce": "1", + "r": "aZRYP4l48gpWJSypjCxSptjK/kDFXmphIXOrnH6LlKs=", + "s": "HLb0WRaaPuzez2ZbtK39Ch9vZGXNjm5AYg2i8X5MMwg=" + } + ], + "status": "SUCCEEDED", + "to": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "type": "TRX_TYPE_SET_CODE" + } + ], + "ver": 4 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh3.0/block.2.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh3.0/block.2.golden.json new file mode 100644 index 0000000000..120c92863a --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh3.0/block.2.golden.json @@ -0,0 +1,305 @@ +{ + "hash": "Hlau1KLprrOkaDe4TNZdPEoXeJ4UGEL1PwUY/qq+/rk=", + "header": { + "baseFeePerGas": { + "bytes": "LgcbLA==" + }, + "blobGasUsed": "0", + "coinbase": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "difficulty": { + "bytes": "AA==" + }, + "excessBlobGas": "0", + "gasLimit": "4712388", + "gasUsed": "35126", + "hash": "Hlau1KLprrOkaDe4TNZdPEoXeJ4UGEL1PwUY/qq+/rk=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "2", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "tNKSM8SZPvaEgBA4yUj9YayXYYuXnLCuHx5oWJwVOhw=", + "receiptRoot": "TaaZwIwiwzd65OYkLzazOIYrFN0/DnyXzNqaA/dY3pQ=", + "requestsHash": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", + "stateRoot": "C/zDETYPAXEFuq3RDENkXppoaNjfcWKHhIQqZGC0D5c=", + "timestamp": "1970-01-01T00:00:20Z", + "transactionsRoot": "5SXnkgZs4gKgt8t4GTnSeoV1i17zHn3xbZXSln9fd2E=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=", + "withdrawalsRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=" + }, + "number": "2", + "size": "717", + "systemCalls": [ + { + "address": "AA899tcygH7xMZ+3uLuFItC+rAI=", + "beginOrdinal": "1", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "4", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "2", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "3", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1, + "input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + }, + { + "address": "AAD5CCfxxToQy3oCM1sXUyAAKTU=", + "beginOrdinal": "5", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "8", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "6", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "7", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1, + "input": "tNKSM8SZPvaEgBA4yUj9YayXYYuXnLCuHx5oWJwVOhw=" + }, + { + "address": "AAAJYe9IDrVegNGa2DV5pkwAcAI=", + "beginOrdinal": "32", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "35", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "33", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "34", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1 + }, + { + "address": "AAC73cfOSIZC+1efiwDzpZAAclE=", + "beginOrdinal": "36", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "39", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "37", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "38", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1 + } + ], + "transactionTraces": [ + { + "beginOrdinal": "9", + "calls": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "addressDelegatesTo": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "balanceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "CmgYAUEtZrU=" + }, + "oldValue": { + "bytes": "DeBFrisGZrU=" + }, + "ordinal": "11", + "reason": "REASON_GAS_BUY" + }, + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "DaHgOZLVtrQ=" + }, + "oldValue": { + "bytes": "CmgYAUEtZrQ=" + }, + "ordinal": "28", + "reason": "REASON_GAS_REFUND" + }, + { + "address": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "newValue": { + "bytes": "PkzJFSq+Qg==" + }, + "oldValue": { + "bytes": "BFWK" + }, + "ordinal": "30", + "reason": "REASON_REWARD_TRANSACTION_FEE" + } + ], + "beginOrdinal": "14", + "callType": "CALL", + "caller": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "endOrdinal": "27", + "executedCode": true, + "gasChanges": [ + { + "newValue": "500000", + "ordinal": "10", + "reason": "REASON_TX_INITIAL_BALANCE" + }, + { + "newValue": "479000", + "oldValue": "500000", + "ordinal": "12", + "reason": "REASON_INTRINSIC_GAS" + }, + { + "newValue": "479000", + "ordinal": "15", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "newValue": "476380", + "oldValue": "478880", + "ordinal": "16", + "reason": "REASON_STATE_COLD_ACCESS" + }, + { + "newValue": "473780", + "oldValue": "476380", + "ordinal": "17", + "reason": "REASON_STATE_COLD_ACCESS" + }, + { + "newValue": "7262", + "oldValue": "478980", + "ordinal": "18", + "reason": "REASON_CALL" + }, + { + "newValue": "464874", + "oldValue": "7262", + "ordinal": "25", + "reason": "REASON_REFUND_AFTER_EXECUTION" + }, + { + "oldValue": "464874", + "ordinal": "26", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + }, + { + "oldValue": "464874", + "ordinal": "29", + "reason": "REASON_TX_LEFT_OVER_RETURNED" + } + ], + "gasConsumed": "14126", + "gasLimit": "479000", + "index": 1, + "nonceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": "3", + "oldValue": "2", + "ordinal": "13" + } + ] + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "addressDelegatesTo": "AAAAAAAAAAAAAAAAAAAAAAAAu7s=", + "balanceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "CmgYAUEtZrQ=" + }, + "oldValue": { + "bytes": "CmgYAUEtZrU=" + }, + "ordinal": "21", + "reason": "REASON_TRANSFER" + }, + { + "address": "cDxLK9cMFp9XFxAcruVDKZ/JRsc=", + "newValue": { + "bytes": "DeC2s6dkAAI=" + }, + "oldValue": { + "bytes": "DeC2s6dkAAE=" + }, + "ordinal": "22", + "reason": "REASON_TRANSFER" + } + ], + "beginOrdinal": "19", + "callType": "CALL", + "caller": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "depth": 1, + "endOrdinal": "24", + "executedCode": true, + "gasChanges": [ + { + "newValue": "459818", + "ordinal": "20", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "457612", + "ordinal": "23", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasConsumed": "2206", + "gasLimit": "459818", + "index": 2, + "parentIndex": 1, + "value": { + "bytes": "AQ==" + } + } + ], + "endOrdinal": "31", + "from": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "gasLimit": "500000", + "gasPrice": { + "bytes": "dGpSiAA=" + }, + "gasUsed": "35126", + "hash": "TNmQOfjPE0jeas0eba+xGMaitDgyCOKmvNIBapciCiE=", + "nonce": "2", + "r": "llnySTXnLA5URm+RriiJTQ4gvkdUifLtVOIyBCpDFTw=", + "receipt": { + "cumulativeGasUsed": "35126", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "s": "SsqOfVDTp1cpwvz0g4nLhIzrWRGwh0Jgz4l9GK/UHbE=", + "status": "SUCCEEDED", + "to": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "v": "JQ==" + } + ], + "ver": 4 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh3.0/block.3.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh3.0/block.3.golden.json new file mode 100644 index 0000000000..58744dcbc2 --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestEIP7702/fh3.0/block.3.golden.json @@ -0,0 +1,261 @@ +{ + "hash": "nM0MjYrd54p5L0zQNGpHV7fxetFL1VCejCvGELDLop8=", + "header": { + "baseFeePerGas": { + "bytes": "KFws9Q==" + }, + "blobGasUsed": "0", + "coinbase": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "difficulty": { + "bytes": "AA==" + }, + "excessBlobGas": "0", + "gasLimit": "4712388", + "gasUsed": "36800", + "hash": "nM0MjYrd54p5L0zQNGpHV7fxetFL1VCejCvGELDLop8=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "3", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "Hlau1KLprrOkaDe4TNZdPEoXeJ4UGEL1PwUY/qq+/rk=", + "receiptRoot": "A2x9IEIO284ktQYhSLzoBWO0j9RTL7HAaLLJalMRcBk=", + "requestsHash": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", + "stateRoot": "vWvMYC8Hck2r4d77C3bO7nRWmEtpytSHv092DGpMjeI=", + "timestamp": "1970-01-01T00:00:30Z", + "transactionsRoot": "Bpo3ARUhIUuu9hH3yrkUNF2s22VFnHRDwdWxzM0pb5U=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=", + "withdrawalsRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=" + }, + "number": "3", + "size": "817", + "systemCalls": [ + { + "address": "AA899tcygH7xMZ+3uLuFItC+rAI=", + "beginOrdinal": "1", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "4", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "2", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "3", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1, + "input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + }, + { + "address": "AAD5CCfxxToQy3oCM1sXUyAAKTU=", + "beginOrdinal": "5", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "8", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "6", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "7", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1, + "input": "Hlau1KLprrOkaDe4TNZdPEoXeJ4UGEL1PwUY/qq+/rk=" + }, + { + "address": "AAAJYe9IDrVegNGa2DV5pkwAcAI=", + "beginOrdinal": "25", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "28", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "26", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "27", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1 + }, + { + "address": "AAC73cfOSIZC+1efiwDzpZAAclE=", + "beginOrdinal": "29", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "32", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "30", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "31", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1 + } + ], + "transactionTraces": [ + { + "beginOrdinal": "9", + "calls": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "balanceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "DaCsTVRHwNQ=" + }, + "oldValue": { + "bytes": "DaHgOZLVtrQ=" + }, + "ordinal": "11", + "reason": "REASON_GAS_BUY" + }, + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": { + "bytes": "DaHJj9CWBHQ=" + }, + "oldValue": { + "bytes": "DaCsTVRHwNQ=" + }, + "ordinal": "21", + "reason": "REASON_GAS_REFUND" + }, + { + "address": "AAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "newValue": { + "bytes": "PkzJFSvdwg==" + }, + "oldValue": { + "bytes": "PkzJFSq+Qg==" + }, + "ordinal": "23", + "reason": "REASON_REWARD_TRANSACTION_FEE" + } + ], + "beginOrdinal": "16", + "callType": "CALL", + "caller": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "codeChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newHash": "xdJGAYb3IzySfn2y3McDwOUAtlPKgic7e/rYBF2FpHA=", + "oldCode": "7wEAAAAAAAAAAAAAAAAAAAAAAAAAqqo=", + "oldHash": "6BOVhfT5ksAf8bXRTf8FXcJyKhFA0Cb18MtIsAn1Z9o=", + "ordinal": "15" + } + ], + "endOrdinal": "19", + "gasChanges": [ + { + "newValue": "500000", + "ordinal": "10", + "reason": "REASON_TX_INITIAL_BALANCE" + }, + { + "newValue": "454000", + "oldValue": "500000", + "ordinal": "12", + "reason": "REASON_INTRINSIC_GAS" + }, + { + "newValue": "454000", + "ordinal": "17", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "454000", + "ordinal": "18", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + }, + { + "newValue": "463200", + "oldValue": "454000", + "ordinal": "20", + "reason": "REASON_TX_REFUNDS" + }, + { + "oldValue": "463200", + "ordinal": "22", + "reason": "REASON_TX_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "454000", + "index": 1, + "nonceChanges": [ + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": "4", + "oldValue": "3", + "ordinal": "13" + }, + { + "address": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "newValue": "5", + "oldValue": "4", + "ordinal": "14" + } + ] + } + ], + "endOrdinal": "24", + "from": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "gasLimit": "500000", + "gasPrice": { + "bytes": "KFws9w==" + }, + "gasUsed": "36800", + "hash": "vj4lUeVR72WjVf2OYUmz3Um0SH4d6qCao7cZRbBiaCI=", + "maxFeePerGas": { + "bytes": "ASoF8gA=" + }, + "maxPriorityFeePerGas": { + "bytes": "Ag==" + }, + "nonce": "3", + "r": "3+bIOst9jVy0xdYLs7dP1KfP1XrtsXepmpY0W3XBKII=", + "receipt": { + "cumulativeGasUsed": "36800", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "s": "UGXb+KJ8dparEBn0Wb2lX5fh1gB2+AiHfowzzmJWOkE=", + "setCodeAuthorizations": [ + { + "authority": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "chainId": "AQ==", + "nonce": "4", + "r": "8RpcvObxuhW9b2SyJDTKMBtrqfyaAJlzS37bOLPTKIo=", + "s": "NMkyzSai5xkwNV4ttrTli9jZHXeB7hUwej28frcnTDw=" + } + ], + "status": "SUCCEEDED", + "to": "cVYrcZmYc9tbKG35V68ZnslGF/c=", + "type": "TRX_TYPE_SET_CODE" + } + ], + "ver": 4 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/extra_account_creations/fh2.3/block.207938.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/extra_account_creations/fh2.3/block.207938.golden.json new file mode 100644 index 0000000000..9dde4eb9cf --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/extra_account_creations/fh2.3/block.207938.golden.json @@ -0,0 +1,450 @@ +{ + "hash": "pmFJOXlO1smEJbK4oUBqjZ0iFBpYsTq50dyNbEiZ+Mw=", + "header": { + "baseFeePerGas": { + "bytes": "Bw==" + }, + "coinbase": "RV5aoYRpvGzO9JWUZFZmxYejpxs=", + "difficulty": { + "bytes": "AA==" + }, + "gasLimit": "30000000", + "hash": "pmFJOXlO1smEJbK4oUBqjZ0iFBpYsTq50dyNbEiZ+Mw=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "207938", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "nHyKL2uLMm9sBbmXgBbS0IWWvNldDJ8aquJBacj/BYg=", + "receiptRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "stateRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "timestamp": "2023-10-29T10:11:12Z", + "transactionsRoot": "0yEw5Z71BzpX25P3pM6JtJzwwAKrFMgJGulCMo+tLw8=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=" + }, + "number": "207938", + "size": "2807", + "transactionTraces": [ + { + "beginOrdinal": "1", + "calls": [ + { + "address": "X/E31LD9zUncowx89X5XigJtJ4k=", + "balanceChanges": [ + { + "address": "diuuNYBn2VTD1f0iIcjfhQt9Leo=", + "newValue": { + "bytes": "BBz5LMZCX1A=" + }, + "oldValue": { + "bytes": "BCJNar1sH1A=" + }, + "ordinal": "2", + "reason": "REASON_GAS_BUY" + }, + { + "address": "diuuNYBn2VTD1f0iIcjfhQt9Leo=", + "newValue": { + "bytes": "BB7HvUaRnVA=" + }, + "oldValue": { + "bytes": "BBz5LMZCX1A=" + }, + "ordinal": "52", + "reason": "REASON_GAS_REFUND" + }, + { + "address": "RV5aoYRpvGzO9JWUZFZmxYejpxs=", + "newValue": { + "bytes": "0c8D1KMdnac=" + }, + "oldValue": { + "bytes": "0ct+JyxYSWY=" + }, + "ordinal": "53", + "reason": "REASON_REWARD_TRANSACTION_FEE" + } + ], + "callType": "CALL", + "caller": "diuuNYBn2VTD1f0iIcjfhQt9Leo=", + "endOrdinal": "51", + "executedCode": true, + "failureReason": "execution reverted", + "gasChanges": [ + { + "newValue": "263880", + "oldValue": "300000", + "ordinal": "3", + "reason": "REASON_INTRINSIC_GAS" + }, + { + "newValue": "255906", + "oldValue": "255927", + "ordinal": "7", + "reason": "REASON_CALL_DATA_COPY" + }, + { + "newValue": "255616", + "oldValue": "255659", + "ordinal": "8", + "reason": "REASON_CALL_DATA_COPY" + }, + { + "newValue": "255327", + "oldValue": "255336", + "ordinal": "9", + "reason": "REASON_CALL_DATA_COPY" + }, + { + "newValue": "251104", + "oldValue": "251122", + "ordinal": "10", + "reason": "REASON_CALL_DATA_COPY" + }, + { + "newValue": "248417", + "oldValue": "250917", + "ordinal": "11", + "reason": "REASON_STATE_COLD_ACCESS" + }, + { + "newValue": "98417", + "oldValue": "251017", + "ordinal": "12", + "reason": "REASON_CALL" + }, + { + "newValue": "102178", + "oldValue": "98417", + "ordinal": "50", + "reason": "REASON_REFUND_AFTER_EXECUTION" + } + ], + "gasConsumed": "162161", + "gasLimit": "263880", + "index": 1, + "input": "H62UjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAdiuuNYBn2VTD1f0iIcjfhQt9LeoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABCAAAAAAAAAAAAAAAAACO4OBgTp9mNlz73DP47b9PrWvjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACSfAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADuaygAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFiUBsxhhaNGkGKWhAdGEloORJdkVF+/uc8AAAAAAAAAAAAAAAB2K641gGfZVMPV/SIhyN+FC30t6gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5LYdJ/YAAAAAAAAAAAAAAAB9dzrz0pdDRC3JkcFoxDTZmDanIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAlep7MAAAAAAAAAAAAAAAC5jLHaT5vWQIefC7yzClQchBY0Bv//////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKLmMsdpPm9ZAh58LvLMKVByEFjQGfXc689KXQ0QtyZHBaMQ02Zg2pyMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQWPbbHRb92GQN0A5BcCRplGg0yKGn1EwMQ93f/0H+09pWGuA5GRL1aXDgP2qgF5V+4i3OkM10yvL+4eJ8UgTtYIcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI7g4GBOn2Y2XPvcM/jtv0+ta+PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJJ8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO5rKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWJQGzGGFo0aQYpaEB0YSWg5El2RUX7+5zwAAAAAAAAAAAAAAAHYrrjWAZ9lUw9X9IiHI34ULfS3qAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADkth0n9gAAAAAAAAAAAAAAAH13OvPSl0NELcmRwWjENNmYNqcjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEqQWcuwAAAAAAAAAAAAAAAAI7g4GBOn2Y2XPvcM/jtv0+ta+PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADeC2s6dkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAouYyx2k+b1kCHnwu8swpUHIQWNAZ9dzrz0pdDRC3JkcFoxDTZmDanIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBdXr7NNBzY7d7FR1EcG8QFoP7byo4jlRHObr95zrDf6gLFDbbZsjtIMqWubWmj4oVtRCklUggA3RTcOHI3aTRixsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "keccakPreimages": { + "28d9e8e57be8527d0679250d50e4fae027ae189be41776c0a4a2a0a42c2218da": "a16ebae5813bd19aa03287aa905d783611ff8b419ce30428f2da9457d9aa27630000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d27890000000000000000000000000000000000000000000000000000000000004268", + "58ce8202536a0e9871f92a2e42a02c92ee563a7817d29ae23b734f34e7ddda6c": "b98cb1da4f9bd640879f0bbcb30a541c841634067d773af3d29743442dc991c168c434d99836a723", + "a16ebae5813bd19aa03287aa905d783611ff8b419ce30428f2da9457d9aa2763": "000000000000000000000000023b8381813a7d98d973ef70cfe3b6fd3eb5af8f0000000000000000000000000000000000000000000000000000000000000000fe7e16dbeb61a0da1615b2a5b44efb2dc9288a102d97b83968a814c67dcb8b08d525d4a8e0332b956f801a3fc3094f9edf480fcda1a4ea641e7c51240fd0b2da000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000249f000000000000000000000000000000000000000000000000000000000000052080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b9aca0058ce8202536a0e9871f92a2e42a02c92ee563a7817d29ae23b734f34e7ddda6c", + "d525d4a8e0332b956f801a3fc3094f9edf480fcda1a4ea641e7c51240fd0b2da": "b61d27f60000000000000000000000007d773af3d29743442dc991c168c434d99836a723000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000b98cb1da4f9bd640879f0bbcb30a541c84163406ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000", + "fe7e16dbeb61a0da1615b2a5b44efb2dc9288a102d97b83968a814c67dcb8b08": "9406cc6185a346906296840746125a0e449764545fbfb9cf000000000000000000000000762bae358067d954c3d5fd2221c8df850b7d2dea0000000000000000000000000000000000000000000000000000000000000000" + }, + "nonceChanges": [ + { + "address": "diuuNYBn2VTD1f0iIcjfhQt9Leo=", + "newValue": "5", + "oldValue": "4", + "ordinal": "4" + } + ], + "returnData": "IgJmtgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG0FBMTMgaW5pdENvZGUgZmFpbGVkIG9yIE9PRwAAAAAA", + "stateReverted": true, + "statusFailed": true, + "statusReverted": true, + "storageChanges": [ + { + "address": "X/E31LD9zUncowx89X5XigJtJ4k=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "ordinal": "6" + } + ] + }, + { + "address": "f8mEMOrtu2Bws1s515hyUEkIg0g=", + "beginOrdinal": "13", + "callType": "CALL", + "caller": "X/E31LD9zUncowx89X5XigJtJ4k=", + "depth": 1, + "endOrdinal": "49", + "executedCode": true, + "gasChanges": [ + { + "newValue": "149459", + "oldValue": "149480", + "ordinal": "14", + "reason": "REASON_CALL_DATA_COPY" + }, + { + "newValue": "146827", + "oldValue": "149327", + "ordinal": "15", + "reason": "REASON_STATE_COLD_ACCESS" + }, + { + "newValue": "2294", + "oldValue": "149427", + "ordinal": "16", + "reason": "REASON_CALL" + }, + { + "newValue": "3867", + "oldValue": "2294", + "ordinal": "48", + "reason": "REASON_REFUND_AFTER_EXECUTION" + } + ], + "gasConsumed": "146239", + "gasLimit": "150000", + "index": 2, + "input": "Vw4aNgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFiUBsxhhaNGkGKWhAdGEloORJdkVF+/uc8AAAAAAAAAAAAAAAB2K641gGfZVMPV/SIhyN+FC30t6gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentIndex": 1, + "returnData": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "stateReverted": true + }, + { + "address": "lAbMYYWjRpBiloQHRhJaDkSXZFQ=", + "beginOrdinal": "17", + "callType": "CALL", + "caller": "f8mEMOrtu2Bws1s515hyUEkIg0g=", + "depth": 2, + "endOrdinal": "47", + "executedCode": true, + "failureReason": "execution reverted", + "gasChanges": [ + { + "newValue": "143783", + "oldValue": "144179", + "ordinal": "18", + "reason": "REASON_CODE_COPY" + }, + { + "newValue": "136634", + "oldValue": "137052", + "ordinal": "19", + "reason": "REASON_CODE_COPY" + }, + { + "newValue": "103642", + "oldValue": "136186", + "ordinal": "20", + "reason": "REASON_CONTRACT_CREATION2" + }, + { + "newValue": "1619", + "oldValue": "103642", + "ordinal": "21", + "reason": "REASON_CONTRACT_CREATION2" + }, + { + "newValue": "1578", + "oldValue": "1581", + "ordinal": "46", + "reason": "REASON_RETURN_DATA_COPY" + } + ], + "gasConsumed": "142960", + "gasLimit": "144533", + "index": 3, + "input": "X7+5zwAAAAAAAAAAAAAAAHYrrjWAZ9lUw9X9IiHI34ULfS3qAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "keccakPreimages": { + "b20e9a365b254be6244c7505a127ea9cd797608e023ebff1d696fef26de7ed6c": "60806040526040516107c13803806107c183398101604081905261002291610321565b61002e82826000610035565b505061043e565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d0838360405180606001604052806027815260200161079a602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103ef565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a357825160000361029c576001600160a01b0385163b61029c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102ad565b6102ad83836102b5565b949350505050565b8151156102c55781518083602001fd5b8060405162461bcd60e51b8152600401610148919061040b565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103105781810151838201526020016102f8565b838111156100645750506000910152565b6000806040838503121561033457600080fd5b82516001600160a01b038116811461034b57600080fd5b60208401519092506001600160401b038082111561036857600080fd5b818501915085601f83011261037c57600080fd5b81518181111561038e5761038e6102df565b604051601f8201601f19908116603f011681019083821181831017156103b6576103b66102df565b816040528281528860208487010111156103cf57600080fd5b6103e08360208301602088016102f5565b80955050505050509250929050565b600082516104018184602087016102f5565b9190910192915050565b602081526000825180602084015261042a8160408501602087016102f5565b601f01601f19169190910160400192915050565b61034d8061044d6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102f1602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516101079190610283565b600060405180830381855af49150503d8060008114610142576040519150601f19603f3d011682016040523d82523d6000602084013e610147565b606091505b509150915061015886838387610162565b9695505050505050565b606083156101fd5782516000036101f65773ffffffffffffffffffffffffffffffffffffffff85163b6101f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610207565b610207838361020f565b949350505050565b81511561021f5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed919061029f565b60005b8381101561026e578181015183820152602001610256565b8381111561027d576000848401525b50505050565b60008251610295818460208701610253565b9190910192915050565b60208152600082518060208401526102be816040850160208701610253565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201cd78ab6a31213989661cff2d7d05fc9b9c38b1a848e8249e2e398659a9eb7e364736f6c634300080f0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65640000000000000000000000008abb13360b87be5eeb1b98647a016add927a136c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de8000000000000000000000000762bae358067d954c3d5fd2221c8df850b7d2dea00000000000000000000000000000000000000000000000000000000", + "c295fa357a42b337dcef09d6023b8381813a7d98d973ef70cfe3b6fd3eb5af8f": "ff9406cc6185a346906296840746125a0e449764540000000000000000000000000000000000000000000000000000000000000000b20e9a365b254be6244c7505a127ea9cd797608e023ebff1d696fef26de7ed6c" + }, + "parentIndex": 2, + "stateReverted": true, + "statusFailed": true, + "statusReverted": true + }, + { + "accountCreations": [ + { + "account": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "ordinal": "24" + } + ], + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "beginOrdinal": "22", + "callType": "CREATE", + "caller": "lAbMYYWjRpBiloQHRhJaDkSXZFQ=", + "depth": 3, + "endOrdinal": "45", + "failureReason": "contract creation code storage out of gas", + "gasChanges": [ + { + "newValue": "101946", + "oldValue": "101982", + "ordinal": "26", + "reason": "REASON_CODE_COPY" + }, + { + "newValue": "75098", + "oldValue": "76223", + "ordinal": "28", + "reason": "REASON_EVENT_LOG" + }, + { + "newValue": "74928", + "oldValue": "74943", + "ordinal": "30", + "reason": "REASON_CODE_COPY" + }, + { + "newValue": "1163", + "oldValue": "74537", + "ordinal": "31", + "reason": "REASON_DELEGATE_CALL" + }, + { + "newValue": "48323", + "oldValue": "1163", + "ordinal": "42", + "reason": "REASON_REFUND_AFTER_EXECUTION" + }, + { + "newValue": "47809", + "oldValue": "47921", + "ordinal": "43", + "reason": "REASON_CODE_COPY" + }, + { + "oldValue": "47806", + "ordinal": "44", + "reason": "REASON_FAILED_EXECUTION" + } + ], + "gasConsumed": "102023", + "gasLimit": "102023", + "index": 4, + "logs": [ + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "ordinal": "29", + "topics": [ + "vHzXWiDuJ/2a3rqzIEH3VSFNvGv/qQzAIls52i5cLTs=", + "AAAAAAAAAAAAAAAAirsTNguHvl7rG5hkegFq3ZJ6E2w=" + ] + } + ], + "nonceChanges": [ + { + "address": "lAbMYYWjRpBiloQHRhJaDkSXZFQ=", + "newValue": "3", + "oldValue": "2", + "ordinal": "23" + }, + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "newValue": "1", + "ordinal": "25" + } + ], + "parentIndex": 3, + "stateReverted": true, + "statusFailed": true, + "storageChanges": [ + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "key": "NgiUoTuhoyEGZ8goSS25jco+IHbMNzWpIKPKUF04K7w=", + "newValue": "AAAAAAAAAAAAAAAAirsTNguHvl7rG5hkegFq3ZJ6E2w=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "27" + } + ] + }, + { + "address": "irsTNguHvl7rG5hkegFq3ZJ6E2w=", + "beginOrdinal": "32", + "callType": "DELEGATE", + "caller": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "depth": 4, + "endOrdinal": "41", + "executedCode": true, + "gasChanges": [ + { + "newValue": "48475", + "oldValue": "49975", + "ordinal": "36", + "reason": "REASON_EVENT_LOG" + }, + { + "newValue": "47173", + "oldValue": "48179", + "ordinal": "39", + "reason": "REASON_EVENT_LOG" + } + ], + "gasConsumed": "26114", + "gasLimit": "73274", + "index": 5, + "input": "xNZt6AAAAAAAAAAAAAAAAHYrrjWAZ9lUw9X9IiHI34ULfS3q", + "logs": [ + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "index": 1, + "ordinal": "37", + "topics": [ + "R+Vcduem8f2JlqHagAjB6ilpnMo157zQV/LewxO25d4=", + "AAAAAAAAAAAAAAAAX/E31LD9zUncowx89X5XigJtJ4k=", + "AAAAAAAAAAAAAAAAdiuuNYBn2VTD1f0iIcjfhQt9Leo=" + ] + }, + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "data": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "index": 2, + "ordinal": "40", + "topics": [ + "fya4P/luHytqaC8TOFL2eYoJxGXalZIUYM77OEdAJJg=" + ] + } + ], + "parentIndex": 4, + "stateReverted": true, + "storageChanges": [ + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "33" + }, + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQE=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "ordinal": "34" + }, + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "newValue": "AAAAAAAAAAAAAHYrrjWAZ9lUw9X9IiHI34ULfS3qAQE=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQE=", + "ordinal": "35" + }, + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "newValue": "AAAAAAAAAAAAAHYrrjWAZ9lUw9X9IiHI34ULfS3qAAE=", + "oldValue": "AAAAAAAAAAAAAHYrrjWAZ9lUw9X9IiHI34ULfS3qAQE=", + "ordinal": "38" + } + ] + } + ], + "endOrdinal": "54", + "from": "diuuNYBn2VTD1f0iIcjfhQt9Leo=", + "gasLimit": "300000", + "gasPrice": { + "bytes": "ASoF8gA=" + }, + "gasUsed": "198281", + "hash": "4t4kgzDQkJ+jBDUJgCn1J0QkxepFeDbojFN7R4lupdY=", + "input": "H62UjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAdiuuNYBn2VTD1f0iIcjfhQt9LeoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABCAAAAAAAAAAAAAAAAACO4OBgTp9mNlz73DP47b9PrWvjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACSfAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADuaygAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFiUBsxhhaNGkGKWhAdGEloORJdkVF+/uc8AAAAAAAAAAAAAAAB2K641gGfZVMPV/SIhyN+FC30t6gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5LYdJ/YAAAAAAAAAAAAAAAB9dzrz0pdDRC3JkcFoxDTZmDanIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAlep7MAAAAAAAAAAAAAAAC5jLHaT5vWQIefC7yzClQchBY0Bv//////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKLmMsdpPm9ZAh58LvLMKVByEFjQGfXc689KXQ0QtyZHBaMQ02Zg2pyMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQWPbbHRb92GQN0A5BcCRplGg0yKGn1EwMQ93f/0H+09pWGuA5GRL1aXDgP2qgF5V+4i3OkM10yvL+4eJ8UgTtYIcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI7g4GBOn2Y2XPvcM/jtv0+ta+PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJJ8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO5rKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWJQGzGGFo0aQYpaEB0YSWg5El2RUX7+5zwAAAAAAAAAAAAAAAHYrrjWAZ9lUw9X9IiHI34ULfS3qAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADkth0n9gAAAAAAAAAAAAAAAH13OvPSl0NELcmRwWjENNmYNqcjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEqQWcuwAAAAAAAAAAAAAAAAI7g4GBOn2Y2XPvcM/jtv0+ta+PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADeC2s6dkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAouYyx2k+b1kCHnwu8swpUHIQWNAZ9dzrz0pdDRC3JkcFoxDTZmDanIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBdXr7NNBzY7d7FR1EcG8QFoP7byo4jlRHObr95zrDf6gLFDbbZsjtIMqWubWmj4oVtRCklUggA3RTcOHI3aTRixsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "nonce": "4", + "r": "SDMAY2eUIzuof42iuJbp7ICVqnBmYRZTwaymE2ozrcA=", + "receipt": { + "cumulativeGasUsed": "198281", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "s": "bk+EAD3UiLUfxRzH3Bbv5y8N7rhKESSMRwXu3bqryaQ=", + "status": "REVERTED", + "to": "X/E31LD9zUncowx89X5XigJtJ4k=", + "v": "hPM=" + } + ], + "ver": 3 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/extra_account_creations/fh3.0/block.207938.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/extra_account_creations/fh3.0/block.207938.golden.json new file mode 100644 index 0000000000..9dde4eb9cf --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/extra_account_creations/fh3.0/block.207938.golden.json @@ -0,0 +1,450 @@ +{ + "hash": "pmFJOXlO1smEJbK4oUBqjZ0iFBpYsTq50dyNbEiZ+Mw=", + "header": { + "baseFeePerGas": { + "bytes": "Bw==" + }, + "coinbase": "RV5aoYRpvGzO9JWUZFZmxYejpxs=", + "difficulty": { + "bytes": "AA==" + }, + "gasLimit": "30000000", + "hash": "pmFJOXlO1smEJbK4oUBqjZ0iFBpYsTq50dyNbEiZ+Mw=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "207938", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "nHyKL2uLMm9sBbmXgBbS0IWWvNldDJ8aquJBacj/BYg=", + "receiptRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "stateRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "timestamp": "2023-10-29T10:11:12Z", + "transactionsRoot": "0yEw5Z71BzpX25P3pM6JtJzwwAKrFMgJGulCMo+tLw8=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=" + }, + "number": "207938", + "size": "2807", + "transactionTraces": [ + { + "beginOrdinal": "1", + "calls": [ + { + "address": "X/E31LD9zUncowx89X5XigJtJ4k=", + "balanceChanges": [ + { + "address": "diuuNYBn2VTD1f0iIcjfhQt9Leo=", + "newValue": { + "bytes": "BBz5LMZCX1A=" + }, + "oldValue": { + "bytes": "BCJNar1sH1A=" + }, + "ordinal": "2", + "reason": "REASON_GAS_BUY" + }, + { + "address": "diuuNYBn2VTD1f0iIcjfhQt9Leo=", + "newValue": { + "bytes": "BB7HvUaRnVA=" + }, + "oldValue": { + "bytes": "BBz5LMZCX1A=" + }, + "ordinal": "52", + "reason": "REASON_GAS_REFUND" + }, + { + "address": "RV5aoYRpvGzO9JWUZFZmxYejpxs=", + "newValue": { + "bytes": "0c8D1KMdnac=" + }, + "oldValue": { + "bytes": "0ct+JyxYSWY=" + }, + "ordinal": "53", + "reason": "REASON_REWARD_TRANSACTION_FEE" + } + ], + "callType": "CALL", + "caller": "diuuNYBn2VTD1f0iIcjfhQt9Leo=", + "endOrdinal": "51", + "executedCode": true, + "failureReason": "execution reverted", + "gasChanges": [ + { + "newValue": "263880", + "oldValue": "300000", + "ordinal": "3", + "reason": "REASON_INTRINSIC_GAS" + }, + { + "newValue": "255906", + "oldValue": "255927", + "ordinal": "7", + "reason": "REASON_CALL_DATA_COPY" + }, + { + "newValue": "255616", + "oldValue": "255659", + "ordinal": "8", + "reason": "REASON_CALL_DATA_COPY" + }, + { + "newValue": "255327", + "oldValue": "255336", + "ordinal": "9", + "reason": "REASON_CALL_DATA_COPY" + }, + { + "newValue": "251104", + "oldValue": "251122", + "ordinal": "10", + "reason": "REASON_CALL_DATA_COPY" + }, + { + "newValue": "248417", + "oldValue": "250917", + "ordinal": "11", + "reason": "REASON_STATE_COLD_ACCESS" + }, + { + "newValue": "98417", + "oldValue": "251017", + "ordinal": "12", + "reason": "REASON_CALL" + }, + { + "newValue": "102178", + "oldValue": "98417", + "ordinal": "50", + "reason": "REASON_REFUND_AFTER_EXECUTION" + } + ], + "gasConsumed": "162161", + "gasLimit": "263880", + "index": 1, + "input": "H62UjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAdiuuNYBn2VTD1f0iIcjfhQt9LeoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABCAAAAAAAAAAAAAAAAACO4OBgTp9mNlz73DP47b9PrWvjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACSfAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADuaygAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFiUBsxhhaNGkGKWhAdGEloORJdkVF+/uc8AAAAAAAAAAAAAAAB2K641gGfZVMPV/SIhyN+FC30t6gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5LYdJ/YAAAAAAAAAAAAAAAB9dzrz0pdDRC3JkcFoxDTZmDanIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAlep7MAAAAAAAAAAAAAAAC5jLHaT5vWQIefC7yzClQchBY0Bv//////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKLmMsdpPm9ZAh58LvLMKVByEFjQGfXc689KXQ0QtyZHBaMQ02Zg2pyMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQWPbbHRb92GQN0A5BcCRplGg0yKGn1EwMQ93f/0H+09pWGuA5GRL1aXDgP2qgF5V+4i3OkM10yvL+4eJ8UgTtYIcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI7g4GBOn2Y2XPvcM/jtv0+ta+PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJJ8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO5rKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWJQGzGGFo0aQYpaEB0YSWg5El2RUX7+5zwAAAAAAAAAAAAAAAHYrrjWAZ9lUw9X9IiHI34ULfS3qAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADkth0n9gAAAAAAAAAAAAAAAH13OvPSl0NELcmRwWjENNmYNqcjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEqQWcuwAAAAAAAAAAAAAAAAI7g4GBOn2Y2XPvcM/jtv0+ta+PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADeC2s6dkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAouYyx2k+b1kCHnwu8swpUHIQWNAZ9dzrz0pdDRC3JkcFoxDTZmDanIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBdXr7NNBzY7d7FR1EcG8QFoP7byo4jlRHObr95zrDf6gLFDbbZsjtIMqWubWmj4oVtRCklUggA3RTcOHI3aTRixsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "keccakPreimages": { + "28d9e8e57be8527d0679250d50e4fae027ae189be41776c0a4a2a0a42c2218da": "a16ebae5813bd19aa03287aa905d783611ff8b419ce30428f2da9457d9aa27630000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d27890000000000000000000000000000000000000000000000000000000000004268", + "58ce8202536a0e9871f92a2e42a02c92ee563a7817d29ae23b734f34e7ddda6c": "b98cb1da4f9bd640879f0bbcb30a541c841634067d773af3d29743442dc991c168c434d99836a723", + "a16ebae5813bd19aa03287aa905d783611ff8b419ce30428f2da9457d9aa2763": "000000000000000000000000023b8381813a7d98d973ef70cfe3b6fd3eb5af8f0000000000000000000000000000000000000000000000000000000000000000fe7e16dbeb61a0da1615b2a5b44efb2dc9288a102d97b83968a814c67dcb8b08d525d4a8e0332b956f801a3fc3094f9edf480fcda1a4ea641e7c51240fd0b2da000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000249f000000000000000000000000000000000000000000000000000000000000052080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b9aca0058ce8202536a0e9871f92a2e42a02c92ee563a7817d29ae23b734f34e7ddda6c", + "d525d4a8e0332b956f801a3fc3094f9edf480fcda1a4ea641e7c51240fd0b2da": "b61d27f60000000000000000000000007d773af3d29743442dc991c168c434d99836a723000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000b98cb1da4f9bd640879f0bbcb30a541c84163406ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000", + "fe7e16dbeb61a0da1615b2a5b44efb2dc9288a102d97b83968a814c67dcb8b08": "9406cc6185a346906296840746125a0e449764545fbfb9cf000000000000000000000000762bae358067d954c3d5fd2221c8df850b7d2dea0000000000000000000000000000000000000000000000000000000000000000" + }, + "nonceChanges": [ + { + "address": "diuuNYBn2VTD1f0iIcjfhQt9Leo=", + "newValue": "5", + "oldValue": "4", + "ordinal": "4" + } + ], + "returnData": "IgJmtgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG0FBMTMgaW5pdENvZGUgZmFpbGVkIG9yIE9PRwAAAAAA", + "stateReverted": true, + "statusFailed": true, + "statusReverted": true, + "storageChanges": [ + { + "address": "X/E31LD9zUncowx89X5XigJtJ4k=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "ordinal": "6" + } + ] + }, + { + "address": "f8mEMOrtu2Bws1s515hyUEkIg0g=", + "beginOrdinal": "13", + "callType": "CALL", + "caller": "X/E31LD9zUncowx89X5XigJtJ4k=", + "depth": 1, + "endOrdinal": "49", + "executedCode": true, + "gasChanges": [ + { + "newValue": "149459", + "oldValue": "149480", + "ordinal": "14", + "reason": "REASON_CALL_DATA_COPY" + }, + { + "newValue": "146827", + "oldValue": "149327", + "ordinal": "15", + "reason": "REASON_STATE_COLD_ACCESS" + }, + { + "newValue": "2294", + "oldValue": "149427", + "ordinal": "16", + "reason": "REASON_CALL" + }, + { + "newValue": "3867", + "oldValue": "2294", + "ordinal": "48", + "reason": "REASON_REFUND_AFTER_EXECUTION" + } + ], + "gasConsumed": "146239", + "gasLimit": "150000", + "index": 2, + "input": "Vw4aNgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFiUBsxhhaNGkGKWhAdGEloORJdkVF+/uc8AAAAAAAAAAAAAAAB2K641gGfZVMPV/SIhyN+FC30t6gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentIndex": 1, + "returnData": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "stateReverted": true + }, + { + "address": "lAbMYYWjRpBiloQHRhJaDkSXZFQ=", + "beginOrdinal": "17", + "callType": "CALL", + "caller": "f8mEMOrtu2Bws1s515hyUEkIg0g=", + "depth": 2, + "endOrdinal": "47", + "executedCode": true, + "failureReason": "execution reverted", + "gasChanges": [ + { + "newValue": "143783", + "oldValue": "144179", + "ordinal": "18", + "reason": "REASON_CODE_COPY" + }, + { + "newValue": "136634", + "oldValue": "137052", + "ordinal": "19", + "reason": "REASON_CODE_COPY" + }, + { + "newValue": "103642", + "oldValue": "136186", + "ordinal": "20", + "reason": "REASON_CONTRACT_CREATION2" + }, + { + "newValue": "1619", + "oldValue": "103642", + "ordinal": "21", + "reason": "REASON_CONTRACT_CREATION2" + }, + { + "newValue": "1578", + "oldValue": "1581", + "ordinal": "46", + "reason": "REASON_RETURN_DATA_COPY" + } + ], + "gasConsumed": "142960", + "gasLimit": "144533", + "index": 3, + "input": "X7+5zwAAAAAAAAAAAAAAAHYrrjWAZ9lUw9X9IiHI34ULfS3qAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "keccakPreimages": { + "b20e9a365b254be6244c7505a127ea9cd797608e023ebff1d696fef26de7ed6c": "60806040526040516107c13803806107c183398101604081905261002291610321565b61002e82826000610035565b505061043e565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d0838360405180606001604052806027815260200161079a602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103ef565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a357825160000361029c576001600160a01b0385163b61029c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102ad565b6102ad83836102b5565b949350505050565b8151156102c55781518083602001fd5b8060405162461bcd60e51b8152600401610148919061040b565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103105781810151838201526020016102f8565b838111156100645750506000910152565b6000806040838503121561033457600080fd5b82516001600160a01b038116811461034b57600080fd5b60208401519092506001600160401b038082111561036857600080fd5b818501915085601f83011261037c57600080fd5b81518181111561038e5761038e6102df565b604051601f8201601f19908116603f011681019083821181831017156103b6576103b66102df565b816040528281528860208487010111156103cf57600080fd5b6103e08360208301602088016102f5565b80955050505050509250929050565b600082516104018184602087016102f5565b9190910192915050565b602081526000825180602084015261042a8160408501602087016102f5565b601f01601f19169190910160400192915050565b61034d8061044d6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102f1602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516101079190610283565b600060405180830381855af49150503d8060008114610142576040519150601f19603f3d011682016040523d82523d6000602084013e610147565b606091505b509150915061015886838387610162565b9695505050505050565b606083156101fd5782516000036101f65773ffffffffffffffffffffffffffffffffffffffff85163b6101f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610207565b610207838361020f565b949350505050565b81511561021f5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed919061029f565b60005b8381101561026e578181015183820152602001610256565b8381111561027d576000848401525b50505050565b60008251610295818460208701610253565b9190910192915050565b60208152600082518060208401526102be816040850160208701610253565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201cd78ab6a31213989661cff2d7d05fc9b9c38b1a848e8249e2e398659a9eb7e364736f6c634300080f0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c65640000000000000000000000008abb13360b87be5eeb1b98647a016add927a136c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000024c4d66de8000000000000000000000000762bae358067d954c3d5fd2221c8df850b7d2dea00000000000000000000000000000000000000000000000000000000", + "c295fa357a42b337dcef09d6023b8381813a7d98d973ef70cfe3b6fd3eb5af8f": "ff9406cc6185a346906296840746125a0e449764540000000000000000000000000000000000000000000000000000000000000000b20e9a365b254be6244c7505a127ea9cd797608e023ebff1d696fef26de7ed6c" + }, + "parentIndex": 2, + "stateReverted": true, + "statusFailed": true, + "statusReverted": true + }, + { + "accountCreations": [ + { + "account": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "ordinal": "24" + } + ], + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "beginOrdinal": "22", + "callType": "CREATE", + "caller": "lAbMYYWjRpBiloQHRhJaDkSXZFQ=", + "depth": 3, + "endOrdinal": "45", + "failureReason": "contract creation code storage out of gas", + "gasChanges": [ + { + "newValue": "101946", + "oldValue": "101982", + "ordinal": "26", + "reason": "REASON_CODE_COPY" + }, + { + "newValue": "75098", + "oldValue": "76223", + "ordinal": "28", + "reason": "REASON_EVENT_LOG" + }, + { + "newValue": "74928", + "oldValue": "74943", + "ordinal": "30", + "reason": "REASON_CODE_COPY" + }, + { + "newValue": "1163", + "oldValue": "74537", + "ordinal": "31", + "reason": "REASON_DELEGATE_CALL" + }, + { + "newValue": "48323", + "oldValue": "1163", + "ordinal": "42", + "reason": "REASON_REFUND_AFTER_EXECUTION" + }, + { + "newValue": "47809", + "oldValue": "47921", + "ordinal": "43", + "reason": "REASON_CODE_COPY" + }, + { + "oldValue": "47806", + "ordinal": "44", + "reason": "REASON_FAILED_EXECUTION" + } + ], + "gasConsumed": "102023", + "gasLimit": "102023", + "index": 4, + "logs": [ + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "ordinal": "29", + "topics": [ + "vHzXWiDuJ/2a3rqzIEH3VSFNvGv/qQzAIls52i5cLTs=", + "AAAAAAAAAAAAAAAAirsTNguHvl7rG5hkegFq3ZJ6E2w=" + ] + } + ], + "nonceChanges": [ + { + "address": "lAbMYYWjRpBiloQHRhJaDkSXZFQ=", + "newValue": "3", + "oldValue": "2", + "ordinal": "23" + }, + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "newValue": "1", + "ordinal": "25" + } + ], + "parentIndex": 3, + "stateReverted": true, + "statusFailed": true, + "storageChanges": [ + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "key": "NgiUoTuhoyEGZ8goSS25jco+IHbMNzWpIKPKUF04K7w=", + "newValue": "AAAAAAAAAAAAAAAAirsTNguHvl7rG5hkegFq3ZJ6E2w=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "27" + } + ] + }, + { + "address": "irsTNguHvl7rG5hkegFq3ZJ6E2w=", + "beginOrdinal": "32", + "callType": "DELEGATE", + "caller": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "depth": 4, + "endOrdinal": "41", + "executedCode": true, + "gasChanges": [ + { + "newValue": "48475", + "oldValue": "49975", + "ordinal": "36", + "reason": "REASON_EVENT_LOG" + }, + { + "newValue": "47173", + "oldValue": "48179", + "ordinal": "39", + "reason": "REASON_EVENT_LOG" + } + ], + "gasConsumed": "26114", + "gasLimit": "73274", + "index": 5, + "input": "xNZt6AAAAAAAAAAAAAAAAHYrrjWAZ9lUw9X9IiHI34ULfS3q", + "logs": [ + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "index": 1, + "ordinal": "37", + "topics": [ + "R+Vcduem8f2JlqHagAjB6ilpnMo157zQV/LewxO25d4=", + "AAAAAAAAAAAAAAAAX/E31LD9zUncowx89X5XigJtJ4k=", + "AAAAAAAAAAAAAAAAdiuuNYBn2VTD1f0iIcjfhQt9Leo=" + ] + }, + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "data": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "index": 2, + "ordinal": "40", + "topics": [ + "fya4P/luHytqaC8TOFL2eYoJxGXalZIUYM77OEdAJJg=" + ] + } + ], + "parentIndex": 4, + "stateReverted": true, + "storageChanges": [ + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "33" + }, + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQE=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "ordinal": "34" + }, + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "newValue": "AAAAAAAAAAAAAHYrrjWAZ9lUw9X9IiHI34ULfS3qAQE=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQE=", + "ordinal": "35" + }, + { + "address": "AjuDgYE6fZjZc+9wz+O2/T61r48=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "newValue": "AAAAAAAAAAAAAHYrrjWAZ9lUw9X9IiHI34ULfS3qAAE=", + "oldValue": "AAAAAAAAAAAAAHYrrjWAZ9lUw9X9IiHI34ULfS3qAQE=", + "ordinal": "38" + } + ] + } + ], + "endOrdinal": "54", + "from": "diuuNYBn2VTD1f0iIcjfhQt9Leo=", + "gasLimit": "300000", + "gasPrice": { + "bytes": "ASoF8gA=" + }, + "gasUsed": "198281", + "hash": "4t4kgzDQkJ+jBDUJgCn1J0QkxepFeDbojFN7R4lupdY=", + "input": "H62UjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAdiuuNYBn2VTD1f0iIcjfhQt9LeoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABCAAAAAAAAAAAAAAAAACO4OBgTp9mNlz73DP47b9PrWvjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACSfAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADuaygAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFiUBsxhhaNGkGKWhAdGEloORJdkVF+/uc8AAAAAAAAAAAAAAAB2K641gGfZVMPV/SIhyN+FC30t6gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5LYdJ/YAAAAAAAAAAAAAAAB9dzrz0pdDRC3JkcFoxDTZmDanIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAlep7MAAAAAAAAAAAAAAAC5jLHaT5vWQIefC7yzClQchBY0Bv//////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKLmMsdpPm9ZAh58LvLMKVByEFjQGfXc689KXQ0QtyZHBaMQ02Zg2pyMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQWPbbHRb92GQN0A5BcCRplGg0yKGn1EwMQ93f/0H+09pWGuA5GRL1aXDgP2qgF5V+4i3OkM10yvL+4eJ8UgTtYIcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI7g4GBOn2Y2XPvcM/jtv0+ta+PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJJ8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAO5rKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWJQGzGGFo0aQYpaEB0YSWg5El2RUX7+5zwAAAAAAAAAAAAAAAHYrrjWAZ9lUw9X9IiHI34ULfS3qAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADkth0n9gAAAAAAAAAAAAAAAH13OvPSl0NELcmRwWjENNmYNqcjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEqQWcuwAAAAAAAAAAAAAAAAI7g4GBOn2Y2XPvcM/jtv0+ta+PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADeC2s6dkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAouYyx2k+b1kCHnwu8swpUHIQWNAZ9dzrz0pdDRC3JkcFoxDTZmDanIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBdXr7NNBzY7d7FR1EcG8QFoP7byo4jlRHObr95zrDf6gLFDbbZsjtIMqWubWmj4oVtRCklUggA3RTcOHI3aTRixsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "nonce": "4", + "r": "SDMAY2eUIzuof42iuJbp7ICVqnBmYRZTwaymE2ozrcA=", + "receipt": { + "cumulativeGasUsed": "198281", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "s": "bk+EAD3UiLUfxRzH3Bbv5y8N7rhKESSMRwXu3bqryaQ=", + "status": "REVERTED", + "to": "X/E31LD9zUncowx89X5XigJtJ4k=", + "v": "hPM=" + } + ], + "ver": 3 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/extra_account_creations/prestate.json b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/extra_account_creations/prestate.json new file mode 100644 index 0000000000..c5d94aef3e --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/extra_account_creations/prestate.json @@ -0,0 +1,182 @@ +{ + "context": { + "baseFeePerGas": "7", + "difficulty": "0", + "gasLimit": "30000000", + "miner": "0x455e5aa18469bc6ccef49594645666c587a3a71b", + "number": "207938", + "timestamp": "1698574272" + }, + "genesis": { + "alloc": { + "0x023b8381813a7d98d973ef70cfe3b6fd3eb5af8f": { + "balance": "0x2386f26fc10000", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "0x455e5aa18469bc6ccef49594645666c587a3a71b": { + "balance": "0xd1cb7e272c584966" + }, + "0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789": { + "balance": "0x0", + "code": "0x60806040526004361015610023575b361561001957600080fd5b610021615531565b005b60003560e01c80630396cb60146101b35780630bd28e3b146101aa5780631b2e01b8146101a15780631d732756146101985780631fad948c1461018f578063205c28781461018657806335567e1a1461017d5780634b1d7cf5146101745780635287ce121461016b57806370a08231146101625780638f41ec5a14610159578063957122ab146101505780639b249f6914610147578063a61935311461013e578063b760faf914610135578063bb9fe6bf1461012c578063c23a5cea14610123578063d6383f941461011a578063ee219423146101115763fc7e286d0361000e5761010c611bcd565b61000e565b5061010c6119b5565b5061010c61184d565b5061010c6116b4565b5061010c611536565b5061010c6114f7565b5061010c6114d6565b5061010c611337565b5061010c611164565b5061010c611129565b5061010c6110a4565b5061010c610f54565b5061010c610bf8565b5061010c610b33565b5061010c610994565b5061010c6108ba565b5061010c6106e7565b5061010c610467565b5061010c610385565b5060207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103595760043563ffffffff8116808203610359576103547fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01916102716102413373ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b9161024d811515615697565b61026a610261600185015463ffffffff1690565b63ffffffff1690565b11156156fc565b54926103366dffffffffffffffffffffffffffff946102f461029834888460781c166121d5565b966102a4881515615761565b6102b0818911156157c6565b6102d4816102bc6105ec565b941684906dffffffffffffffffffffffffffff169052565b6001602084015287166dffffffffffffffffffffffffffff166040830152565b63ffffffff83166060820152600060808201526103313373ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b61582b565b6040805194855263ffffffff90911660208501523393918291820190565b0390a2005b600080fd5b6024359077ffffffffffffffffffffffffffffffffffffffffffffffff8216820361035957565b50346103595760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103595760043577ffffffffffffffffffffffffffffffffffffffffffffffff81168103610359576104149033600052600160205260406000209077ffffffffffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b61041e8154612491565b9055005b73ffffffffffffffffffffffffffffffffffffffff81160361035957565b6024359061044d82610422565b565b60c4359061044d82610422565b359061044d82610422565b50346103595760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103595760206104fc6004356104a881610422565b73ffffffffffffffffffffffffffffffffffffffff6104c561035e565b91166000526001835260406000209077ffffffffffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54604051908152f35b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60a0810190811067ffffffffffffffff82111761055157604052565b610559610505565b604052565b610100810190811067ffffffffffffffff82111761055157604052565b67ffffffffffffffff811161055157604052565b6060810190811067ffffffffffffffff82111761055157604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761055157604052565b6040519061044d82610535565b6040519060c0820182811067ffffffffffffffff82111761055157604052565b604051906040820182811067ffffffffffffffff82111761055157604052565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209267ffffffffffffffff8111610675575b01160190565b61067d610505565b61066f565b92919261068e82610639565b9161069c60405193846105ab565b829481845281830111610359578281602093846000960137010152565b9181601f840112156103595782359167ffffffffffffffff8311610359576020838186019501011161035957565b5034610359576101c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103595767ffffffffffffffff60043581811161035957366023820112156103595761074a903690602481600401359101610682565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc36016101808112610359576101006040519161078783610535565b12610359576040516107988161055e565b6107a0610440565b815260443560208201526064356040820152608435606082015260a43560808201526107ca61044f565b60a082015260e43560c08201526101043560e082015281526101243560208201526101443560408201526101643560608201526101843560808201526101a4359182116103595761083e9261082661082e9336906004016106b9565b9290916128b1565b6040519081529081906020820190565b0390f35b9060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8301126103595760043567ffffffffffffffff9283821161035957806023830112156103595781600401359384116103595760248460051b830101116103595760240191906024356108b781610422565b90565b5034610359576108c936610842565b6108d4929192611e3a565b6108dd83611d2d565b60005b84811061095d57506000927fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f9728480a183915b85831061092d576109238585611ed7565b6100216001600255565b909193600190610953610941878987611dec565b61094b8886611dca565b51908861233f565b0194019190610912565b8061098b610984610972600194869896611dca565b5161097e848a88611dec565b84613448565b9083612f30565b019290926108e0565b50346103595760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610359576004356109d081610422565b6024359060009133835282602052604083206dffffffffffffffffffffffffffff81541692838311610ad557848373ffffffffffffffffffffffffffffffffffffffff829593610a788496610a3f610a2c8798610ad29c6121c0565b6dffffffffffffffffffffffffffff1690565b6dffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffff0000000000000000000000000000825416179055565b6040805173ffffffffffffffffffffffffffffffffffffffff831681526020810185905233917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb91a2165af1610acc611ea7565b50615ba2565b80f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f576974686472617720616d6f756e7420746f6f206c61726765000000000000006044820152fd5b50346103595760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610359576020600435610b7181610422565b73ffffffffffffffffffffffffffffffffffffffff610b8e61035e565b911660005260018252610bc98160406000209077ffffffffffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000006040519260401b16178152f35b503461035957610c0736610842565b610c0f611e3a565b6000805b838210610df657610c249150611d2d565b7fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f972600080a16000805b848110610d5c57505060008093815b818110610c9357610923868660007f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d8180a2611ed7565b610cf7610ca182848a6124cb565b610ccc610cb3610cb36020840161256d565b73ffffffffffffffffffffffffffffffffffffffff1690565b7f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d600080a280612519565b906000915b808310610d1457505050610d0f90612491565b610c5c565b90919497610d4f610d49610d5592610d438c8b610d3c82610d368e8b8d611dec565b92611dca565b519161233f565b906121d5565b99612491565b95612491565b9190610cfc565b610d678186886124cb565b6020610d7f610d768380612519565b9290930161256d565b9173ffffffffffffffffffffffffffffffffffffffff60009316905b828410610db45750505050610daf90612491565b610c4d565b90919294610d4f81610de985610de2610dd0610dee968d611dca565b51610ddc8c8b8a611dec565b85613448565b908b613148565b612491565b929190610d9b565b610e018285876124cb565b90610e0c8280612519565b92610e1c610cb36020830161256d565b9173ffffffffffffffffffffffffffffffffffffffff8316610e416001821415612577565b610e62575b505050610e5c91610e56916121d5565b91612491565b90610c13565b909592610e7b6040999693999895989788810190611fc8565b92908a3b156103595789938b918a5193849283927fe3563a4f00000000000000000000000000000000000000000000000000000000845260049e8f850193610ec294612711565b03815a93600094fa9081610f3b575b50610f255786517f86a9f75000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a16818a0190815281906020010390fd5b0390fd5b9497509295509093509181610e56610e5c610e46565b80610f48610f4e9261057b565b8061111e565b38610ed1565b50346103595760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103595761083e73ffffffffffffffffffffffffffffffffffffffff600435610fa881610422565b608060409283928351610fba81610535565b60009381858093528260208201528287820152826060820152015216815280602052209061104965ffffffffffff6001835194610ff686610535565b80546dffffffffffffffffffffffffffff8082168852607082901c60ff161515602089015260789190911c1685870152015463ffffffff8116606086015260201c16608084019065ffffffffffff169052565b5191829182919091608065ffffffffffff8160a08401956dffffffffffffffffffffffffffff808251168652602082015115156020870152604082015116604086015263ffffffff6060820151166060860152015116910152565b50346103595760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103595773ffffffffffffffffffffffffffffffffffffffff6004356110f581610422565b16600052600060205260206dffffffffffffffffffffffffffff60406000205416604051908152f35b600091031261035957565b50346103595760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261035957602060405160018152f35b50346103595760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261035957600467ffffffffffffffff8135818111610359576111b590369084016106b9565b9050602435916111c483610422565b604435908111610359576111db90369085016106b9565b92909115908161132d575b506112c6576014821015611236575b610f21836040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352820160409060208152600060208201520190565b6112466112529261124c92612b88565b90612b96565b60601c90565b3b1561125f5738806111f5565b610f21906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352820160609060208152601b60208201527f41413330207061796d6173746572206e6f74206465706c6f796564000000000060408201520190565b610f21836040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352820160609060208152601960208201527f41413230206163636f756e74206e6f74206465706c6f7965640000000000000060408201520190565b90503b15386111e6565b50346103595760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103595760043567ffffffffffffffff81116103595761138960249136906004016106b9565b906113bf6040519283927f570e1a3600000000000000000000000000000000000000000000000000000000845260048401612d2c565b0360208273ffffffffffffffffffffffffffffffffffffffff92816000857f0000000000000000000000007fc98430eaedbb6070b35b39d798725049088348165af1918215611471575b600092611441575b50604051917f6ca7b806000000000000000000000000000000000000000000000000000000008352166004820152fd5b61146391925060203d811161146a575b61145b81836105ab565b810190612d17565b9038611411565b503d611451565b611479612183565b611409565b90816101609103126103595790565b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc820112610359576004359067ffffffffffffffff8211610359576108b79160040161147e565b50346103595760206114ef6114ea3661148d565b612a0c565b604051908152f35b5060207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103595761002160043561153181610422565b61562b565b5034610359576000807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126116b1573381528060205260408120600181019063ffffffff825416908115611653576115f06115b5611618936115a76115a2855460ff9060701c1690565b61598f565b65ffffffffffff42166159f4565b84547fffffffffffffffffffffffffffffffffffffffffffff000000000000ffffffff16602082901b69ffffffffffff000000001617909455565b7fffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffff8154169055565b60405165ffffffffffff91909116815233907ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a90602090a280f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74207374616b6564000000000000000000000000000000000000000000006044820152fd5b80fd5b50346103595760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610359576004356116f081610422565b610ad273ffffffffffffffffffffffffffffffffffffffff6117323373ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b926117ea611755610a2c86546dffffffffffffffffffffffffffff9060781c1690565b94611761861515615a0e565b6117c26001820161179a65ffffffffffff611786835465ffffffffffff9060201c1690565b16611792811515615a73565b421015615ad8565b80547fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000169055565b7fffffff0000000000000000000000000000ffffffffffffffffffffffffffffff8154169055565b6040805173ffffffffffffffffffffffffffffffffffffffff831681526020810186905233917fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda391a2600080809581948294165af1611847611ea7565b50615b3d565b50346103595760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103595767ffffffffffffffff6004358181116103595761189e90369060040161147e565b602435916118ab83610422565b604435908111610359576118c6610f219136906004016106b9565b6118ce611caa565b6118d785612e2b565b6118ea6118e48287613240565b906153ba565b946118fa826000924384526121e2565b96438252819360609573ffffffffffffffffffffffffffffffffffffffff8316611981575b50505050608001519361194e6040611940602084015165ffffffffffff1690565b92015165ffffffffffff1690565b906040519687967f8b7ac980000000000000000000000000000000000000000000000000000000008852600488016127e1565b8395508394965061199b60409492939451809481936127d3565b03925af19060806119aa611ea7565b92919038808061191f565b5034610359576119c43661148d565b6119cc611caa565b6119d582612e2b565b6119df8183613240565b825160a00151919391611a0c9073ffffffffffffffffffffffffffffffffffffffff166154dc565b6154dc565b90611a30611a07855173ffffffffffffffffffffffffffffffffffffffff90511690565b94611a39612b50565b50611a68611a4c60409586810190611fc8565b90600060148310611bc55750611246611a079261124c92612b88565b91611a72916153ba565b805173ffffffffffffffffffffffffffffffffffffffff169073ffffffffffffffffffffffffffffffffffffffff821660018114916080880151978781015191886020820151611ac79065ffffffffffff1690565b91015165ffffffffffff16916060015192611ae06105f9565b9a8b5260208b0152841515898b015265ffffffffffff1660608a015265ffffffffffff16608089015260a088015215159081611bbc575b50611b515750610f2192519485947fe0cff05f00000000000000000000000000000000000000000000000000000000865260048601612cbd565b9190610f2193611b60846154dc565b611b87611b6b610619565b73ffffffffffffffffffffffffffffffffffffffff9096168652565b6020850152519586957ffaecb4e400000000000000000000000000000000000000000000000000000000875260048701612c2b565b90501538611b17565b9150506154dc565b50346103595760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103595773ffffffffffffffffffffffffffffffffffffffff600435611c1e81610422565b16600052600060205260a0604060002065ffffffffffff60018254920154604051926dffffffffffffffffffffffffffff90818116855260ff8160701c161515602086015260781c16604084015263ffffffff8116606084015260201c166080820152f35b60209067ffffffffffffffff8111611c9d575b60051b0190565b611ca5610505565b611c96565b60405190611cb782610535565b604051608083610100830167ffffffffffffffff811184821017611d20575b60405260009283815283602082015283604082015283606082015283838201528360a08201528360c08201528360e082015281528260208201528260408201528260608201520152565b611d28610505565b611cd6565b90611d3782611c83565b611d4460405191826105ab565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611d728294611c83565b019060005b828110611d8357505050565b602090611d8e611caa565b82828501015201611d77565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020918151811015611ddf575b60051b010190565b611de7611d9a565b611dd7565b9190811015611e2d575b60051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffea181360301821215610359570190565b611e35611d9a565b611df6565b6002805414611e495760028055565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b3d15611ed2573d90611eb882610639565b91611ec660405193846105ab565b82523d6000602084013e565b606090565b73ffffffffffffffffffffffffffffffffffffffff168015611f6a57600080809381935af1611f04611ea7565b5015611f0c57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f41413931206661696c65642073656e6420746f2062656e6566696369617279006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4141393020696e76616c69642062656e656669636961727900000000000000006044820152fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610359570180359067ffffffffffffffff82116103595760200191813603831361035957565b90816020910312610359575190565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b60005b83811061207a5750506000910152565b818101518382015260200161206a565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936120c681518092818752878088019101612067565b0116010190565b906120e76080916108b796946101c0808652850191612028565b9360e0815173ffffffffffffffffffffffffffffffffffffffff80825116602087015260208201516040870152604082015160608701526060820151858701528482015160a087015260a08201511660c086015260c081015182860152015161010084015260208101516101208401526040810151610140840152606081015161016084015201516101808201526101a081840391015261208a565b506040513d6000823e3d90fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b919082039182116121cd57565b61044d612190565b919082018092116121cd57565b905a918160206121fb6060830151936060810190611fc8565b906122348560405195869485947f1d732756000000000000000000000000000000000000000000000000000000008652600486016120cd565b03816000305af16000918161230f575b50612308575060206000803e7fdeaddead000000000000000000000000000000000000000000000000000000006000511461229b5761229561228a6108b7945a906121c0565b6080840151906121d5565b91614afc565b6040517f220266b600000000000000000000000000000000000000000000000000000000815280610f21600482016080906000815260406020820152600f60408201527f41413935206f7574206f6620676173000000000000000000000000000000000060608201520190565b9250505090565b61233191925060203d8111612338575b61232981836105ab565b810190612019565b9038612244565b503d61231f565b909291925a9380602061235b6060830151946060810190611fc8565b906123948660405195869485947f1d732756000000000000000000000000000000000000000000000000000000008652600486016120cd565b03816000305af160009181612471575b5061246a575060206000803e7fdeaddead00000000000000000000000000000000000000000000000000000000600051146123fc576123f66123eb6108b795965a906121c0565b6080830151906121d5565b92614ddf565b610f21836040519182917f220266b600000000000000000000000000000000000000000000000000000000835260048301608091815260406020820152600f60408201527f41413935206f7574206f6620676173000000000000000000000000000000000060608201520190565b9450505050565b61248a91925060203d81116123385761232981836105ab565b90386123a4565b6001907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146124bf570190565b6124c7612190565b0190565b919081101561250c575b60051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa181360301821215610359570190565b612514611d9a565b6124d5565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610359570180359067ffffffffffffffff821161035957602001918160051b3603831361035957565b356108b781610422565b1561257e57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393620696e76616c69642061676772656761746f720000000000000000006044820152fd5b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561035957016020813591019167ffffffffffffffff821161035957813603831361035957565b6108b7916126578161263d8461045c565b73ffffffffffffffffffffffffffffffffffffffff169052565b602082013560208201526126f26126a361268861267760408601866125dc565b610160806040880152860191612028565b61269560608601866125dc565b908583036060870152612028565b6080840135608084015260a084013560a084015260c084013560c084015260e084013560e084015261010080850135908401526101206126e5818601866125dc565b9185840390860152612028565b9161270361014091828101906125dc565b929091818503910152612028565b949391929083604087016040885252606086019360608160051b8801019482600090815b848310612754575050505050508460206108b795968503910152612028565b9091929394977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08b820301855288357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffea1843603018112156127cf57600191846127bd920161262c565b98602090810196950193019190612735565b8280fd5b908092918237016000815290565b9290936108b796959260c0958552602085015265ffffffffffff8092166040850152166060830152151560808201528160a0820152019061208a565b1561282457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393220696e7465726e616c2063616c6c206f6e6c790000000000000000006044820152fd5b9060406108b79260008152816020820152019061208a565b6040906108b793928152816020820152019061208a565b909291925a936128c230331461281d565b8151946040860151955a6113886060830151890101116129e2576108b7966000958051612909575b50505090612903915a9003608084015101943691610682565b91615047565b612938916129349161292f855173ffffffffffffffffffffffffffffffffffffffff1690565b615c12565b1590565b612944575b80806128ea565b61290392919450612953615c24565b908151612967575b5050600193909161293d565b7f1c4fada7374c0a9ee8841fc38afe82932dc0f8e69012e927f061a8bae611a20173ffffffffffffffffffffffffffffffffffffffff6020870151926129d860206129c6835173ffffffffffffffffffffffffffffffffffffffff1690565b9201519560405193849316968361289a565b0390a3388061295b565b7fdeaddead0000000000000000000000000000000000000000000000000000000060005260206000fd5b612a22612a1c6040830183611fc8565b90615c07565b90612a33612a1c6060830183611fc8565b90612ae9612a48612a1c610120840184611fc8565b60405194859360208501956101008201359260e08301359260c08101359260a08201359260808301359273ffffffffffffffffffffffffffffffffffffffff60208201359135168c9693909a9998959261012098959273ffffffffffffffffffffffffffffffffffffffff6101408a019d168952602089015260408801526060870152608086015260a085015260c084015260e08301526101008201520152565b0391612b1b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938481018352826105ab565b51902060408051602081019283523091810191909152466060820152608092830181529091612b4a90826105ab565b51902090565b604051906040820182811067ffffffffffffffff821117612b7b575b60405260006020838281520152565b612b83610505565b612b6c565b906014116103595790601490565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009035818116939260148110612bcb57505050565b60140360031b82901b16169150565b9060c060a06108b793805184526020810151602085015260408101511515604085015265ffffffffffff80606083015116606086015260808201511660808501520151918160a0820152019061208a565b9294612c8c61044d95612c7a610100959998612c68612c54602097610140808c528b0190612bda565b9b878a019060208091805184520151910152565b80516060890152602001516080880152565b805160a08701526020015160c0860152565b73ffffffffffffffffffffffffffffffffffffffff81511660e0850152015191019060208091805184520151910152565b612d0661044d94612cf4612cdf60a0959998969960e0865260e0860190612bda565b98602085019060208091805184520151910152565b80516060840152602001516080830152565b019060208091805184520151910152565b9081602091031261035957516108b781610422565b9160206108b7938181520191612028565b90612d6c73ffffffffffffffffffffffffffffffffffffffff916108b797959694606085526060850191612028565b941660208201526040818503910152612028565b60009060033d11612d8d57565b905060046000803e60005160e01c90565b600060443d106108b7576040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc91823d016004833e815167ffffffffffffffff918282113d602484011117612e1a57818401948551938411612e22573d85010160208487010111612e1a57506108b7929101602001906105ab565b949350505050565b50949350505050565b612e386040820182611fc8565b612e50612e448461256d565b93610120810190611fc8565b9290303b1561035957600093612e949160405196879586957f957122ab00000000000000000000000000000000000000000000000000000000875260048701612d3d565b0381305afa9081612f1d575b5061044d576001612eaf612d80565b6308c379a014612ec8575b612ec057565b61044d612183565b612ed0612d9e565b80612edc575b50612eba565b80516000925015612ed657610f21906040519182917f220266b600000000000000000000000000000000000000000000000000000000835260048301612882565b80610f48612f2a9261057b565b38612ea0565b9190612f3b9061317f565b73ffffffffffffffffffffffffffffffffffffffff929183166130da5761306c57612f659061317f565b9116612ffe57612f725750565b604080517f220266b600000000000000000000000000000000000000000000000000000000815260048101929092526024820152602160448201527f41413332207061796d61737465722065787069726564206f72206e6f7420647560648201527f6500000000000000000000000000000000000000000000000000000000000000608482015260a490fd5b610f21826040519182917f220266b600000000000000000000000000000000000000000000000000000000835260048301608091815260406020820152601460408201527f41413334207369676e6174757265206572726f7200000000000000000000000060608201520190565b610f21836040519182917f220266b600000000000000000000000000000000000000000000000000000000835260048301608091815260406020820152601760408201527f414132322065787069726564206f72206e6f742064756500000000000000000060608201520190565b610f21846040519182917f220266b600000000000000000000000000000000000000000000000000000000835260048301608091815260406020820152601460408201527f41413234207369676e6174757265206572726f7200000000000000000000000060608201520190565b9291906131549061317f565b909273ffffffffffffffffffffffffffffffffffffffff808095169116036130da5761306c57612f65905b80156131d25761318e9061535f565b73ffffffffffffffffffffffffffffffffffffffff65ffffffffffff8060408401511642119081156131c2575b5091511691565b90506020830151164210386131bb565b50600090600090565b156131e257565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f41413934206761732076616c756573206f766572666c6f7700000000000000006044820152fd5b916000915a9381519061325382826136b3565b61325c81612a0c565b602084015261329a6effffffffffffffffffffffffffffff60808401516060850151176040850151176101008401359060e0850135171711156131db565b6132a382613775565b6132ae818584613836565b97906132df6129346132d4875173ffffffffffffffffffffffffffffffffffffffff1690565b60208801519061546c565b6133db576132ec43600052565b73ffffffffffffffffffffffffffffffffffffffff61332460a0606097015173ffffffffffffffffffffffffffffffffffffffff1690565b166133c1575b505a810360a0840135106133545760809360c092604087015260608601525a900391013501910152565b6040517f220266b600000000000000000000000000000000000000000000000000000000815280610f21600482016080906000815260406020820152601e60408201527f41413430206f76657220766572696669636174696f6e4761734c696d6974000060608201520190565b909350816133d2929750858461455c565b9590923861332a565b6040517f220266b600000000000000000000000000000000000000000000000000000000815280610f21600482016080906000815260406020820152601a60408201527f4141323520696e76616c6964206163636f756e74206e6f6e636500000000000060608201520190565b9290916000925a825161345b81846136b3565b61346483612a0c565b60208501526134a26effffffffffffffffffffffffffffff60808301516060840151176040840151176101008601359060e0870135171711156131db565b6134ab81613775565b6134b78186868b613ba2565b98906134e86129346134dd865173ffffffffffffffffffffffffffffffffffffffff1690565b60208701519061546c565b6135e0576134f543600052565b73ffffffffffffffffffffffffffffffffffffffff61352d60a0606096015173ffffffffffffffffffffffffffffffffffffffff1690565b166135c5575b505a840360a08601351061355f5750604085015260608401526080919060c0905a900391013501910152565b604080517f220266b600000000000000000000000000000000000000000000000000000000815260048101929092526024820152601e60448201527f41413430206f76657220766572696669636174696f6e4761734c696d697400006064820152608490fd5b909250816135d79298508686856147ef565b96909138613533565b610f21826040519182917f220266b600000000000000000000000000000000000000000000000000000000835260048301608091815260406020820152601a60408201527f4141323520696e76616c6964206163636f756e74206e6f6e636500000000000060608201520190565b1561365557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4141393320696e76616c6964207061796d6173746572416e64446174610000006044820152fd5b613725906136dd6136c38261256d565b73ffffffffffffffffffffffffffffffffffffffff168452565b602081013560208401526080810135604084015260a0810135606084015260c0810135608084015260e081013560c084015261010081013560e0840152610120810190611fc8565b90811561376a5761374f61124c6112468460a09461374a601461044d9998101561364e565b612b88565b73ffffffffffffffffffffffffffffffffffffffff16910152565b505060a06000910152565b60a081015173ffffffffffffffffffffffffffffffffffffffff16156137b75760c060035b60ff60408401519116606084015102016080830151019101510290565b60c0600161379a565b6137d86040929594939560608352606083019061262c565b9460208201520152565b9061044d602f60405180947f414132332072657665727465643a20000000000000000000000000000000000060208301526138268151809260208686019101612067565b810103600f8101855201836105ab565b916000926000925a936139046020835193613865855173ffffffffffffffffffffffffffffffffffffffff1690565b9561387d6138766040830183611fc8565b9084613e0d565b60a086015173ffffffffffffffffffffffffffffffffffffffff16906138a243600052565b85809373ffffffffffffffffffffffffffffffffffffffff809416159889613b3a575b60600151908601516040517f3a871cdd0000000000000000000000000000000000000000000000000000000081529788968795869390600485016137c0565b03938a1690f1829181613b1a575b50613b115750600190613923612d80565b6308c379a014613abd575b50613a50575b613941575b50505a900391565b61396b9073ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b613986610a2c82546dffffffffffffffffffffffffffff1690565b8083116139e3576139dc926dffffffffffffffffffffffffffff9103166dffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffff0000000000000000000000000000825416179055565b3880613939565b6040517f220266b600000000000000000000000000000000000000000000000000000000815280610f21600482016080906000815260406020820152601760408201527f41413231206469646e2774207061792070726566756e6400000000000000000060608201520190565b6040517f220266b600000000000000000000000000000000000000000000000000000000815280610f21600482016080906000815260406020820152601660408201527f4141323320726576657274656420286f72204f4f47290000000000000000000060608201520190565b613ac5612d9e565b9081613ad1575061392e565b610f2191613adf91506137e2565b6040519182917f220266b600000000000000000000000000000000000000000000000000000000835260048301612882565b95506139349050565b613b3391925060203d81116123385761232981836105ab565b9038613912565b9450613b80610a2c613b6c8c73ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b546dffffffffffffffffffffffffffff1690565b8b811115613b975750856060835b969150506138c5565b606087918d03613b8e565b90926000936000935a94613beb6020835193613bd2855173ffffffffffffffffffffffffffffffffffffffff1690565b9561387d613be36040830183611fc8565b90848c61412b565b03938a1690f1829181613ded575b50613de45750600190613c0a612d80565b6308c379a014613d8e575b50613d20575b613c29575b5050505a900391565b613c539073ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b91613c6f610a2c84546dffffffffffffffffffffffffffff1690565b90818311613cba575082547fffffffffffffffffffffffffffffffffffff0000000000000000000000000000169190036dffffffffffffffffffffffffffff16179055388080613c20565b604080517f220266b600000000000000000000000000000000000000000000000000000000815260048101929092526024820152601760448201527f41413231206469646e2774207061792070726566756e640000000000000000006064820152608490fd5b610f21846040519182917f220266b600000000000000000000000000000000000000000000000000000000835260048301608091815260406020820152601660408201527f4141323320726576657274656420286f72204f4f47290000000000000000000060608201520190565b613d96612d9e565b9081613da25750613c15565b8691613dae91506137e2565b90610f216040519283927f220266b60000000000000000000000000000000000000000000000000000000084526004840161289a565b9650613c1b9050565b613e0691925060203d81116123385761232981836105ab565b9038613bf9565b909180613e1957505050565b81515173ffffffffffffffffffffffffffffffffffffffff1692833b6140be57606083510151604051907f570e1a3600000000000000000000000000000000000000000000000000000000825260208280613e78878760048401612d2c565b0381600073ffffffffffffffffffffffffffffffffffffffff95867f0000000000000000000000007fc98430eaedbb6070b35b39d7987250490883481690f19182156140b1575b600092614091575b508082169586156140245716809503613fb7573b15613f4a5761124c6112467fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d93613f1193612b88565b602083810151935160a001516040805173ffffffffffffffffffffffffffffffffffffffff9485168152939091169183019190915290a3565b6040517f220266b600000000000000000000000000000000000000000000000000000000815280610f21600482016080906000815260406020820152602060408201527f4141313520696e6974436f6465206d757374206372656174652073656e64657260608201520190565b6040517f220266b600000000000000000000000000000000000000000000000000000000815280610f21600482016080906000815260406020820152602060408201527f4141313420696e6974436f6465206d7573742072657475726e2073656e64657260608201520190565b6040517f220266b600000000000000000000000000000000000000000000000000000000815280610f21600482016080906000815260406020820152601b60408201527f4141313320696e6974436f6465206661696c6564206f72204f4f47000000000060608201520190565b6140aa91925060203d811161146a5761145b81836105ab565b9038613ec7565b6140b9612183565b613ebf565b6040517f220266b600000000000000000000000000000000000000000000000000000000815280610f21600482016080906000815260406020820152601f60408201527f414131302073656e64657220616c726561647920636f6e73747275637465640060608201520190565b9290918161413a575b50505050565b82515173ffffffffffffffffffffffffffffffffffffffff1693843b6143e257606084510151604051907f570e1a3600000000000000000000000000000000000000000000000000000000825260208280614199888860048401612d2c565b0381600073ffffffffffffffffffffffffffffffffffffffff95867f0000000000000000000000007fc98430eaedbb6070b35b39d7987250490883481690f19182156143d5575b6000926143b5575b5080821696871561434757168096036142d9573b15614273575061124c6112467fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d9361423393612b88565b602083810151935160a001516040805173ffffffffffffffffffffffffffffffffffffffff9485168152939091169183019190915290a338808080614134565b604080517f220266b600000000000000000000000000000000000000000000000000000000815260048101929092526024820152602060448201527f4141313520696e6974436f6465206d757374206372656174652073656e6465726064820152608490fd5b610f21826040519182917f220266b600000000000000000000000000000000000000000000000000000000835260048301608091815260406020820152602060408201527f4141313420696e6974436f6465206d7573742072657475726e2073656e64657260608201520190565b610f21846040519182917f220266b600000000000000000000000000000000000000000000000000000000835260048301608091815260406020820152601b60408201527f4141313320696e6974436f6465206661696c6564206f72204f4f47000000000060608201520190565b6143ce91925060203d811161146a5761145b81836105ab565b90386141e8565b6143dd612183565b6141e0565b604080517f220266b600000000000000000000000000000000000000000000000000000000815260048101929092526024820152601f60448201527f414131302073656e64657220616c726561647920636f6e7374727563746564006064820152608490fd5b1561444f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4141343120746f6f206c6974746c6520766572696669636174696f6e476173006044820152fd5b919060408382031261035957825167ffffffffffffffff81116103595783019080601f83011215610359578151916144e483610639565b916144f260405193846105ab565b838352602084830101116103595760209261451291848085019101612067565b92015190565b9061044d602f60405180947f414133332072657665727465643a20000000000000000000000000000000000060208301526138268151809260208686019101612067565b93919260609460009460009380519261459b60a08a86015195614580888811614448565b015173ffffffffffffffffffffffffffffffffffffffff1690565b916145c68373ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b946145e2610a2c87546dffffffffffffffffffffffffffff1690565b968588106147825773ffffffffffffffffffffffffffffffffffffffff60208a98946146588a966dffffffffffffffffffffffffffff8b6146919e03166dffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffff0000000000000000000000000000825416179055565b015194604051998a98899788937ff465c77e000000000000000000000000000000000000000000000000000000008552600485016137c0565b0395169103f190818391849361475c575b506147555750506001906146b4612d80565b6308c379a014614733575b506146c657565b6040517f220266b600000000000000000000000000000000000000000000000000000000815280610f21600482016080906000815260406020820152601660408201527f4141333320726576657274656420286f72204f4f47290000000000000000000060608201520190565b61473b612d9e565b908161474757506146bf565b610f2191613adf9150614518565b9450925050565b90925061477b91503d8085833e61477381836105ab565b8101906144ad565b91386146a2565b6040517f220266b600000000000000000000000000000000000000000000000000000000815280610f21600482016080906000815260406020820152601e60408201527f41413331207061796d6173746572206465706f73697420746f6f206c6f77000060608201520190565b91949293909360609560009560009382519061481660a08b84015193614580848611614448565b936148418573ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b61485c610a2c82546dffffffffffffffffffffffffffff1690565b8781106149b7579273ffffffffffffffffffffffffffffffffffffffff60208a989693946146588a966dffffffffffffffffffffffffffff8d6148d69e9c9a03166dffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffff0000000000000000000000000000825416179055565b0395169103f1908183918493614999575b506149915750506001906148f9612d80565b6308c379a014614972575b5061490c5750565b604080517f220266b600000000000000000000000000000000000000000000000000000000815260048101929092526024820152601660448201527f4141333320726576657274656420286f72204f4f4729000000000000000000006064820152608490fd5b61497a612d9e565b90816149865750614904565b613dae925050614518565b955093505050565b9092506149b091503d8085833e61477381836105ab565b91386148e7565b610f218a6040519182917f220266b600000000000000000000000000000000000000000000000000000000835260048301608091815260406020820152601e60408201527f41413331207061796d6173746572206465706f73697420746f6f206c6f77000060608201520190565b60031115614a2f57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b929190614a7c6040916002865260606020870152606086019061208a565b930152565b939291906003811015614a2f57604091614a7c91865260606020870152606086019061208a565b9061044d603660405180947f4141353020706f73744f702072657665727465643a20000000000000000000006020830152614aec8151809260208686019101612067565b81010360168101855201836105ab565b929190925a93600091805191614b1183615318565b9260a0810195614b35875173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff93908481169081614ca457505050614b76825173ffffffffffffffffffffffffffffffffffffffff1690565b985b5a90030193840297604084019089825110614c37577f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f94614bc26020928c614c329551039061553a565b015194896020614c04614be9865173ffffffffffffffffffffffffffffffffffffffff1690565b9a5173ffffffffffffffffffffffffffffffffffffffff1690565b9401519785604051968796169a16988590949392606092608083019683521515602083015260408201520152565b0390a4565b6040517f220266b600000000000000000000000000000000000000000000000000000000815280610f21600482016080906000815260406020820152602060408201527f414135312070726566756e642062656c6f772061637475616c476173436f737460608201520190565b9a918051614cb4575b5050614b78565b6060850151600099509091803b15614ddb579189918983614d07956040518097819682957fa9a234090000000000000000000000000000000000000000000000000000000084528c029060048401614a5e565b0393f19081614dc8575b50614dc3576001614d20612d80565b6308c379a014614da4575b614d37575b3880614cad565b6040517f220266b600000000000000000000000000000000000000000000000000000000815280610f21600482016080906000815260406020820152601260408201527f4141353020706f73744f7020726576657274000000000000000000000000000060608201520190565b614dac612d9e565b80614db75750614d2b565b613adf610f2191614aa8565b614d30565b80610f48614dd59261057b565b38614d11565b8980fd5b9392915a90600092805190614df382615318565b9360a0830196614e17885173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff95908681169081614f0d57505050614e58845173ffffffffffffffffffffffffffffffffffffffff1690565b915b5a9003019485029860408301908a825110614ea757507f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f949392614bc2614c32938c60209451039061553a565b604080517f220266b600000000000000000000000000000000000000000000000000000000815260048101929092526024820152602060448201527f414135312070726566756e642062656c6f772061637475616c476173436f73746064820152608490fd5b93918051614f1d575b5050614e5a565b606087015160009a509091803b1561504357918a918a83614f70956040518097819682957fa9a234090000000000000000000000000000000000000000000000000000000084528c029060048401614a5e565b0393f19081615030575b5061502b576001614f89612d80565b6308c379a01461500e575b614fa0575b3880614f16565b610f218b6040519182917f220266b600000000000000000000000000000000000000000000000000000000835260048301608091815260406020820152601260408201527f4141353020706f73744f7020726576657274000000000000000000000000000060608201520190565b615016612d9e565b806150215750614f94565b613dae8d91614aa8565b614f99565b80610f4861503d9261057b565b38614f7a565b8a80fd5b909392915a9480519161505983615318565b9260a081019561507d875173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff938185169182615165575050506150bd825173ffffffffffffffffffffffffffffffffffffffff1690565b985b5a90030193840297604084019089825110614c37577f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f946151096020928c614c329551039061553a565b61511288614a25565b015194896020615139614be9865173ffffffffffffffffffffffffffffffffffffffff1690565b940151604080519182529815602082015297880152606087015290821695909116939081906080820190565b9a918151615175575b50506150bf565b8784026151818a614a25565b60028a1461520c576060860151823b15610359576151d493600080948d604051978896879586937fa9a2340900000000000000000000000000000000000000000000000000000000855260048501614a81565b0393f180156151ff575b6151ec575b505b388061516e565b80610f486151f99261057b565b386151e3565b615207612183565b6151de565b6060860151823b156103595761525793600080948d604051978896879586937fa9a2340900000000000000000000000000000000000000000000000000000000855260048501614a81565b0393f19081615305575b50615300576001615270612d80565b6308c379a0146152ed575b156151e5576040517f220266b600000000000000000000000000000000000000000000000000000000815280610f21600482016080906000815260406020820152601260408201527f4141353020706f73744f7020726576657274000000000000000000000000000060608201520190565b6152f5612d9e565b80614db7575061527b565b6151e5565b80610f486153129261057b565b38615261565b60e060c082015191015180821461533c57480180821015615337575090565b905090565b5090565b6040519061534d8261058f565b60006040838281528260208201520152565b615367615340565b5065ffffffffffff808260a01c1680156153b3575b604051926153898461058f565b73ffffffffffffffffffffffffffffffffffffffff8116845260d01c602084015216604082015290565b508061537c565b6153cf6153d5916153c9615340565b5061535f565b9161535f565b9073ffffffffffffffffffffffffffffffffffffffff9182825116928315615461575b65ffffffffffff928391826040816020850151169301511693836040816020840151169201511690808410615459575b50808511615451575b506040519561543f8761058f565b16855216602084015216604082015290565b935038615431565b925038615428565b8151811693506153f8565b73ffffffffffffffffffffffffffffffffffffffff16600052600160205267ffffffffffffffff6154c88260401c60406000209077ffffffffffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b918254926154d584612491565b9055161490565b9073ffffffffffffffffffffffffffffffffffffffff6154fa612b50565b9216600052600060205263ffffffff600160406000206dffffffffffffffffffffffffffff815460781c1685520154166020830152565b61044d3361562b565b73ffffffffffffffffffffffffffffffffffffffff16600052600060205260406000206dffffffffffffffffffffffffffff8082541692830180931161561e575b8083116155c05761044d92166dffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffff0000000000000000000000000000825416179055565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6465706f736974206f766572666c6f77000000000000000000000000000000006044820152fd5b615626612190565b61557b565b73ffffffffffffffffffffffffffffffffffffffff9061564b348261553a565b168060005260006020527f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c460206dffffffffffffffffffffffffffff60406000205416604051908152a2565b1561569e57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d757374207370656369667920756e7374616b652064656c61790000000000006044820152fd5b1561570357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f63616e6e6f7420646563726561736520756e7374616b652074696d65000000006044820152fd5b1561576857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6e6f207374616b652073706563696669656400000000000000000000000000006044820152fd5b156157cd57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7374616b65206f766572666c6f770000000000000000000000000000000000006044820152fd5b9065ffffffffffff6080600161044d9461588b6dffffffffffffffffffffffffffff86511682906dffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffff0000000000000000000000000000825416179055565b602085015115156eff000000000000000000000000000082549160701b16807fffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffff83161783557fffffff000000000000000000000000000000ffffffffffffffffffffffffffff7cffffffffffffffffffffffffffff000000000000000000000000000000604089015160781b16921617178155019263ffffffff6060820151167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000008554161784550151167fffffffffffffffffffffffffffffffffffffffffffff000000000000ffffffff69ffffffffffff0000000083549260201b169116179055565b1561599657565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f616c726561647920756e7374616b696e670000000000000000000000000000006044820152fd5b91909165ffffffffffff808094169116019182116121cd57565b15615a1557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f207374616b6520746f2077697468647261770000000000000000000000006044820152fd5b15615a7a57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f6d7573742063616c6c20756e6c6f636b5374616b6528292066697273740000006044820152fd5b15615adf57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f5374616b65207769746864726177616c206973206e6f742064756500000000006044820152fd5b15615b4457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661696c656420746f207769746864726177207374616b6500000000000000006044820152fd5b15615ba957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6661696c656420746f20776974686472617700000000000000000000000000006044820152fd5b816040519182372090565b9060009283809360208451940192f190565b3d610800808211615c4b575b50604051906020818301016040528082526000602083013e90565b905038615c3056fea2646970667358221220a706d8b02d7086d80e9330811f5af84b2614abdc5e9a1f2260126070a31d7cee64736f6c63430008110033", + "nonce": "2", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000000001" + } + }, + "0x762bae358067d954c3d5fd2221c8df850b7d2dea": { + "balance": "0x4224d6abd6c1f50", + "nonce": "4" + }, + "0x7fc98430eaedbb6070b35b39d798725049088348": { + "balance": "0x0", + "code": "0x6080604052600436101561001257600080fd5b6000803560e01c63570e1a361461002857600080fd5b346100c95760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100c95760043567ffffffffffffffff918282116100c957366023830112156100c95781600401359283116100c95736602484840101116100c9576100c561009e84602485016100fc565b60405173ffffffffffffffffffffffffffffffffffffffff90911681529081906020820190565b0390f35b80fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90806014116101bb5767ffffffffffffffff917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec82018381116101cd575b604051937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f81600b8701160116850190858210908211176101c0575b604052808452602084019036848401116101bb576020946000600c819682946014880187378301015251923560601c5af19060005191156101b557565b60009150565b600080fd5b6101c86100cc565b610178565b6101d56100cc565b61013a56fea26469706673582212201927e80b76ab9b71c952137dd676621a9fdf520c25928815636594036eb1c40364736f6c63430008110033", + "nonce": "1" + }, + "0x8abb13360b87be5eeb1b98647a016add927a136c": { + "balance": "0x0", + "code": "0x60806040526004361061012c5760003560e01c806352d1902d116100a5578063bc197c8111610074578063c4d66de811610059578063c4d66de8146103d0578063d087d288146103f0578063f23a6e611461040557600080fd5b8063bc197c8114610373578063c399ec88146103bb57600080fd5b806352d1902d146102b35780638da5cb5b146102c8578063b0d691fe14610320578063b61d27f61461035357600080fd5b80633659cfe6116100fc5780634a58db19116100e15780634a58db19146102785780634d44560d146102805780634f1ef286146102a057600080fd5b80633659cfe61461022a5780633a871cdd1461024a57600080fd5b806223de291461013857806301ffc9a71461015f578063150b7a021461019457806318dfb3c71461020a57600080fd5b3661013357005b600080fd5b34801561014457600080fd5b5061015d610153366004611cbf565b5050505050505050565b005b34801561016b57600080fd5b5061017f61017a366004611d70565b61044b565b60405190151581526020015b60405180910390f35b3480156101a057600080fd5b506101d96101af366004611db2565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161018b565b34801561021657600080fd5b5061015d610225366004611e6a565b610530565b34801561023657600080fd5b5061015d610245366004611ed6565b610654565b34801561025657600080fd5b5061026a610265366004611ef3565b610859565b60405190815260200161018b565b61015d61087f565b34801561028c57600080fd5b5061015d61029b366004611f47565b61091e565b61015d6102ae366004611fa2565b6109d5565b3480156102bf57600080fd5b5061026a610bcb565b3480156102d457600080fd5b506000546102fb9062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161018b565b34801561032c57600080fd5b507f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d27896102fb565b34801561035f57600080fd5b5061015d61036e366004612084565b610cb7565b34801561037f57600080fd5b506101d961038e3660046120d4565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b3480156103c757600080fd5b5061026a610d06565b3480156103dc57600080fd5b5061015d6103eb366004611ed6565b610dbd565b3480156103fc57600080fd5b5061026a610f50565b34801561041157600080fd5b506101d9610420366004612172565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f150b7a020000000000000000000000000000000000000000000000000000000014806104de57507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b8061052a57507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b610538610fcc565b8281146105a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f77726f6e67206172726179206c656e677468730000000000000000000000000060448201526064015b60405180910390fd5b60005b8381101561064d5761063b8585838181106105c6576105c66121ee565b90506020020160208101906105db9190611ed6565b60008585858181106105ef576105ef6121ee565b9050602002810190610601919061221d565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061109592505050565b8061064581612282565b9150506105a9565b5050505050565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000008abb13360b87be5eeb1b98647a016add927a136c163003610719576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c0000000000000000000000000000000000000000606482015260840161059d565b7f0000000000000000000000008abb13360b87be5eeb1b98647a016add927a136c73ffffffffffffffffffffffffffffffffffffffff1661078e7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614610831576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f78790000000000000000000000000000000000000000606482015260840161059d565b61083a81611112565b604080516000808252602082019092526108569183919061111a565b50565b600061086361131e565b61086d84846113bd565b9050610878826114a3565b9392505050565b7f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d27896040517fb760faf900000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff919091169063b760faf99034906024016000604051808303818588803b15801561090a57600080fd5b505af115801561064d573d6000803e3d6000fd5b61092661150e565b7f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d27896040517f205c287800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260248201849052919091169063205c287890604401600060405180830381600087803b1580156109b957600080fd5b505af11580156109cd573d6000803e3d6000fd5b505050505050565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000008abb13360b87be5eeb1b98647a016add927a136c163003610a9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f64656c656761746563616c6c0000000000000000000000000000000000000000606482015260840161059d565b7f0000000000000000000000008abb13360b87be5eeb1b98647a016add927a136c73ffffffffffffffffffffffffffffffffffffffff16610b0f7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614610bb2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201527f6163746976652070726f78790000000000000000000000000000000000000000606482015260840161059d565b610bbb82611112565b610bc78282600161111a565b5050565b60003073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000008abb13360b87be5eeb1b98647a016add927a136c1614610c92576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c0000000000000000606482015260840161059d565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b610cbf610fcc565b610d00848484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061109592505050565b50505050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d278916906370a08231906024015b602060405180830381865afa158015610d94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db891906122e1565b905090565b600054610100900460ff1615808015610ddd5750600054600160ff909116105b80610df75750303b158015610df7575060005460ff166001145b610e83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161059d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015610ee157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b610eea8261159f565b8015610bc757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6040517f35567e1a0000000000000000000000000000000000000000000000000000000081523060048201526000602482018190529073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d278916906335567e1a90604401610d77565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d278916148061102d575060005462010000900473ffffffffffffffffffffffffffffffffffffffff1633145b611093576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f6163636f756e743a206e6f74204f776e6572206f7220456e747279506f696e74604482015260640161059d565b565b6000808473ffffffffffffffffffffffffffffffffffffffff1684846040516110be9190612326565b60006040518083038185875af1925050503d80600081146110fb576040519150601f19603f3d011682016040523d82523d6000602084013e611100565b606091505b50915091508161064d57805160208201fd5b61085661150e565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156111525761114d8361163e565b505050565b8273ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156111d7575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526111d4918101906122e1565b60015b611263576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f742055555053000000000000000000000000000000000000606482015260840161059d565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114611312576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c65555549440000000000000000000000000000000000000000000000606482015260840161059d565b5061114d838383611748565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d27891614611093576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e7400000000604482015260640161059d565b600080611417836040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b905061146761142a61014086018661221d565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250859392505061176d9050565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff90811691161461149957600191505061052a565b5060009392505050565b80156108565760405160009033907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90849084818181858888f193505050503d806000811461064d576040519150601f19603f3d011682016040523d82523d6000602084013e61064d565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff1633148061153957503330145b611093576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6f6e6c79206f776e657200000000000000000000000000000000000000000000604482015260640161059d565b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000073ffffffffffffffffffffffffffffffffffffffff8481168202929092178084556040519190048216927f0000000000000000000000005ff137d4b0fdcd49dca30c7cf57e578a026d2789909216917f47e55c76e7a6f1fd8996a1da8008c1ea29699cca35e7bcd057f2dec313b6e5de91a350565b73ffffffffffffffffffffffffffffffffffffffff81163b6116e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e747261637400000000000000000000000000000000000000606482015260840161059d565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61175183611791565b60008251118061175e5750805b1561114d57610d0083836117de565b600080600061177c8585611803565b9150915061178981611848565b509392505050565b61179a8161163e565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061087883836040518060600160405280602781526020016123c3602791396119fb565b60008082516041036118395760208301516040840151606085015160001a61182d87828585611a80565b94509450505050611841565b506000905060025b9250929050565b600081600481111561185c5761185c612342565b036118645750565b600181600481111561187857611878612342565b036118df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161059d565b60028160048111156118f3576118f3612342565b0361195a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161059d565b600381600481111561196e5761196e612342565b03610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f7565000000000000000000000000000000000000000000000000000000000000606482015260840161059d565b60606000808573ffffffffffffffffffffffffffffffffffffffff1685604051611a259190612326565b600060405180830381855af49150503d8060008114611a60576040519150601f19603f3d011682016040523d82523d6000602084013e611a65565b606091505b5091509150611a7686838387611b6f565b9695505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611ab75750600090506003611b66565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611b0b573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611b5f57600060019250925050611b66565b9150600090505b94509492505050565b60608315611c05578251600003611bfe5773ffffffffffffffffffffffffffffffffffffffff85163b611bfe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161059d565b5081611c0f565b611c0f8383611c17565b949350505050565b815115611c275781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059d9190612371565b73ffffffffffffffffffffffffffffffffffffffff8116811461085657600080fd5b60008083601f840112611c8f57600080fd5b50813567ffffffffffffffff811115611ca757600080fd5b60208301915083602082850101111561184157600080fd5b60008060008060008060008060c0898b031215611cdb57600080fd5b8835611ce681611c5b565b97506020890135611cf681611c5b565b96506040890135611d0681611c5b565b955060608901359450608089013567ffffffffffffffff80821115611d2a57600080fd5b611d368c838d01611c7d565b909650945060a08b0135915080821115611d4f57600080fd5b50611d5c8b828c01611c7d565b999c989b5096995094979396929594505050565b600060208284031215611d8257600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461087857600080fd5b600080600080600060808688031215611dca57600080fd5b8535611dd581611c5b565b94506020860135611de581611c5b565b935060408601359250606086013567ffffffffffffffff811115611e0857600080fd5b611e1488828901611c7d565b969995985093965092949392505050565b60008083601f840112611e3757600080fd5b50813567ffffffffffffffff811115611e4f57600080fd5b6020830191508360208260051b850101111561184157600080fd5b60008060008060408587031215611e8057600080fd5b843567ffffffffffffffff80821115611e9857600080fd5b611ea488838901611e25565b90965094506020870135915080821115611ebd57600080fd5b50611eca87828801611e25565b95989497509550505050565b600060208284031215611ee857600080fd5b813561087881611c5b565b600080600060608486031215611f0857600080fd5b833567ffffffffffffffff811115611f1f57600080fd5b84016101608187031215611f3257600080fd5b95602085013595506040909401359392505050565b60008060408385031215611f5a57600080fd5b8235611f6581611c5b565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060408385031215611fb557600080fd5b8235611fc081611c5b565b9150602083013567ffffffffffffffff80821115611fdd57600080fd5b818501915085601f830112611ff157600080fd5b81358181111561200357612003611f73565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561204957612049611f73565b8160405282815288602084870101111561206257600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000806000806060858703121561209a57600080fd5b84356120a581611c5b565b935060208501359250604085013567ffffffffffffffff8111156120c857600080fd5b611eca87828801611c7d565b60008060008060008060008060a0898b0312156120f057600080fd5b88356120fb81611c5b565b9750602089013561210b81611c5b565b9650604089013567ffffffffffffffff8082111561212857600080fd5b6121348c838d01611e25565b909850965060608b013591508082111561214d57600080fd5b6121598c838d01611e25565b909650945060808b0135915080821115611d4f57600080fd5b60008060008060008060a0878903121561218b57600080fd5b863561219681611c5b565b955060208701356121a681611c5b565b94506040870135935060608701359250608087013567ffffffffffffffff8111156121d057600080fd5b6121dc89828a01611c7d565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261225257600080fd5b83018035915067ffffffffffffffff82111561226d57600080fd5b60200191503681900382131561184157600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036122da577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b6000602082840312156122f357600080fd5b5051919050565b60005b838110156123155781810151838201526020016122fd565b83811115610d005750506000910152565b600082516123388184602087016122fa565b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208152600082518060208401526123908160408501602087016122fa565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220e7edcd8c7b9333c2bbdd5f8fa69f1cd2cb0f5cbfa76648b9830bcf0cbfef288e64736f6c634300080f0033", + "nonce": "1" + }, + "0x9406cc6185a346906296840746125a0e44976454": { + "balance": "0x0", + "code": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806311464fbe146100465780635fbfb9cf146100965780638cb84e18146100a9575b600080fd5b61006d7f0000000000000000000000008abb13360b87be5eeb1b98647a016add927a136c81565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61006d6100a436600461039d565b6100bc565b61006d6100b736600461039d565b6101ee565b6000806100c984846101ee565b905073ffffffffffffffffffffffffffffffffffffffff81163b80156100f1575090506101e8565b60405173ffffffffffffffffffffffffffffffffffffffff8616602482015284907f0000000000000000000000008abb13360b87be5eeb1b98647a016add927a136c90604401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fc4d66de800000000000000000000000000000000000000000000000000000000179052516101b790610390565b6101c2929190610412565b8190604051809103906000f59050801580156101e2573d6000803e3d6000fd5b50925050505b92915050565b60006103578260001b6040518060200161020790610390565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f90910116604081905273ffffffffffffffffffffffffffffffffffffffff871660248201527f0000000000000000000000008abb13360b87be5eeb1b98647a016add927a136c90604401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fc4d66de800000000000000000000000000000000000000000000000000000000179052905161030093929101610412565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261033c9291602001610480565b6040516020818303038152906040528051906020012061035e565b9392505050565b60006103578383306000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b6107c1806104b083390190565b600080604083850312156103b057600080fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146103d457600080fd5b946020939093013593505050565b60005b838110156103fd5781810151838201526020016103e5565b8381111561040c576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff83168152604060208201526000825180604084015261044d8160608501602087016103e2565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016060019392505050565b600083516104928184602088016103e2565b8351908301906104a68183602088016103e2565b0194935050505056fe60806040526040516107c13803806107c183398101604081905261002291610321565b61002e82826000610035565b505061043e565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d0838360405180606001604052806027815260200161079a602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100711760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103ef565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a357825160000361029c576001600160a01b0385163b61029c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102ad565b6102ad83836102b5565b949350505050565b8151156102c55781518083602001fd5b8060405162461bcd60e51b8152600401610148919061040b565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103105781810151838201526020016102f8565b838111156100645750506000910152565b6000806040838503121561033457600080fd5b82516001600160a01b038116811461034b57600080fd5b60208401519092506001600160401b038082111561036857600080fd5b818501915085601f83011261037c57600080fd5b81518181111561038e5761038e6102df565b604051601f8201601f19908116603f011681019083821181831017156103b6576103b66102df565b816040528281528860208487010111156103cf57600080fd5b6103e08360208301602088016102f5565b80955050505050509250929050565b600082516104018184602087016102f5565b9190910192915050565b602081526000825180602084015261042a8160408501602087016102f5565b601f01601f19169190910160400192915050565b61034d8061044d6000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610074565b6100b9565b565b606061004e83836040518060600160405280602781526020016102f1602791396100dd565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b90565b60006100b47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e8080156100d8573d6000f35b3d6000fd5b60606000808573ffffffffffffffffffffffffffffffffffffffff16856040516101079190610283565b600060405180830381855af49150503d8060008114610142576040519150601f19603f3d011682016040523d82523d6000602084013e610147565b606091505b509150915061015886838387610162565b9695505050505050565b606083156101fd5782516000036101f65773ffffffffffffffffffffffffffffffffffffffff85163b6101f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b5081610207565b610207838361020f565b949350505050565b81511561021f5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed919061029f565b60005b8381101561026e578181015183820152602001610256565b8381111561027d576000848401525b50505050565b60008251610295818460208701610253565b9190910192915050565b60208152600082518060208401526102be816040850160208701610253565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201cd78ab6a31213989661cff2d7d05fc9b9c38b1a848e8249e2e398659a9eb7e364736f6c634300080f0033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122070aa03035a81441673770173c347020a4af1bf8f651ceebc066752c059bdbac764736f6c634300080f0033", + "nonce": "2" + } + }, + "baseFeePerGas": "7", + "config": { + "chainId": 17000, + "homesteadBlock": 0, + "daoForkSupport": true, + "eip150Block": 0, + "eip155Block": 0, + "eip158Block": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "istanbulBlock": 0, + "berlinBlock": 0, + "londonBlock": 0, + "shanghaiTime": 1696000704, + "cancunTime": 1707305664, + "terminalTotalDifficulty": 0, + "depositContractAddress": "0x0000000000000000000000000000000000000000", + "ethash": {} + }, + "difficulty": "0", + "extraData": "0xd883010d04846765746888676f312e32312e33856c696e7578", + "gasLimit": "30000000", + "hash": "0x51d27336b67190a223f09e010f2c395a09b9efbc79978d4128488438bcebe204", + "miner": "0x455e5aa18469bc6ccef49594645666c587a3a71b", + "mixHash": "0x5620ac2ec6be561b4bdb808b1b0e2e812f7037e068af5ed5e77552c52a59c074", + "nonce": "0x0000000000000000", + "number": "207937", + "stateRoot": "0x7f44580e6d68e7e641a516625593492793b799e77063abb21fb956f03b0f9a69", + "timestamp": "1698574260", + "totalDifficulty": "0", + "withdrawals": [ + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4f5a01", + "index": "0x30f81e", + "validatorIndex": "0xd5251" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4ec972", + "index": "0x30f81f", + "validatorIndex": "0xd5252" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4ea6b6", + "index": "0x30f820", + "validatorIndex": "0xd5253" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4e847c", + "index": "0x30f821", + "validatorIndex": "0xd5254" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4e8892", + "index": "0x30f822", + "validatorIndex": "0xd5255" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4f0dff", + "index": "0x30f823", + "validatorIndex": "0xd5256" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4f754a", + "index": "0x30f824", + "validatorIndex": "0xd5257" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4fba0a", + "index": "0x30f825", + "validatorIndex": "0xd5258" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4efb55", + "index": "0x30f826", + "validatorIndex": "0xd5259" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4f635c", + "index": "0x30f827", + "validatorIndex": "0xd525a" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4f155f", + "index": "0x30f828", + "validatorIndex": "0xd525b" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4f5cc3", + "index": "0x30f829", + "validatorIndex": "0xd525c" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4e4d42", + "index": "0x30f82a", + "validatorIndex": "0xd525d" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4f3bb4", + "index": "0x30f82b", + "validatorIndex": "0xd525e" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4ebf95", + "index": "0x30f82c", + "validatorIndex": "0xd525f" + }, + { + "address": "0x778f5f13c4be78a3a4d7141bcb26999702f407cf", + "amount": "0x4f5a95", + "index": "0x30f82d", + "validatorIndex": "0xd5260" + } + ], + "withdrawalsRoot": "0xe7d06c15072a0b642de8a6038ee041797e0e191e706f2e4dd23ce56237d4b6d3" + }, + "input": "0xf908cd0485012a05f200830493e0945ff137d4b0fdcd49dca30c7cf57e578a026d278980b908641fad948c0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000762bae358067d954c3d5fd2221c8df850b7d2dea000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000420000000000000000000000000023b8381813a7d98d973ef70cfe3b6fd3eb5af8f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000249f000000000000000000000000000000000000000000000000000000000000052080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000036000000000000000000000000000000000000000000000000000000000000000589406cc6185a346906296840746125a0e449764545fbfb9cf000000000000000000000000762bae358067d954c3d5fd2221c8df850b7d2dea0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4b61d27f60000000000000000000000007d773af3d29743442dc991c168c434d99836a723000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000b98cb1da4f9bd640879f0bbcb30a541c84163406ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000028b98cb1da4f9bd640879f0bbcb30a541c841634067d773af3d29743442dc991c168c434d99836a723000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004163db6c745bf7619037403905c091a651a0d322869f5130310f777ffd07fb4f69586b80e4644bd5a5c380fdaa805e55fb88b73a4335d32bcbfb8789f14813b5821c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000023b8381813a7d98d973ef70cfe3b6fd3eb5af8f0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000249f000000000000000000000000000000000000000000000000000000000000052080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000036000000000000000000000000000000000000000000000000000000000000000589406cc6185a346906296840746125a0e449764545fbfb9cf000000000000000000000000762bae358067d954c3d5fd2221c8df850b7d2dea0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4b61d27f60000000000000000000000007d773af3d29743442dc991c168c434d99836a723000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000023b8381813a7d98d973ef70cfe3b6fd3eb5af8f0000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000028b98cb1da4f9bd640879f0bbcb30a541c841634067d773af3d29743442dc991c168c434d99836a7230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041757afb34d07363b77b151d44706f101683fb6f2a388e544739bafde73ac37fa80b1436db66c8ed20ca96b9b5a68f8a15b510a495482003745370e1c8dda4d18b1b000000000000000000000000000000000000000000000000000000000000008284f3a0483300636794233ba87f8da2b896e9ec8095aa7066611653c1aca6136a33adc0a06e4f84003dd488b51fc51cc7dc16efe72f0deeb84a11248c4705eeddbaabc9a4" +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_too_few_memory_bytes_get_padded/fh2.3/block.3727495.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_too_few_memory_bytes_get_padded/fh2.3/block.3727495.golden.json new file mode 100644 index 0000000000..9bb93e5187 --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_too_few_memory_bytes_get_padded/fh2.3/block.3727495.golden.json @@ -0,0 +1,164 @@ +{ + "hash": "SKLPDUOjSrOGLDSmQ92rvI79Tx7rbpi+MnMdw1ta0jQ=", + "header": { + "baseFeePerGas": { + "bytes": "DQ==" + }, + "coinbase": "AAAAaRaoe4IzP0JFBGYjsjeUxlw=", + "difficulty": { + "bytes": "AA==" + }, + "gasLimit": "30000000", + "hash": "SKLPDUOjSrOGLDSmQ92rvI79Tx7rbpi+MnMdw1ta0jQ=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "3727495", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "aYf8zdg87hj7kTMGYReWUn8vvkT0i92fQ04NAsNDcDc=", + "receiptRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "stateRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "timestamp": "2023-06-19T23:23:48Z", + "transactionsRoot": "bDCtoar4SKuDMt3K7Ay0vDV8FJj/S9YTAtfuy7yJYL0=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=" + }, + "number": "3727495", + "size": "723", + "transactionTraces": [ + { + "beginOrdinal": "1", + "calls": [ + { + "address": "3Z+V4sEFOnYIm1AXgpuyMwy2rkc=", + "balanceChanges": [ + { + "address": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "newValue": { + "bytes": "B5sluWAKJ10=" + }, + "oldValue": { + "bytes": "B5sluWe3fF0=" + }, + "ordinal": "2", + "reason": "REASON_GAS_BUY" + }, + { + "address": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "newValue": { + "bytes": "B5sluWUI8jk=" + }, + "oldValue": { + "bytes": "B5sluWAKJ10=" + }, + "ordinal": "11", + "reason": "REASON_GAS_REFUND" + }, + { + "address": "AAAAaRaoe4IzP0JFBGYjsjeUxlw=", + "newValue": { + "bytes": "AecopRVH6f5hufY=" + }, + "oldValue": { + "bytes": "AecopRVH6fvBC6c=" + }, + "ordinal": "12", + "reason": "REASON_REWARD_TRANSACTION_FEE" + } + ], + "callType": "CALL", + "caller": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "endOrdinal": "10", + "executedCode": true, + "gasChanges": [ + { + "newValue": "178428", + "oldValue": "200000", + "ordinal": "3", + "reason": "REASON_INTRINSIC_GAS" + }, + { + "newValue": "130141", + "oldValue": "131897", + "ordinal": "8", + "reason": "REASON_EVENT_LOG" + } + ], + "gasConsumed": "48293", + "gasLimit": "178428", + "index": 1, + "input": "QMEPGQAAAAAAAAAAAAAAAOs9PWFvPkPp7TYe3S0OZE0Y0Xm3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPo=", + "keccakPreimages": { + "bb65ff7a03b11b79143b011da0de7c67f6d9bb8f57df2381d88d503cdb07b0b6": "000000000000000000000000eb3d3d616f3e43e9ed361edd2d0e644d18d179b70000000000000000000000000000000000000000000000000000000000000000" + }, + "logs": [ + { + "address": "3Z+V4sEFOnYIm1AXgpuyMwy2rkc=", + "data": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPo=", + "ordinal": "9", + "topics": [ + "3fJSrRviyJtpwrBo/DeNqpUrp/FjxKEWKPVaTfUjs+8=", + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "AAAAAAAAAAAAAAAA6z09YW8+Q+ntNh7dLQ5kTRjRebc=" + ] + } + ], + "nonceChanges": [ + { + "address": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "newValue": "6", + "oldValue": "5", + "ordinal": "4" + } + ], + "storageChanges": [ + { + "address": "3Z+V4sEFOnYIm1AXgpuyMwy2rkc=", + "key": "u2X/egOxG3kUOwEdoN58Z/bZu49X3yOB2I1QPNsHsLY=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPo=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "6" + }, + { + "address": "3Z+V4sEFOnYIm1AXgpuyMwy2rkc=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPo=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "7" + } + ] + } + ], + "endOrdinal": "13", + "from": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "gasLimit": "200000", + "gasPrice": { + "bytes": "AoQ=" + }, + "gasUsed": "69865", + "hash": "tF3PNXHZNWA+icLD8DyDTxT8x76iGVd8sDejy7wEQx8=", + "input": "QMEPGQAAAAAAAAAAAAAAAOs9PWFvPkPp7TYe3S0OZE0Y0Xm3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPo=", + "nonce": "5", + "r": "Xww4NKZlcXSDEHF8P5UnXU9PLqL6aBoOU5VFipWpVaM=", + "receipt": { + "cumulativeGasUsed": "69865", + "logs": [ + { + "address": "3Z+V4sEFOnYIm1AXgpuyMwy2rkc=", + "data": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPo=", + "ordinal": "9", + "topics": [ + "3fJSrRviyJtpwrBo/DeNqpUrp/FjxKEWKPVaTfUjs+8=", + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "AAAAAAAAAAAAAAAA6z09YW8+Q+ntNh7dLQ5kTRjRebc=" + ] + } + ], + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAIAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAIAAAAAAAAAAAAIAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAA==" + }, + "s": "BOdJVNNAB7fPBAA48slaL2uQd1vOwb423lDacpucotM=", + "status": "SUCCEEDED", + "to": "3Z+V4sEFOnYIm1AXgpuyMwy2rkc=", + "v": "AVRtcg==" + } + ], + "ver": 3 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_too_few_memory_bytes_get_padded/fh3.0/block.3727495.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_too_few_memory_bytes_get_padded/fh3.0/block.3727495.golden.json new file mode 100644 index 0000000000..9bb93e5187 --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_too_few_memory_bytes_get_padded/fh3.0/block.3727495.golden.json @@ -0,0 +1,164 @@ +{ + "hash": "SKLPDUOjSrOGLDSmQ92rvI79Tx7rbpi+MnMdw1ta0jQ=", + "header": { + "baseFeePerGas": { + "bytes": "DQ==" + }, + "coinbase": "AAAAaRaoe4IzP0JFBGYjsjeUxlw=", + "difficulty": { + "bytes": "AA==" + }, + "gasLimit": "30000000", + "hash": "SKLPDUOjSrOGLDSmQ92rvI79Tx7rbpi+MnMdw1ta0jQ=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "3727495", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "aYf8zdg87hj7kTMGYReWUn8vvkT0i92fQ04NAsNDcDc=", + "receiptRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "stateRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "timestamp": "2023-06-19T23:23:48Z", + "transactionsRoot": "bDCtoar4SKuDMt3K7Ay0vDV8FJj/S9YTAtfuy7yJYL0=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=" + }, + "number": "3727495", + "size": "723", + "transactionTraces": [ + { + "beginOrdinal": "1", + "calls": [ + { + "address": "3Z+V4sEFOnYIm1AXgpuyMwy2rkc=", + "balanceChanges": [ + { + "address": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "newValue": { + "bytes": "B5sluWAKJ10=" + }, + "oldValue": { + "bytes": "B5sluWe3fF0=" + }, + "ordinal": "2", + "reason": "REASON_GAS_BUY" + }, + { + "address": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "newValue": { + "bytes": "B5sluWUI8jk=" + }, + "oldValue": { + "bytes": "B5sluWAKJ10=" + }, + "ordinal": "11", + "reason": "REASON_GAS_REFUND" + }, + { + "address": "AAAAaRaoe4IzP0JFBGYjsjeUxlw=", + "newValue": { + "bytes": "AecopRVH6f5hufY=" + }, + "oldValue": { + "bytes": "AecopRVH6fvBC6c=" + }, + "ordinal": "12", + "reason": "REASON_REWARD_TRANSACTION_FEE" + } + ], + "callType": "CALL", + "caller": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "endOrdinal": "10", + "executedCode": true, + "gasChanges": [ + { + "newValue": "178428", + "oldValue": "200000", + "ordinal": "3", + "reason": "REASON_INTRINSIC_GAS" + }, + { + "newValue": "130141", + "oldValue": "131897", + "ordinal": "8", + "reason": "REASON_EVENT_LOG" + } + ], + "gasConsumed": "48293", + "gasLimit": "178428", + "index": 1, + "input": "QMEPGQAAAAAAAAAAAAAAAOs9PWFvPkPp7TYe3S0OZE0Y0Xm3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPo=", + "keccakPreimages": { + "bb65ff7a03b11b79143b011da0de7c67f6d9bb8f57df2381d88d503cdb07b0b6": "000000000000000000000000eb3d3d616f3e43e9ed361edd2d0e644d18d179b70000000000000000000000000000000000000000000000000000000000000000" + }, + "logs": [ + { + "address": "3Z+V4sEFOnYIm1AXgpuyMwy2rkc=", + "data": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPo=", + "ordinal": "9", + "topics": [ + "3fJSrRviyJtpwrBo/DeNqpUrp/FjxKEWKPVaTfUjs+8=", + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "AAAAAAAAAAAAAAAA6z09YW8+Q+ntNh7dLQ5kTRjRebc=" + ] + } + ], + "nonceChanges": [ + { + "address": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "newValue": "6", + "oldValue": "5", + "ordinal": "4" + } + ], + "storageChanges": [ + { + "address": "3Z+V4sEFOnYIm1AXgpuyMwy2rkc=", + "key": "u2X/egOxG3kUOwEdoN58Z/bZu49X3yOB2I1QPNsHsLY=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPo=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "6" + }, + { + "address": "3Z+V4sEFOnYIm1AXgpuyMwy2rkc=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPo=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "7" + } + ] + } + ], + "endOrdinal": "13", + "from": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "gasLimit": "200000", + "gasPrice": { + "bytes": "AoQ=" + }, + "gasUsed": "69865", + "hash": "tF3PNXHZNWA+icLD8DyDTxT8x76iGVd8sDejy7wEQx8=", + "input": "QMEPGQAAAAAAAAAAAAAAAOs9PWFvPkPp7TYe3S0OZE0Y0Xm3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPo=", + "nonce": "5", + "r": "Xww4NKZlcXSDEHF8P5UnXU9PLqL6aBoOU5VFipWpVaM=", + "receipt": { + "cumulativeGasUsed": "69865", + "logs": [ + { + "address": "3Z+V4sEFOnYIm1AXgpuyMwy2rkc=", + "data": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPo=", + "ordinal": "9", + "topics": [ + "3fJSrRviyJtpwrBo/DeNqpUrp/FjxKEWKPVaTfUjs+8=", + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "AAAAAAAAAAAAAAAA6z09YW8+Q+ntNh7dLQ5kTRjRebc=" + ] + } + ], + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAIAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAIAAAAAAAAAAAAIAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAA==" + }, + "s": "BOdJVNNAB7fPBAA48slaL2uQd1vOwb423lDacpucotM=", + "status": "SUCCEEDED", + "to": "3Z+V4sEFOnYIm1AXgpuyMwy2rkc=", + "v": "AVRtcg==" + } + ], + "ver": 3 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_too_few_memory_bytes_get_padded/prestate.json b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_too_few_memory_bytes_get_padded/prestate.json new file mode 100644 index 0000000000..7b14aca55b --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_too_few_memory_bytes_get_padded/prestate.json @@ -0,0 +1,165 @@ +{ + "context": { + "baseFeePerGas": "13", + "difficulty": "0", + "gasLimit": "30000000", + "miner": "0x0000006916a87b82333f4245046623b23794c65c", + "number": "3727495", + "timestamp": "1687217028" + }, + "genesis": { + "alloc": { + "0x0000006916a87b82333f4245046623b23794c65c": { + "balance": "0x1e728a51547e9fbc10ba7", + "nonce": "5" + }, + "0xdd9f95e2c1053a76089b5017829bb2330cb6ae47": { + "balance": "0x0", + "code": "0x60003560e01c8063095ea7b31461005c57806340c10f1914610062578063a9059cbb146100d957806323b872dd146100df57806318160ddd1461015d57806370a082311461016e5763dd62ed3e1461018e573461018e5760006000f35b60006000f35b60043573ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206000602435856000526040600020805482018083119155600254820180831190600255600154331415171761018e57600052a360006000f35b60006000f35b60043573ffffffffffffffffffffffffffffffffffffffff16337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206000602435856000526040600020805482018083119155336000526040600020805483900380841091553417176101535760006000fd5b600052a360206000f35b3461018e5760025460005260206000f35b3461018e5760043560005260406000205460005260206000f35b60006000f35b60006000fd", + "nonce": "1", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x000000000000000000000000eb3d3d616f3e43e9ed361edd2d0e644d18d179b7", + "0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000000000", + "0xbb65ff7a03b11b79143b011da0de7c67f6d9bb8f57df2381d88d503cdb07b0b6": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "0xeb3d3d616f3e43e9ed361edd2d0e644d18d179b7": { + "balance": "0x79b25b967b77c5d", + "nonce": "5" + } + }, + "baseFeePerGas": "14", + "config": { + "berlinBlock": 0, + "byzantiumBlock": 0, + "cancunTime": 1706655072, + "chainId": 11155111, + "constantinopleBlock": 0, + "daoForkSupport": true, + "eip150Block": 0, + "eip155Block": 0, + "eip158Block": 0, + "ethash": {}, + "homesteadBlock": 0, + "istanbulBlock": 0, + "londonBlock": 0, + "mergeNetsplitBlock": 1735371, + "muirGlacierBlock": 0, + "petersburgBlock": 0, + "shanghaiTime": 1677557088, + "terminalTotalDifficulty": 17000000000000000, + "terminalTotalDifficultyPassed": true + }, + "difficulty": "0", + "extraData": "0x6769756c696f207761732068657265", + "gasLimit": "30000000", + "hash": "0xff41623ef4e84cea4e957676a0b7e5868f1480e343ad533914133c448157764c", + "miner": "0x008b3b2f992c0e14edaa6e2c662bec549caa8df1", + "mixHash": "0xf04431d1d4ccb65f5d1b2e88ec010737ae82d68426b287a7158b9b16aa45a0bc", + "nonce": "0x0000000000000000", + "number": "3727494", + "stateRoot": "0xe3f9e4ff1577f21330eded302784f548f6fed4d4ca7a1f6884dde9ad38743279", + "timestamp": "1687217016", + "totalDifficulty": "17000018015853232", + "withdrawals": [ + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x244a5", + "index": "0xb3bf91", + "validatorIndex": "0x38b" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2d66a", + "index": "0xb3bf92", + "validatorIndex": "0x38c" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2d66a", + "index": "0xb3bf93", + "validatorIndex": "0x38d" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2d66a", + "index": "0xb3bf94", + "validatorIndex": "0x38e" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2d66a", + "index": "0xb3bf95", + "validatorIndex": "0x38f" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2d66a", + "index": "0xb3bf96", + "validatorIndex": "0x390" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x244a5", + "index": "0xb3bf97", + "validatorIndex": "0x391" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2d66a", + "index": "0xb3bf98", + "validatorIndex": "0x392" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x25b2b", + "index": "0xb3bf99", + "validatorIndex": "0x393" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x244a5", + "index": "0xb3bf9a", + "validatorIndex": "0x394" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2d66a", + "index": "0xb3bf9b", + "validatorIndex": "0x395" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x244a5", + "index": "0xb3bf9c", + "validatorIndex": "0x396" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x244a5", + "index": "0xb3bf9d", + "validatorIndex": "0x397" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2d66a", + "index": "0xb3bf9e", + "validatorIndex": "0x398" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2d66a", + "index": "0xb3bf9f", + "validatorIndex": "0x399" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ecf0", + "index": "0xb3bfa0", + "validatorIndex": "0x39a" + } + ], + "withdrawalsRoot": "0xceabf2dc1561db0f29da25b6282082e5353c2f594942cfdcdccfeb176542411c" + }, + "input": "0xf8ab0582028483030d4094dd9f95e2c1053a76089b5017829bb2330cb6ae4780b84440c10f19000000000000000000000000eb3d3d616f3e43e9ed361edd2d0e644d18d179b700000000000000000000000000000000000000000000000000000000000000fa8401546d72a05f0c3834a66571748310717c3f95275d4f4f2ea2fa681a0e5395458a95a955a3a004e74954d34007b7cf040038f2c95a2f6b90775bcec1be36de50da729b9ca2d3" +} diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_wrong_diff/fh2.3/block.3733424.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_wrong_diff/fh2.3/block.3733424.golden.json new file mode 100644 index 0000000000..04a7eb4fe2 --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_wrong_diff/fh2.3/block.3733424.golden.json @@ -0,0 +1,229 @@ +{ + "hash": "IPNVZgyygE0HzwAtWVr0ghv9lxf+N0C45NHNCWv5Oyg=", + "header": { + "baseFeePerGas": { + "bytes": "Cqc=" + }, + "coinbase": "AAAAaRaoe4IzP0JFBGYjsjeUxlw=", + "difficulty": { + "bytes": "AA==" + }, + "gasLimit": "30000000", + "hash": "IPNVZgyygE0HzwAtWVr0ghv9lxf+N0C45NHNCWv5Oyg=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "3733424", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "f7pk/8VV6aRiIPz5tngJXJEAkJokLyPKgV4W7ujmnP8=", + "receiptRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "stateRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "timestamp": "2023-06-20T21:02:36Z", + "transactionsRoot": "qGt8M+EeGIjvA3CmiVt41zk8Ap6NokQ0xxIVjv/5oCY=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=" + }, + "number": "3733424", + "size": "673", + "transactionTraces": [ + { + "beginOrdinal": "1", + "calls": [ + { + "address": "VJoy1Xw102gR3mpGJZaXDIPqmyM=", + "balanceChanges": [ + { + "address": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "newValue": { + "bytes": "B5sluJ/kW34=" + }, + "oldValue": { + "bytes": "B5sluMJIrb4=" + }, + "ordinal": "2", + "reason": "REASON_GAS_BUY" + }, + { + "address": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "newValue": { + "bytes": "B5sluLmEBFg=" + }, + "oldValue": { + "bytes": "B5sluJ/kW34=" + }, + "ordinal": "20", + "reason": "REASON_GAS_REFUND" + }, + { + "address": "AAAAaRaoe4IzP0JFBGYjsjeUxlw=", + "newValue": { + "bytes": "Aecpt9WGjDRS35o=" + }, + "oldValue": { + "bytes": "Aecpt9WGjDPX8TY=" + }, + "ordinal": "21", + "reason": "REASON_REWARD_TRANSACTION_FEE" + } + ], + "callType": "CALL", + "caller": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "endOrdinal": "19", + "executedCode": true, + "gasChanges": [ + { + "newValue": "178664", + "oldValue": "200000", + "ordinal": "3", + "reason": "REASON_INTRINSIC_GAS" + }, + { + "newValue": "175937", + "oldValue": "178437", + "ordinal": "6", + "reason": "REASON_STATE_COLD_ACCESS" + }, + { + "newValue": "2748", + "oldValue": "178537", + "ordinal": "7", + "reason": "REASON_CALL" + }, + { + "newValue": "173596", + "oldValue": "2748", + "ordinal": "10", + "reason": "REASON_REFUND_AFTER_EXECUTION" + }, + { + "newValue": "2677", + "oldValue": "171474", + "ordinal": "11", + "reason": "REASON_CALL" + }, + { + "newValue": "144210", + "oldValue": "2677", + "ordinal": "18", + "reason": "REASON_REFUND_AFTER_EXECUTION" + } + ], + "gasConsumed": "34454", + "gasLimit": "178664", + "index": 1, + "input": "ASy2ctjBKKzAgl3Lr2HkOik6WlJ2", + "nonceChanges": [ + { + "address": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "newValue": "28", + "oldValue": "27", + "ordinal": "4" + } + ] + }, + { + "address": "LLZy2MEorMCCXcuvYeQ6KTpaUnY=", + "beginOrdinal": "8", + "callType": "CALL", + "caller": "VJoy1Xw102gR3mpGJZaXDIPqmyM=", + "depth": 1, + "endOrdinal": "9", + "executedCode": true, + "gasConsumed": "2338", + "gasLimit": "173186", + "index": 2, + "input": "cKCCMQAAAAAAAAAAAAAAAFSaMtV8NdNoEd5qRiWWlwyD6psj", + "keccakPreimages": { + "dfecc5e296fad583cf3240a878ef92ffb0955f284f0216e1670f60c2279e53ba": "000000000000000000000000549a32d57c35d36811de6a462596970c83ea9b230000000000000000000000000000000000000000000000000000000000000000" + }, + "parentIndex": 1, + "returnData": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJY=" + }, + { + "address": "LLZy2MEorMCCXcuvYeQ6KTpaUnY=", + "beginOrdinal": "12", + "callType": "CALL", + "caller": "VJoy1Xw102gR3mpGJZaXDIPqmyM=", + "depth": 1, + "endOrdinal": "17", + "executedCode": true, + "gasChanges": [ + { + "newValue": "141533", + "oldValue": "143289", + "ordinal": "15", + "reason": "REASON_EVENT_LOG" + } + ], + "gasConsumed": "27164", + "gasLimit": "168697", + "index": 3, + "input": "qQWcuwAAAAAAAAAAAAAAAOs9PWFvPkPp7TYe3S0OZE0Y0Xm3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJY=", + "keccakPreimages": { + "bb65ff7a03b11b79143b011da0de7c67f6d9bb8f57df2381d88d503cdb07b0b6": "000000000000000000000000eb3d3d616f3e43e9ed361edd2d0e644d18d179b70000000000000000000000000000000000000000000000000000000000000000", + "dfecc5e296fad583cf3240a878ef92ffb0955f284f0216e1670f60c2279e53ba": "000000000000000000000000549a32d57c35d36811de6a462596970c83ea9b230000000000000000000000000000000000000000000000000000000000000000" + }, + "logs": [ + { + "address": "LLZy2MEorMCCXcuvYeQ6KTpaUnY=", + "data": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJY=", + "ordinal": "16", + "topics": [ + "3fJSrRviyJtpwrBo/DeNqpUrp/FjxKEWKPVaTfUjs+8=", + "AAAAAAAAAAAAAAAAVJoy1Xw102gR3mpGJZaXDIPqmyM=", + "AAAAAAAAAAAAAAAA6z09YW8+Q+ntNh7dLQ5kTRjRebc=" + ] + } + ], + "parentIndex": 1, + "storageChanges": [ + { + "address": "LLZy2MEorMCCXcuvYeQ6KTpaUnY=", + "key": "u2X/egOxG3kUOwEdoN58Z/bZu49X3yOB2I1QPNsHsLY=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJY=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "13" + }, + { + "address": "LLZy2MEorMCCXcuvYeQ6KTpaUnY=", + "key": "3+zF4pb61YPPMkCoeO+S/7CVXyhPAhbhZw9gwieeU7o=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJY=", + "ordinal": "14" + } + ] + } + ], + "endOrdinal": "22", + "from": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "gasLimit": "200000", + "gasPrice": { + "bytes": "C0U=" + }, + "gasUsed": "50990", + "hash": "E2euJ14Brg/hLbsRFBismbxzpqbwfKtvvBhA1ZB2cD8=", + "input": "ASy2ctjBKKzAgl3Lr2HkOik6WlJ2", + "nonce": "27", + "r": "/n8N4OD9KzN9vfG0/fl6FERX+FAklxcusTRKtuJaaAY=", + "receipt": { + "cumulativeGasUsed": "50990", + "logs": [ + { + "address": "LLZy2MEorMCCXcuvYeQ6KTpaUnY=", + "data": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJY=", + "ordinal": "16", + "topics": [ + "3fJSrRviyJtpwrBo/DeNqpUrp/FjxKEWKPVaTfUjs+8=", + "AAAAAAAAAAAAAAAAVJoy1Xw102gR3mpGJZaXDIPqmyM=", + "AAAAAAAAAAAAAAAA6z09YW8+Q+ntNh7dLQ5kTRjRebc=" + ] + } + ], + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAIAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAACQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "s": "C4wVifsU3LuR1ToPisse4e3pAciXSe4Vv+hsa+7HBS4=", + "status": "SUCCEEDED", + "to": "VJoy1Xw102gR3mpGJZaXDIPqmyM=", + "v": "Gw==" + } + ], + "ver": 3 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_wrong_diff/fh3.0/block.3733424.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_wrong_diff/fh3.0/block.3733424.golden.json new file mode 100644 index 0000000000..04a7eb4fe2 --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_wrong_diff/fh3.0/block.3733424.golden.json @@ -0,0 +1,229 @@ +{ + "hash": "IPNVZgyygE0HzwAtWVr0ghv9lxf+N0C45NHNCWv5Oyg=", + "header": { + "baseFeePerGas": { + "bytes": "Cqc=" + }, + "coinbase": "AAAAaRaoe4IzP0JFBGYjsjeUxlw=", + "difficulty": { + "bytes": "AA==" + }, + "gasLimit": "30000000", + "hash": "IPNVZgyygE0HzwAtWVr0ghv9lxf+N0C45NHNCWv5Oyg=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "3733424", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "f7pk/8VV6aRiIPz5tngJXJEAkJokLyPKgV4W7ujmnP8=", + "receiptRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "stateRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "timestamp": "2023-06-20T21:02:36Z", + "transactionsRoot": "qGt8M+EeGIjvA3CmiVt41zk8Ap6NokQ0xxIVjv/5oCY=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=" + }, + "number": "3733424", + "size": "673", + "transactionTraces": [ + { + "beginOrdinal": "1", + "calls": [ + { + "address": "VJoy1Xw102gR3mpGJZaXDIPqmyM=", + "balanceChanges": [ + { + "address": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "newValue": { + "bytes": "B5sluJ/kW34=" + }, + "oldValue": { + "bytes": "B5sluMJIrb4=" + }, + "ordinal": "2", + "reason": "REASON_GAS_BUY" + }, + { + "address": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "newValue": { + "bytes": "B5sluLmEBFg=" + }, + "oldValue": { + "bytes": "B5sluJ/kW34=" + }, + "ordinal": "20", + "reason": "REASON_GAS_REFUND" + }, + { + "address": "AAAAaRaoe4IzP0JFBGYjsjeUxlw=", + "newValue": { + "bytes": "Aecpt9WGjDRS35o=" + }, + "oldValue": { + "bytes": "Aecpt9WGjDPX8TY=" + }, + "ordinal": "21", + "reason": "REASON_REWARD_TRANSACTION_FEE" + } + ], + "callType": "CALL", + "caller": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "endOrdinal": "19", + "executedCode": true, + "gasChanges": [ + { + "newValue": "178664", + "oldValue": "200000", + "ordinal": "3", + "reason": "REASON_INTRINSIC_GAS" + }, + { + "newValue": "175937", + "oldValue": "178437", + "ordinal": "6", + "reason": "REASON_STATE_COLD_ACCESS" + }, + { + "newValue": "2748", + "oldValue": "178537", + "ordinal": "7", + "reason": "REASON_CALL" + }, + { + "newValue": "173596", + "oldValue": "2748", + "ordinal": "10", + "reason": "REASON_REFUND_AFTER_EXECUTION" + }, + { + "newValue": "2677", + "oldValue": "171474", + "ordinal": "11", + "reason": "REASON_CALL" + }, + { + "newValue": "144210", + "oldValue": "2677", + "ordinal": "18", + "reason": "REASON_REFUND_AFTER_EXECUTION" + } + ], + "gasConsumed": "34454", + "gasLimit": "178664", + "index": 1, + "input": "ASy2ctjBKKzAgl3Lr2HkOik6WlJ2", + "nonceChanges": [ + { + "address": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "newValue": "28", + "oldValue": "27", + "ordinal": "4" + } + ] + }, + { + "address": "LLZy2MEorMCCXcuvYeQ6KTpaUnY=", + "beginOrdinal": "8", + "callType": "CALL", + "caller": "VJoy1Xw102gR3mpGJZaXDIPqmyM=", + "depth": 1, + "endOrdinal": "9", + "executedCode": true, + "gasConsumed": "2338", + "gasLimit": "173186", + "index": 2, + "input": "cKCCMQAAAAAAAAAAAAAAAFSaMtV8NdNoEd5qRiWWlwyD6psj", + "keccakPreimages": { + "dfecc5e296fad583cf3240a878ef92ffb0955f284f0216e1670f60c2279e53ba": "000000000000000000000000549a32d57c35d36811de6a462596970c83ea9b230000000000000000000000000000000000000000000000000000000000000000" + }, + "parentIndex": 1, + "returnData": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJY=" + }, + { + "address": "LLZy2MEorMCCXcuvYeQ6KTpaUnY=", + "beginOrdinal": "12", + "callType": "CALL", + "caller": "VJoy1Xw102gR3mpGJZaXDIPqmyM=", + "depth": 1, + "endOrdinal": "17", + "executedCode": true, + "gasChanges": [ + { + "newValue": "141533", + "oldValue": "143289", + "ordinal": "15", + "reason": "REASON_EVENT_LOG" + } + ], + "gasConsumed": "27164", + "gasLimit": "168697", + "index": 3, + "input": "qQWcuwAAAAAAAAAAAAAAAOs9PWFvPkPp7TYe3S0OZE0Y0Xm3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJY=", + "keccakPreimages": { + "bb65ff7a03b11b79143b011da0de7c67f6d9bb8f57df2381d88d503cdb07b0b6": "000000000000000000000000eb3d3d616f3e43e9ed361edd2d0e644d18d179b70000000000000000000000000000000000000000000000000000000000000000", + "dfecc5e296fad583cf3240a878ef92ffb0955f284f0216e1670f60c2279e53ba": "000000000000000000000000549a32d57c35d36811de6a462596970c83ea9b230000000000000000000000000000000000000000000000000000000000000000" + }, + "logs": [ + { + "address": "LLZy2MEorMCCXcuvYeQ6KTpaUnY=", + "data": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJY=", + "ordinal": "16", + "topics": [ + "3fJSrRviyJtpwrBo/DeNqpUrp/FjxKEWKPVaTfUjs+8=", + "AAAAAAAAAAAAAAAAVJoy1Xw102gR3mpGJZaXDIPqmyM=", + "AAAAAAAAAAAAAAAA6z09YW8+Q+ntNh7dLQ5kTRjRebc=" + ] + } + ], + "parentIndex": 1, + "storageChanges": [ + { + "address": "LLZy2MEorMCCXcuvYeQ6KTpaUnY=", + "key": "u2X/egOxG3kUOwEdoN58Z/bZu49X3yOB2I1QPNsHsLY=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJY=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "13" + }, + { + "address": "LLZy2MEorMCCXcuvYeQ6KTpaUnY=", + "key": "3+zF4pb61YPPMkCoeO+S/7CVXyhPAhbhZw9gwieeU7o=", + "newValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJY=", + "ordinal": "14" + } + ] + } + ], + "endOrdinal": "22", + "from": "6z09YW8+Q+ntNh7dLQ5kTRjRebc=", + "gasLimit": "200000", + "gasPrice": { + "bytes": "C0U=" + }, + "gasUsed": "50990", + "hash": "E2euJ14Brg/hLbsRFBismbxzpqbwfKtvvBhA1ZB2cD8=", + "input": "ASy2ctjBKKzAgl3Lr2HkOik6WlJ2", + "nonce": "27", + "r": "/n8N4OD9KzN9vfG0/fl6FERX+FAklxcusTRKtuJaaAY=", + "receipt": { + "cumulativeGasUsed": "50990", + "logs": [ + { + "address": "LLZy2MEorMCCXcuvYeQ6KTpaUnY=", + "data": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJY=", + "ordinal": "16", + "topics": [ + "3fJSrRviyJtpwrBo/DeNqpUrp/FjxKEWKPVaTfUjs+8=", + "AAAAAAAAAAAAAAAAVJoy1Xw102gR3mpGJZaXDIPqmyM=", + "AAAAAAAAAAAAAAAA6z09YW8+Q+ntNh7dLQ5kTRjRebc=" + ] + } + ], + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAIAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAACQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "s": "C4wVifsU3LuR1ToPisse4e3pAciXSe4Vv+hsa+7HBS4=", + "status": "SUCCEEDED", + "to": "VJoy1Xw102gR3mpGJZaXDIPqmyM=", + "v": "Gw==" + } + ], + "ver": 3 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_wrong_diff/prestate.json b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_wrong_diff/prestate.json new file mode 100644 index 0000000000..0e0fb3384f --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/keccak256_wrong_diff/prestate.json @@ -0,0 +1,179 @@ +{ + "genesis": { + "baseFeePerGas": "2935", + "difficulty": "0", + "extraData": "0x6769756c696f207761732068657265", + "gasLimit": "30000000", + "hash": "0xb606f9eea389beb86ad7b90f716ab8b2145b09806e3cae6d866cc406176ff953", + "miner": "0x008b3b2f992c0e14edaa6e2c662bec549caa8df1", + "mixHash": "0x0fbfbdea994592940443188d440d955b4a24241fd297fe6dc51842ed481c46da", + "nonce": "0x0000000000000000", + "number": "3733423", + "stateRoot": "0x6ade0dc69a4852c342f189cf0f98fd0c4eb3357ce1fcb19e039b95d4780148dc", + "timestamp": "1687294944", + "totalDifficulty": "17000018015853232", + "withdrawals": [ + { + "index": "0xb53221", + "validatorIndex": "0x3d4", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ed05" + }, + { + "index": "0xb53222", + "validatorIndex": "0x3d5", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ed05" + }, + { + "index": "0xb53223", + "validatorIndex": "0x3d6", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ed05" + }, + { + "index": "0xb53224", + "validatorIndex": "0x3d7", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2fc09" + }, + { + "index": "0xb53225", + "validatorIndex": "0x3d8", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ed05" + }, + { + "index": "0xb53226", + "validatorIndex": "0x3d9", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x247dd" + }, + { + "index": "0xb53227", + "validatorIndex": "0x3da", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ed05" + }, + { + "index": "0xb53228", + "validatorIndex": "0x3db", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2fc09" + }, + { + "index": "0xb53229", + "validatorIndex": "0x3dc", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ed05" + }, + { + "index": "0xb5322a", + "validatorIndex": "0x3dd", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ed05" + }, + { + "index": "0xb5322b", + "validatorIndex": "0x3de", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ed05" + }, + { + "index": "0xb5322c", + "validatorIndex": "0x3df", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ed05" + }, + { + "index": "0xb5322d", + "validatorIndex": "0x3e0", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ed05" + }, + { + "index": "0xb5322e", + "validatorIndex": "0x3e1", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ed05" + }, + { + "index": "0xb5322f", + "validatorIndex": "0x3e2", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x238d9" + }, + { + "index": "0xb53230", + "validatorIndex": "0x3e3", + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ed05" + } + ], + "withdrawalsRoot": "0x3cb455e987780d127dae999ae7a1666b3314a2207953019902fd7f8f30a3c367", + "alloc": { + "0x0000006916a87b82333f4245046623b23794c65c": { + "balance": "0x1e729b7d5868c33d7f136", + "nonce": "5" + }, + "0x2cb672d8c128acc0825dcbaf61e43a293a5a5276": { + "balance": "0x0", + "code": "0x60003560e01c8063095ea7b31461005c57806340c10f1914610062578063a9059cbb146100d957806323b872dd1461015657806318160ddd1461015857806370a08231146101695763dd62ed3e1461018957346101895760006000f35b60006000f35b60043573ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206000602435856000526040600020805482018083119155600254820180831190600255600154331415171761018957600052a360006000f35b60043573ffffffffffffffffffffffffffffffffffffffff16337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206000602435856000526040600020805482018083119155813360005260406000208054828103809111915590503417176101505760006000fd5b600052a3005b005b346101895760025460005260206000f35b346101895760043560005260406000205460005260206000f35b60006000f35b60006000fd", + "nonce": "1", + "storage": { + "0xbb65ff7a03b11b79143b011da0de7c67f6d9bb8f57df2381d88d503cdb07b0b6": "0x0000000000000000000000000000000000000000000000000000000000000000", + "0xdfecc5e296fad583cf3240a878ef92ffb0955f284f0216e1670f60c2279e53ba": "0x0000000000000000000000000000000000000000000000000000000000000096" + } + }, + "0x549a32d57c35d36811de6a462596970c83ea9b23": { + "balance": "0x0", + "code": "0x60003560f81c806000146100985780600114610022576002146100965760006000fd5b6000600060446000600060013560601c60206024602460006000857f70a0823100000000000000000000000000000000000000000000000000000000600052306004525af1507fa9059cbb000000000000000000000000000000000000000000000000000000006000526000546004525af1005b005b00", + "nonce": "1", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000eb3d3d616f3e43e9ed361edd2d0e644d18d179b7" + } + }, + "0xeb3d3d616f3e43e9ed361edd2d0e644d18d179b7": { + "balance": "0x79b25b8c248adbe", + "nonce": "27" + } + }, + "config": { + "chainId": 11155111, + "homesteadBlock": 0, + "daoForkSupport": true, + "eip150Block": 0, + "eip155Block": 0, + "eip158Block": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "istanbulBlock": 0, + "muirGlacierBlock": 0, + "berlinBlock": 0, + "londonBlock": 0, + "mergeNetsplitBlock": 1735371, + "shanghaiTime": 1677557088, + "cancunTime": 1706655072, + "terminalTotalDifficulty": 17000000000000000, + "terminalTotalDifficultyPassed": true, + "ethash": {}, + "blobSchedule": { + "cancun": { + "target": 3, + "max": 6, + "baseFeeUpdateFraction": 3338477 + } + } + } + }, + "context": { + "number": "3733424", + "difficulty": "0", + "timestamp": "1687294956", + "gasLimit": "30000000", + "miner": "0x0000006916a87b82333f4245046623b23794c65c", + "baseFeePerGas": "2727" + }, + "input": "0xf8771b820b4583030d4094549a32d57c35d36811de6a462596970c83ea9b238095012cb672d8c128acc0825dcbaf61e43a293a5a52761ba0fe7f0de0e0fd2b337dbdf1b4fdf97a144457f8502497172eb1344ab6e25a6806a00b8c1589fb14dcbb91d53a0f8acb1ee1ede901c89749ee15bfe86c6beec7052e" +} diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/suicide_double_withdraw/fh2.3/block.1550267.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/suicide_double_withdraw/fh2.3/block.1550267.golden.json new file mode 100644 index 0000000000..10bc93d179 --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/suicide_double_withdraw/fh2.3/block.1550267.golden.json @@ -0,0 +1,391 @@ +{ + "hash": "ycVHQ3rBt3mfRIpHGewnuEXRq5LmU9/i+qoNZkx0qew=", + "header": { + "baseFeePerGas": { + "bytes": "kwcfxw==" + }, + "coinbase": "Kx2Hm14QLmAWYgLeeVN7SOLxikI=", + "difficulty": { + "bytes": "AA==" + }, + "gasLimit": "30000000", + "hash": "ycVHQ3rBt3mfRIpHGewnuEXRq5LmU9/i+qoNZkx0qew=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "1550267", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "Lqnb2KULZPqYeoP7inwY5jwKzNhQQaD6YS01a/i6ZrA=", + "receiptRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "stateRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "timestamp": "2024-05-15T17:12:36Z", + "transactionsRoot": "UGovRwB9IOw9P7ACFl+hfCxFwgTa3lRZNqwqrJ0NJ20=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=" + }, + "number": "1550267", + "size": "4196", + "transactionTraces": [ + { + "beginOrdinal": "1", + "calls": [ + { + "accountCreations": [ + { + "account": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "ordinal": "6" + } + ], + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "balanceChanges": [ + { + "address": "eiOPKY1V+NsnuGDv8eAtFSixZYU=", + "newValue": { + "bytes": "DbTWtv/L76k=" + }, + "oldValue": { + "bytes": "Dbv1zrT3nx0=" + }, + "ordinal": "2", + "reason": "REASON_GAS_BUY" + }, + { + "address": "eiOPKY1V+NsnuGDv8eAtFSixZYU=", + "newValue": { + "bytes": "DbTWtoh1IQk=" + }, + "oldValue": { + "bytes": "DbTWtv/L76k=" + }, + "ordinal": "8", + "reason": "REASON_TRANSFER" + }, + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "newValue": { + "bytes": "d1bOoA==" + }, + "ordinal": "9", + "reason": "REASON_TRANSFER" + }, + { + "address": "eiOPKY1V+NsnuGDv8eAtFSixZYU=", + "newValue": { + "bytes": "DbTnxxILzrM=" + }, + "oldValue": { + "bytes": "DbTWtoh1IQk=" + }, + "ordinal": "44", + "reason": "REASON_GAS_REFUND" + }, + { + "address": "Kx2Hm14QLmAWYgLeeVN7SOLxikI=", + "newValue": { + "bytes": "3mbuD6C1qntp" + }, + "oldValue": { + "bytes": "3mbtxTnosse6" + }, + "ordinal": "45", + "reason": "REASON_REWARD_TRANSACTION_FEE" + } + ], + "callType": "CREATE", + "caller": "eiOPKY1V+NsnuGDv8eAtFSixZYU=", + "codeChanges": [ + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "newCode": "YIBgQFJgBDYQYQBzV181YOAcgGNN9+PQEWEATVeAY03349AUYQDcV4BjdHf3ABRhAQZXgGN7HYKcFGEBMFeAY886IX4UYQFaV2EAelZbgGMLYc1/FGEAfleAYw2+Zx8UYQCIV4BjHWPiTRRhALJXYQB6Vls2YQB6VwBbX4D9W2EAhmEBcFZbAFs0gBVhAJNXX4D9W1BhAJxhAylWW2BAUWEAqZGQYQSaVltgQFGAkQOQ81s0gBVhAL1XX4D9W1BhAMZhA0xWW2BAUWEA05GQYQTLVltgQFGAkQOQ81s0gBVhAOdXX4D9W1BhAPBhA1JWW2BAUWEA/ZGQYQSaVltgQFGAkQOQ81s0gBVhARFXX4D9W1BhARphA3dWW2BAUWEBJ5GQYQTLVltgQFGAkQOQ81s0gBVhATtXX4D9W1BhAURhA31WW2BAUWEBUZGQYQTLVltgQFGAkQOQ81s0gBVhAWVXX4D9W1BhAW5hA4NWWwBbX3+cIv9fIfC4GxE+Y/fbbalP7e8RshGbQIi4lmT7mjy2WJBQgGBAUWEBoZBhBBNWW4GQYEBRgJEDkF/1kFCAFYAVYQG+Vz1fgD49X/1bUF+AYQEACoFUgXP//////////////////////////wIZFpCDc///////////////////////////FgIXkFVQX4BUkGEBAAqQBHP//////////////////////////xZz//////////////////////////8WNGBAUWECQJBhBRFWW19gQFGAgwOBhYda8ZJQUFA9gF+BFGECeldgQFGRUGAfGWA/PQEWggFgQFI9glI9X2AghAE+YQJ/VltgYJFQW1BQUF+AVJBhAQAKkARz//////////////////////////8Wc///////////////////////////FmMPrxAhX4BUkGEBAAqQBHP//////////////////////////xZgQFGCY/////8WYOAbgVJgBAFhAvmRkGEFRVZbX2BAUYCDA4Ffh4A7FYAVYQMQV1+A/VtQWvEVgBVhAyJXPV+APj1f/VtQUFBQUFZbX4BUkGEBAAqQBHP//////////////////////////xaBVltgBVSBVltgAV+QVJBhAQAKkARz//////////////////////////8WgVZbYARUgVZbYAZUgVZbX3+cIv9fIfC4GxE+Y/fbbalP7e8RshGbQIi4lmT7mjy2WJBQgGBAUWEDtJBhBBNWW4GQYEBRgJEDkF/1kFCAFYAVYQPRVz1fgD49X/1bUF+AYQEACoFUgXP//////////////////////////wIZFpCDc///////////////////////////FgIXkFVQUFZbYQKKgGEFX4M5AZBWW19z//////////////////////////+CFpBQkZBQVltfgZBQkZBQVltfYQRiYQRdYQRYhGEEIFZbYQQ/VlthBCBWW5BQkZBQVltfYQRzgmEESFZbkFCRkFBWW19hBISCYQRpVluQUJGQUFZbYQSUgWEEelZbglJQUFZbX2AgggGQUGEErV+DAYRhBItWW5KRUFBWW1+BkFCRkFBWW2EExYFhBLNWW4JSUFBWW19gIIIBkFBhBN5fgwGEYQS8VluSkVBQVltfgZBQkpFQUFZbUFZbX2EE/F+DYQTkVluRUGEFB4JhBO5WW1+CAZBQkZBQVltfYQUbgmEE8VZbkVCBkFCRkFBWW19hBS+CYQQgVluQUJGQUFZbYQU/gWEFJVZbglJQUFZbX2AgggGQUGEFWF+DAYRhBTZWW5KRUFBW/mCAYEBSc0MAAAAAAAAAAAAAAAAAAAAAAAAAX4BhAQAKgVSBc///////////////////////////AhkWkINz//////////////////////////8WAheQVVBzeiOPKY1V+NsnuGDv8eAtFSixZYVgAV9hAQAKgVSBc///////////////////////////AhkWkINz//////////////////////////8WAheQVVA0gBVgtVdfgP1bUGEBx4BhAMNfOV/z/mCAYEBSYAQ2EGEAN1dfNWDgHIBjD68QIRRhAEJXgGMdY+JNFGEAXleAY3R39wAUYQCIV2EAPlZbNmEAPlcAW1+A/VthAFxgBIA2A4EBkGEAV5GQYQE1VlthALJWWwBbNIAVYQBpV1+A/VtQYQByYQDLVltgQFFhAH+RkGEBeFZbYEBRgJEDkPNbNIAVYQCTV1+A/VtQYQCcYQDRVltgQFFhAKmRkGEBeFZbYEBRgJEDkPNbgHP//////////////////////////xb/W2ADVIFWW2ACVIFWW1+A/Vtfc///////////////////////////ghaQUJGQUFZbX2EBBIJhANtWW5BQkZBQVlthARSBYQD6VluBFGEBHldfgP1bUFZbX4E1kFBhAS+BYQELVluSkVBQVltfYCCChAMSFWEBSldhAUlhANdWW1tfYQFXhIKFAWEBIVZbkVBQkpFQUFZbX4GQUJGQUFZbYQFygWEBYFZbglJQUFZbX2AgggGQUGEBi1+DAYRhAWlWW5KRUFBW/qJkaXBmc1giEiB4nf69TDoE8FAm15HxiG0PzBM9wtshFgRZSoALW9IyMGRzb2xjQwAIGQAzomRpcGZzWCISIL9Ul2tC0esNcimyvdSOilHtvOnMDOEu4+006a2DuQEVZHNvbGNDAAgZADM=", + "newHash": "SCiyEasTfEh/c8vA9xQ/UVY7EnPvfmQlXKBqXUD/TxU=", + "oldHash": "xdJGAYb3IzySfn2y3McDwOUAtlPKgic7e/rYBF2FpHA=", + "ordinal": "42" + } + ], + "endOrdinal": "43", + "gasChanges": [ + { + "newValue": "671148", + "oldValue": "779146", + "ordinal": "3", + "reason": "REASON_INTRINSIC_GAS" + }, + { + "newValue": "626589", + "oldValue": "626722", + "ordinal": "12", + "reason": "REASON_CODE_COPY" + }, + { + "newValue": "594380", + "oldValue": "626548", + "ordinal": "13", + "reason": "REASON_CONTRACT_CREATION2" + }, + { + "newValue": "9287", + "oldValue": "594380", + "ordinal": "14", + "reason": "REASON_CONTRACT_CREATION2" + }, + { + "newValue": "458909", + "oldValue": "9287", + "ordinal": "25", + "reason": "REASON_REFUND_AFTER_EXECUTION" + }, + { + "newValue": "6675", + "oldValue": "436353", + "ordinal": "27", + "reason": "REASON_CALL" + }, + { + "newValue": "429498", + "oldValue": "6675", + "ordinal": "32", + "reason": "REASON_REFUND_AFTER_EXECUTION" + }, + { + "newValue": "6698", + "oldValue": "428786", + "ordinal": "33", + "reason": "REASON_CALL" + }, + { + "newValue": "423285", + "oldValue": "6698", + "ordinal": "39", + "reason": "REASON_REFUND_AFTER_EXECUTION" + }, + { + "newValue": "422895", + "oldValue": "423220", + "ordinal": "40", + "reason": "REASON_CODE_COPY" + }, + { + "newValue": "7293", + "oldValue": "422893", + "ordinal": "41", + "reason": "REASON_CODE_STORAGE" + } + ], + "gasConsumed": "663855", + "gasLimit": "671148", + "index": 1, + "nonceChanges": [ + { + "address": "eiOPKY1V+NsnuGDv8eAtFSixZYU=", + "newValue": "9", + "oldValue": "8", + "ordinal": "5" + }, + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "newValue": "1", + "ordinal": "7" + } + ], + "storageChanges": [ + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI=", + "newValue": "AAAAAAAAAAAAAAAAQwAAAAAAAAAAAAAAAAAAAAAAAAA=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "10" + }, + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM=", + "newValue": "AAAAAAAAAAAAAAAAeiOPKY1V+NsnuGDv8eAtFSixZYU=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "11" + }, + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "newValue": "AAAAAAAAAAAAAAAAVmsCLVeUvExlb0NlkADTCzuyRWs=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "26" + } + ], + "value": { + "bytes": "d1bOoA==" + } + }, + { + "accountCreations": [ + { + "account": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "ordinal": "17" + } + ], + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "beginOrdinal": "15", + "callType": "CREATE", + "caller": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "codeChanges": [ + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "newCode": "YIBgQFJgBDYQYQA3V181YOAcgGMPrxAhFGEAQleAYx1j4k0UYQBeV4BjdHf3ABRhAIhXYQA+Vls2YQA+VwBbX4D9W2EAXGAEgDYDgQGQYQBXkZBhATVWW2EAslZbAFs0gBVhAGlXX4D9W1BhAHJhAMtWW2BAUWEAf5GQYQF4VltgQFGAkQOQ81s0gBVhAJNXX4D9W1BhAJxhANFWW2BAUWEAqZGQYQF4VltgQFGAkQOQ81uAc///////////////////////////Fv9bYANUgVZbYAJUgVZbX4D9W19z//////////////////////////+CFpBQkZBQVltfYQEEgmEA21ZbkFCRkFBWW2EBFIFhAPpWW4EUYQEeV1+A/VtQVltfgTWQUGEBL4FhAQtWW5KRUFBWW19gIIKEAxIVYQFKV2EBSWEA11ZbW19hAVeEgoUBYQEhVluRUFCSkVBQVltfgZBQkZBQVlthAXKBYQFgVluCUlBQVltfYCCCAZBQYQGLX4MBhGEBaVZbkpFQUFb+omRpcGZzWCISIHid/r1MOgTwUCbXkfGIbQ/MEz3C2yEWBFlKgAtb0jIwZHNvbGNDAAgZADM=", + "newHash": "6CUXyeRMWXwdWTThEgzSUhJR2IxY3DiiPnUZpa1qPpY=", + "oldHash": "xdJGAYb3IzySfn2y3McDwOUAtlPKgic7e/rYBF2FpHA=", + "ordinal": "23" + } + ], + "depth": 1, + "endOrdinal": "24", + "gasChanges": [ + { + "newValue": "540624", + "oldValue": "540708", + "ordinal": "21", + "reason": "REASON_CODE_COPY" + }, + { + "newValue": "449622", + "oldValue": "540622", + "ordinal": "22", + "reason": "REASON_CODE_STORAGE" + } + ], + "gasConsumed": "135471", + "gasLimit": "585093", + "index": 2, + "nonceChanges": [ + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "newValue": "2", + "oldValue": "1", + "ordinal": "16" + }, + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "newValue": "1", + "ordinal": "18" + } + ], + "parentIndex": 1, + "storageChanges": [ + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "newValue": "AAAAAAAAAAAAAAAAQwAAAAAAAAAAAAAAAAAAAAAAAAA=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "19" + }, + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "newValue": "AAAAAAAAAAAAAAAAeiOPKY1V+NsnuGDv8eAtFSixZYU=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "20" + } + ] + }, + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "balanceChanges": [ + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "oldValue": { + "bytes": "d1bOoA==" + }, + "ordinal": "29", + "reason": "REASON_TRANSFER" + }, + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "newValue": { + "bytes": "d1bOoA==" + }, + "ordinal": "30", + "reason": "REASON_TRANSFER" + } + ], + "beginOrdinal": "28", + "callType": "CALL", + "caller": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "depth": 1, + "endOrdinal": "31", + "gasConsumed": "55", + "gasLimit": "422878", + "index": 3, + "parentIndex": 1, + "value": { + "bytes": "d1bOoA==" + } + }, + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "balanceChanges": [ + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "newValue": { + "bytes": "d1bOoA==" + }, + "ordinal": "36", + "reason": "REASON_SUICIDE_REFUND" + }, + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "oldValue": { + "bytes": "d1bOoA==" + }, + "ordinal": "37", + "reason": "REASON_SUICIDE_WITHDRAW" + } + ], + "beginOrdinal": "34", + "callType": "CALL", + "caller": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "depth": 1, + "endOrdinal": "38", + "executedCode": true, + "gasChanges": [ + { + "newValue": "416587", + "oldValue": "421587", + "ordinal": "35", + "reason": "REASON_SELF_DESTRUCT" + } + ], + "gasConsumed": "5401", + "gasLimit": "421988", + "index": 4, + "input": "D68QIQAAAAAAAAAAAAAAAFZrAi1XlLxMZW9DZZAA0ws7skVr", + "parentIndex": 1, + "suicide": true + } + ], + "endOrdinal": "46", + "from": "eiOPKY1V+NsnuGDv8eAtFSixZYU=", + "gasLimit": "779146", + "gasPrice": { + "bytes": "mVhWcg==" + }, + "gasUsed": "771853", + "hash": "5gTFisgmyZvp3w4jvWMAn6e93CFPnMRbzXnM9NcV2lg=", + "input": "YIBgQFJzQwAAAAAAAAAAAAAAAAAAAAAAAABgAl9hAQAKgVSBc///////////////////////////AhkWkINz//////////////////////////8WAheQVVBzeiOPKY1V+NsnuGDv8eAtFSixZYVgA19hAQAKgVSBc///////////////////////////AhkWkINz//////////////////////////8WAheQVVBhALphAL9gIBtgIBxWW2EDHlZbX3+cIv9fIfC4GxE+Y/fbbalP7e8RshGbQIi4lmT7mjy2WJBQgGBAUWEA8JBhAnhWW4GQYEBRgJEDkF/1kFCAFYAVYQENVz1fgD49X/1bUF+AYQEACoFUgXP//////////////////////////wIZFpCDc///////////////////////////FgIXkFVQX4BUkGEBAAqQBHP//////////////////////////xZz//////////////////////////8WNGBAUWEBj5BhArJWW19gQFGAgwOBhYda8ZJQUFA9gF+BFGEByVdgQFGRUGAfGWA/PQEWggFgQFI9glI9X2AghAE+YQHOVltgYJFQW1BQUF+AVJBhAQAKkARz//////////////////////////8Wc///////////////////////////FmMPrxAhX4BUkGEBAAqQBHP//////////////////////////xZgQFGCY/////8WYOAbgVJgBAFhAkiRkGEDBVZbX2BAUYCDA4Ffh4A7FYAVYQJfV1+A/VtQWvEVgBVhAnFXPV+APj1f/VtQUFBQUFZbYQKKgGELSYM5AZBWW1+BkFCSkVBQVltQVltfYQKdX4NhAoVWW5FQYQKogmECj1ZbX4IBkFCRkFBWW19hAryCYQKSVluRUIGQUJGQUFZbX3P//////////////////////////4IWkFCRkFBWW19hAu+CYQLGVluQUJGQUFZbYQL/gWEC5VZbglJQUFZbX2AgggGQUGEDGF+DAYRhAvZWW5KRUFBWW2EIHoBhAytfOV/z/mCAYEBSYAQ2EGEAc1dfNWDgHIBjTffj0BFhAE1XgGNN9+PQFGEA3FeAY3R39wAUYQEGV4Bjex2CnBRhATBXgGPPOiF+FGEBWldhAHpWW4BjC2HNfxRhAH5XgGMNvmcfFGEAiFeAYx1j4k0UYQCyV2EAelZbNmEAelcAW1+A/VthAIZhAXBWWwBbNIAVYQCTV1+A/VtQYQCcYQMpVltgQFFhAKmRkGEEmlZbYEBRgJEDkPNbNIAVYQC9V1+A/VtQYQDGYQNMVltgQFFhANORkGEEy1ZbYEBRgJEDkPNbNIAVYQDnV1+A/VtQYQDwYQNSVltgQFFhAP2RkGEEmlZbYEBRgJEDkPNbNIAVYQERV1+A/VtQYQEaYQN3VltgQFFhASeRkGEEy1ZbYEBRgJEDkPNbNIAVYQE7V1+A/VtQYQFEYQN9VltgQFFhAVGRkGEEy1ZbYEBRgJEDkPNbNIAVYQFlV1+A/VtQYQFuYQODVlsAW19/nCL/XyHwuBsRPmP3222pT+3vEbIRm0CIuJZk+5o8tliQUIBgQFFhAaGQYQQTVluBkGBAUYCRA5Bf9ZBQgBWAFWEBvlc9X4A+PV/9W1BfgGEBAAqBVIFz//////////////////////////8CGRaQg3P//////////////////////////xYCF5BVUF+AVJBhAQAKkARz//////////////////////////8Wc///////////////////////////FjRgQFFhAkCQYQURVltfYEBRgIMDgYWHWvGSUFBQPYBfgRRhAnpXYEBRkVBgHxlgPz0BFoIBYEBSPYJSPV9gIIQBPmECf1ZbYGCRUFtQUFBfgFSQYQEACpAEc///////////////////////////FnP//////////////////////////xZjD68QIV+AVJBhAQAKkARz//////////////////////////8WYEBRgmP/////FmDgG4FSYAQBYQL5kZBhBUVWW19gQFGAgwOBX4eAOxWAFWEDEFdfgP1bUFrxFYAVYQMiVz1fgD49X/1bUFBQUFBWW1+AVJBhAQAKkARz//////////////////////////8WgVZbYAVUgVZbYAFfkFSQYQEACpAEc///////////////////////////FoFWW2AEVIFWW2AGVIFWW19/nCL/XyHwuBsRPmP3222pT+3vEbIRm0CIuJZk+5o8tliQUIBgQFFhA7SQYQQTVluBkGBAUYCRA5Bf9ZBQgBWAFWED0Vc9X4A+PV/9W1BfgGEBAAqBVIFz//////////////////////////8CGRaQg3P//////////////////////////xYCF5BVUFBWW2ECioBhBV+DOQGQVltfc///////////////////////////ghaQUJGQUFZbX4GQUJGQUFZbX2EEYmEEXWEEWIRhBCBWW2EEP1ZbYQQgVluQUJGQUFZbX2EEc4JhBEhWW5BQkZBQVltfYQSEgmEEaVZbkFCRkFBWW2EElIFhBHpWW4JSUFBWW19gIIIBkFBhBK1fgwGEYQSLVluSkVBQVltfgZBQkZBQVlthBMWBYQSzVluCUlBQVltfYCCCAZBQYQTeX4MBhGEEvFZbkpFQUFZbX4GQUJKRUFBWW1BWW19hBPxfg2EE5FZbkVBhBQeCYQTuVltfggGQUJGQUFZbX2EFG4JhBPFWW5FQgZBQkZBQVltfYQUvgmEEIFZbkFCRkFBWW2EFP4FhBSVWW4JSUFBWW19gIIIBkFBhBVhfgwGEYQU2VluSkVBQVv5ggGBAUnNDAAAAAAAAAAAAAAAAAAAAAAAAAF+AYQEACoFUgXP//////////////////////////wIZFpCDc///////////////////////////FgIXkFVQc3ojjymNVfjbJ7hg7/HgLRUosWWFYAFfYQEACoFUgXP//////////////////////////wIZFpCDc///////////////////////////FgIXkFVQNIAVYLVXX4D9W1BhAceAYQDDXzlf8/5ggGBAUmAENhBhADdXXzVg4ByAYw+vECEUYQBCV4BjHWPiTRRhAF5XgGN0d/cAFGEAiFdhAD5WWzZhAD5XAFtfgP1bYQBcYASANgOBAZBhAFeRkGEBNVZbYQCyVlsAWzSAFWEAaVdfgP1bUGEAcmEAy1ZbYEBRYQB/kZBhAXhWW2BAUYCRA5DzWzSAFWEAk1dfgP1bUGEAnGEA0VZbYEBRYQCpkZBhAXhWW2BAUYCRA5DzW4Bz//////////////////////////8W/1tgA1SBVltgAlSBVltfgP1bX3P//////////////////////////4IWkFCRkFBWW19hAQSCYQDbVluQUJGQUFZbYQEUgWEA+lZbgRRhAR5XX4D9W1BWW1+BNZBQYQEvgWEBC1ZbkpFQUFZbX2AggoQDEhVhAUpXYQFJYQDXVltbX2EBV4SChQFhASFWW5FQUJKRUFBWW1+BkFCRkFBWW2EBcoFhAWBWW4JSUFBWW19gIIIBkFBhAYtfgwGEYQFpVluSkVBQVv6iZGlwZnNYIhIgeJ3+vUw6BPBQJteR8YhtD8wTPcLbIRYEWUqAC1vSMjBkc29sY0MACBkAM6JkaXBmc1giEiC/VJdrQtHrDXIpsr3UjopR7bzpzAzhLuPtNOmtg7kBFWRzb2xjQwAIGQAzYIBgQFJzQwAAAAAAAAAAAAAAAAAAAAAAAABfgGEBAAqBVIFz//////////////////////////8CGRaQg3P//////////////////////////xYCF5BVUHN6I48pjVX42ye4YO/x4C0VKLFlhWABX2EBAAqBVIFz//////////////////////////8CGRaQg3P//////////////////////////xYCF5BVUDSAFWC1V1+A/VtQYQHHgGEAw185X/P+YIBgQFJgBDYQYQA3V181YOAcgGMPrxAhFGEAQleAYx1j4k0UYQBeV4BjdHf3ABRhAIhXYQA+Vls2YQA+VwBbX4D9W2EAXGAEgDYDgQGQYQBXkZBhATVWW2EAslZbAFs0gBVhAGlXX4D9W1BhAHJhAMtWW2BAUWEAf5GQYQF4VltgQFGAkQOQ81s0gBVhAJNXX4D9W1BhAJxhANFWW2BAUWEAqZGQYQF4VltgQFGAkQOQ81uAc///////////////////////////Fv9bYANUgVZbYAJUgVZbX4D9W19z//////////////////////////+CFpBQkZBQVltfYQEEgmEA21ZbkFCRkFBWW2EBFIFhAPpWW4EUYQEeV1+A/VtQVltfgTWQUGEBL4FhAQtWW5KRUFBWW19gIIKEAxIVYQFKV2EBSWEA11ZbW19hAVeEgoUBYQEhVluRUFCSkVBQVltfgZBQkZBQVlthAXKBYQFgVluCUlBQVltfYCCCAZBQYQGLX4MBhGEBaVZbkpFQUFb+omRpcGZzWCISIHid/r1MOgTwUCbXkfGIbQ/MEz3C2yEWBFlKgAtb0jIwZHNvbGNDAAgZADM=", + "maxFeePerGas": { + "bytes": "yOKYzA==" + }, + "maxPriorityFeePerGas": { + "bytes": "BlE2qw==" + }, + "nonce": "8", + "r": "uEHvjD26MNMUOogGHEac8h8Gyz2aw+Nbzc+mi2kmRS8=", + "receipt": { + "cumulativeGasUsed": "771853", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "s": "E8IkJGk6TjnE8pl+DO4Ty/WfNsTFicVgSpPI2ayGblU=", + "status": "SUCCEEDED", + "to": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "type": "TRX_TYPE_DYNAMIC_FEE", + "value": { + "bytes": "d1bOoA==" + } + } + ], + "ver": 3 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/suicide_double_withdraw/fh3.0/block.1550267.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/suicide_double_withdraw/fh3.0/block.1550267.golden.json new file mode 100644 index 0000000000..10bc93d179 --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/suicide_double_withdraw/fh3.0/block.1550267.golden.json @@ -0,0 +1,391 @@ +{ + "hash": "ycVHQ3rBt3mfRIpHGewnuEXRq5LmU9/i+qoNZkx0qew=", + "header": { + "baseFeePerGas": { + "bytes": "kwcfxw==" + }, + "coinbase": "Kx2Hm14QLmAWYgLeeVN7SOLxikI=", + "difficulty": { + "bytes": "AA==" + }, + "gasLimit": "30000000", + "hash": "ycVHQ3rBt3mfRIpHGewnuEXRq5LmU9/i+qoNZkx0qew=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "1550267", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "Lqnb2KULZPqYeoP7inwY5jwKzNhQQaD6YS01a/i6ZrA=", + "receiptRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "stateRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "timestamp": "2024-05-15T17:12:36Z", + "transactionsRoot": "UGovRwB9IOw9P7ACFl+hfCxFwgTa3lRZNqwqrJ0NJ20=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=" + }, + "number": "1550267", + "size": "4196", + "transactionTraces": [ + { + "beginOrdinal": "1", + "calls": [ + { + "accountCreations": [ + { + "account": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "ordinal": "6" + } + ], + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "balanceChanges": [ + { + "address": "eiOPKY1V+NsnuGDv8eAtFSixZYU=", + "newValue": { + "bytes": "DbTWtv/L76k=" + }, + "oldValue": { + "bytes": "Dbv1zrT3nx0=" + }, + "ordinal": "2", + "reason": "REASON_GAS_BUY" + }, + { + "address": "eiOPKY1V+NsnuGDv8eAtFSixZYU=", + "newValue": { + "bytes": "DbTWtoh1IQk=" + }, + "oldValue": { + "bytes": "DbTWtv/L76k=" + }, + "ordinal": "8", + "reason": "REASON_TRANSFER" + }, + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "newValue": { + "bytes": "d1bOoA==" + }, + "ordinal": "9", + "reason": "REASON_TRANSFER" + }, + { + "address": "eiOPKY1V+NsnuGDv8eAtFSixZYU=", + "newValue": { + "bytes": "DbTnxxILzrM=" + }, + "oldValue": { + "bytes": "DbTWtoh1IQk=" + }, + "ordinal": "44", + "reason": "REASON_GAS_REFUND" + }, + { + "address": "Kx2Hm14QLmAWYgLeeVN7SOLxikI=", + "newValue": { + "bytes": "3mbuD6C1qntp" + }, + "oldValue": { + "bytes": "3mbtxTnosse6" + }, + "ordinal": "45", + "reason": "REASON_REWARD_TRANSACTION_FEE" + } + ], + "callType": "CREATE", + "caller": "eiOPKY1V+NsnuGDv8eAtFSixZYU=", + "codeChanges": [ + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "newCode": "YIBgQFJgBDYQYQBzV181YOAcgGNN9+PQEWEATVeAY03349AUYQDcV4BjdHf3ABRhAQZXgGN7HYKcFGEBMFeAY886IX4UYQFaV2EAelZbgGMLYc1/FGEAfleAYw2+Zx8UYQCIV4BjHWPiTRRhALJXYQB6Vls2YQB6VwBbX4D9W2EAhmEBcFZbAFs0gBVhAJNXX4D9W1BhAJxhAylWW2BAUWEAqZGQYQSaVltgQFGAkQOQ81s0gBVhAL1XX4D9W1BhAMZhA0xWW2BAUWEA05GQYQTLVltgQFGAkQOQ81s0gBVhAOdXX4D9W1BhAPBhA1JWW2BAUWEA/ZGQYQSaVltgQFGAkQOQ81s0gBVhARFXX4D9W1BhARphA3dWW2BAUWEBJ5GQYQTLVltgQFGAkQOQ81s0gBVhATtXX4D9W1BhAURhA31WW2BAUWEBUZGQYQTLVltgQFGAkQOQ81s0gBVhAWVXX4D9W1BhAW5hA4NWWwBbX3+cIv9fIfC4GxE+Y/fbbalP7e8RshGbQIi4lmT7mjy2WJBQgGBAUWEBoZBhBBNWW4GQYEBRgJEDkF/1kFCAFYAVYQG+Vz1fgD49X/1bUF+AYQEACoFUgXP//////////////////////////wIZFpCDc///////////////////////////FgIXkFVQX4BUkGEBAAqQBHP//////////////////////////xZz//////////////////////////8WNGBAUWECQJBhBRFWW19gQFGAgwOBhYda8ZJQUFA9gF+BFGECeldgQFGRUGAfGWA/PQEWggFgQFI9glI9X2AghAE+YQJ/VltgYJFQW1BQUF+AVJBhAQAKkARz//////////////////////////8Wc///////////////////////////FmMPrxAhX4BUkGEBAAqQBHP//////////////////////////xZgQFGCY/////8WYOAbgVJgBAFhAvmRkGEFRVZbX2BAUYCDA4Ffh4A7FYAVYQMQV1+A/VtQWvEVgBVhAyJXPV+APj1f/VtQUFBQUFZbX4BUkGEBAAqQBHP//////////////////////////xaBVltgBVSBVltgAV+QVJBhAQAKkARz//////////////////////////8WgVZbYARUgVZbYAZUgVZbX3+cIv9fIfC4GxE+Y/fbbalP7e8RshGbQIi4lmT7mjy2WJBQgGBAUWEDtJBhBBNWW4GQYEBRgJEDkF/1kFCAFYAVYQPRVz1fgD49X/1bUF+AYQEACoFUgXP//////////////////////////wIZFpCDc///////////////////////////FgIXkFVQUFZbYQKKgGEFX4M5AZBWW19z//////////////////////////+CFpBQkZBQVltfgZBQkZBQVltfYQRiYQRdYQRYhGEEIFZbYQQ/VlthBCBWW5BQkZBQVltfYQRzgmEESFZbkFCRkFBWW19hBISCYQRpVluQUJGQUFZbYQSUgWEEelZbglJQUFZbX2AgggGQUGEErV+DAYRhBItWW5KRUFBWW1+BkFCRkFBWW2EExYFhBLNWW4JSUFBWW19gIIIBkFBhBN5fgwGEYQS8VluSkVBQVltfgZBQkpFQUFZbUFZbX2EE/F+DYQTkVluRUGEFB4JhBO5WW1+CAZBQkZBQVltfYQUbgmEE8VZbkVCBkFCRkFBWW19hBS+CYQQgVluQUJGQUFZbYQU/gWEFJVZbglJQUFZbX2AgggGQUGEFWF+DAYRhBTZWW5KRUFBW/mCAYEBSc0MAAAAAAAAAAAAAAAAAAAAAAAAAX4BhAQAKgVSBc///////////////////////////AhkWkINz//////////////////////////8WAheQVVBzeiOPKY1V+NsnuGDv8eAtFSixZYVgAV9hAQAKgVSBc///////////////////////////AhkWkINz//////////////////////////8WAheQVVA0gBVgtVdfgP1bUGEBx4BhAMNfOV/z/mCAYEBSYAQ2EGEAN1dfNWDgHIBjD68QIRRhAEJXgGMdY+JNFGEAXleAY3R39wAUYQCIV2EAPlZbNmEAPlcAW1+A/VthAFxgBIA2A4EBkGEAV5GQYQE1VlthALJWWwBbNIAVYQBpV1+A/VtQYQByYQDLVltgQFFhAH+RkGEBeFZbYEBRgJEDkPNbNIAVYQCTV1+A/VtQYQCcYQDRVltgQFFhAKmRkGEBeFZbYEBRgJEDkPNbgHP//////////////////////////xb/W2ADVIFWW2ACVIFWW1+A/Vtfc///////////////////////////ghaQUJGQUFZbX2EBBIJhANtWW5BQkZBQVlthARSBYQD6VluBFGEBHldfgP1bUFZbX4E1kFBhAS+BYQELVluSkVBQVltfYCCChAMSFWEBSldhAUlhANdWW1tfYQFXhIKFAWEBIVZbkVBQkpFQUFZbX4GQUJGQUFZbYQFygWEBYFZbglJQUFZbX2AgggGQUGEBi1+DAYRhAWlWW5KRUFBW/qJkaXBmc1giEiB4nf69TDoE8FAm15HxiG0PzBM9wtshFgRZSoALW9IyMGRzb2xjQwAIGQAzomRpcGZzWCISIL9Ul2tC0esNcimyvdSOilHtvOnMDOEu4+006a2DuQEVZHNvbGNDAAgZADM=", + "newHash": "SCiyEasTfEh/c8vA9xQ/UVY7EnPvfmQlXKBqXUD/TxU=", + "oldHash": "xdJGAYb3IzySfn2y3McDwOUAtlPKgic7e/rYBF2FpHA=", + "ordinal": "42" + } + ], + "endOrdinal": "43", + "gasChanges": [ + { + "newValue": "671148", + "oldValue": "779146", + "ordinal": "3", + "reason": "REASON_INTRINSIC_GAS" + }, + { + "newValue": "626589", + "oldValue": "626722", + "ordinal": "12", + "reason": "REASON_CODE_COPY" + }, + { + "newValue": "594380", + "oldValue": "626548", + "ordinal": "13", + "reason": "REASON_CONTRACT_CREATION2" + }, + { + "newValue": "9287", + "oldValue": "594380", + "ordinal": "14", + "reason": "REASON_CONTRACT_CREATION2" + }, + { + "newValue": "458909", + "oldValue": "9287", + "ordinal": "25", + "reason": "REASON_REFUND_AFTER_EXECUTION" + }, + { + "newValue": "6675", + "oldValue": "436353", + "ordinal": "27", + "reason": "REASON_CALL" + }, + { + "newValue": "429498", + "oldValue": "6675", + "ordinal": "32", + "reason": "REASON_REFUND_AFTER_EXECUTION" + }, + { + "newValue": "6698", + "oldValue": "428786", + "ordinal": "33", + "reason": "REASON_CALL" + }, + { + "newValue": "423285", + "oldValue": "6698", + "ordinal": "39", + "reason": "REASON_REFUND_AFTER_EXECUTION" + }, + { + "newValue": "422895", + "oldValue": "423220", + "ordinal": "40", + "reason": "REASON_CODE_COPY" + }, + { + "newValue": "7293", + "oldValue": "422893", + "ordinal": "41", + "reason": "REASON_CODE_STORAGE" + } + ], + "gasConsumed": "663855", + "gasLimit": "671148", + "index": 1, + "nonceChanges": [ + { + "address": "eiOPKY1V+NsnuGDv8eAtFSixZYU=", + "newValue": "9", + "oldValue": "8", + "ordinal": "5" + }, + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "newValue": "1", + "ordinal": "7" + } + ], + "storageChanges": [ + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI=", + "newValue": "AAAAAAAAAAAAAAAAQwAAAAAAAAAAAAAAAAAAAAAAAAA=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "10" + }, + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM=", + "newValue": "AAAAAAAAAAAAAAAAeiOPKY1V+NsnuGDv8eAtFSixZYU=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "11" + }, + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "newValue": "AAAAAAAAAAAAAAAAVmsCLVeUvExlb0NlkADTCzuyRWs=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "26" + } + ], + "value": { + "bytes": "d1bOoA==" + } + }, + { + "accountCreations": [ + { + "account": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "ordinal": "17" + } + ], + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "beginOrdinal": "15", + "callType": "CREATE", + "caller": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "codeChanges": [ + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "newCode": "YIBgQFJgBDYQYQA3V181YOAcgGMPrxAhFGEAQleAYx1j4k0UYQBeV4BjdHf3ABRhAIhXYQA+Vls2YQA+VwBbX4D9W2EAXGAEgDYDgQGQYQBXkZBhATVWW2EAslZbAFs0gBVhAGlXX4D9W1BhAHJhAMtWW2BAUWEAf5GQYQF4VltgQFGAkQOQ81s0gBVhAJNXX4D9W1BhAJxhANFWW2BAUWEAqZGQYQF4VltgQFGAkQOQ81uAc///////////////////////////Fv9bYANUgVZbYAJUgVZbX4D9W19z//////////////////////////+CFpBQkZBQVltfYQEEgmEA21ZbkFCRkFBWW2EBFIFhAPpWW4EUYQEeV1+A/VtQVltfgTWQUGEBL4FhAQtWW5KRUFBWW19gIIKEAxIVYQFKV2EBSWEA11ZbW19hAVeEgoUBYQEhVluRUFCSkVBQVltfgZBQkZBQVlthAXKBYQFgVluCUlBQVltfYCCCAZBQYQGLX4MBhGEBaVZbkpFQUFb+omRpcGZzWCISIHid/r1MOgTwUCbXkfGIbQ/MEz3C2yEWBFlKgAtb0jIwZHNvbGNDAAgZADM=", + "newHash": "6CUXyeRMWXwdWTThEgzSUhJR2IxY3DiiPnUZpa1qPpY=", + "oldHash": "xdJGAYb3IzySfn2y3McDwOUAtlPKgic7e/rYBF2FpHA=", + "ordinal": "23" + } + ], + "depth": 1, + "endOrdinal": "24", + "gasChanges": [ + { + "newValue": "540624", + "oldValue": "540708", + "ordinal": "21", + "reason": "REASON_CODE_COPY" + }, + { + "newValue": "449622", + "oldValue": "540622", + "ordinal": "22", + "reason": "REASON_CODE_STORAGE" + } + ], + "gasConsumed": "135471", + "gasLimit": "585093", + "index": 2, + "nonceChanges": [ + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "newValue": "2", + "oldValue": "1", + "ordinal": "16" + }, + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "newValue": "1", + "ordinal": "18" + } + ], + "parentIndex": 1, + "storageChanges": [ + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "newValue": "AAAAAAAAAAAAAAAAQwAAAAAAAAAAAAAAAAAAAAAAAAA=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "19" + }, + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "newValue": "AAAAAAAAAAAAAAAAeiOPKY1V+NsnuGDv8eAtFSixZYU=", + "oldValue": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "ordinal": "20" + } + ] + }, + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "balanceChanges": [ + { + "address": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "oldValue": { + "bytes": "d1bOoA==" + }, + "ordinal": "29", + "reason": "REASON_TRANSFER" + }, + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "newValue": { + "bytes": "d1bOoA==" + }, + "ordinal": "30", + "reason": "REASON_TRANSFER" + } + ], + "beginOrdinal": "28", + "callType": "CALL", + "caller": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "depth": 1, + "endOrdinal": "31", + "gasConsumed": "55", + "gasLimit": "422878", + "index": 3, + "parentIndex": 1, + "value": { + "bytes": "d1bOoA==" + } + }, + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "balanceChanges": [ + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "newValue": { + "bytes": "d1bOoA==" + }, + "ordinal": "36", + "reason": "REASON_SUICIDE_REFUND" + }, + { + "address": "VmsCLVeUvExlb0NlkADTCzuyRWs=", + "oldValue": { + "bytes": "d1bOoA==" + }, + "ordinal": "37", + "reason": "REASON_SUICIDE_WITHDRAW" + } + ], + "beginOrdinal": "34", + "callType": "CALL", + "caller": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "depth": 1, + "endOrdinal": "38", + "executedCode": true, + "gasChanges": [ + { + "newValue": "416587", + "oldValue": "421587", + "ordinal": "35", + "reason": "REASON_SELF_DESTRUCT" + } + ], + "gasConsumed": "5401", + "gasLimit": "421988", + "index": 4, + "input": "D68QIQAAAAAAAAAAAAAAAFZrAi1XlLxMZW9DZZAA0ws7skVr", + "parentIndex": 1, + "suicide": true + } + ], + "endOrdinal": "46", + "from": "eiOPKY1V+NsnuGDv8eAtFSixZYU=", + "gasLimit": "779146", + "gasPrice": { + "bytes": "mVhWcg==" + }, + "gasUsed": "771853", + "hash": "5gTFisgmyZvp3w4jvWMAn6e93CFPnMRbzXnM9NcV2lg=", + "input": "YIBgQFJzQwAAAAAAAAAAAAAAAAAAAAAAAABgAl9hAQAKgVSBc///////////////////////////AhkWkINz//////////////////////////8WAheQVVBzeiOPKY1V+NsnuGDv8eAtFSixZYVgA19hAQAKgVSBc///////////////////////////AhkWkINz//////////////////////////8WAheQVVBhALphAL9gIBtgIBxWW2EDHlZbX3+cIv9fIfC4GxE+Y/fbbalP7e8RshGbQIi4lmT7mjy2WJBQgGBAUWEA8JBhAnhWW4GQYEBRgJEDkF/1kFCAFYAVYQENVz1fgD49X/1bUF+AYQEACoFUgXP//////////////////////////wIZFpCDc///////////////////////////FgIXkFVQX4BUkGEBAAqQBHP//////////////////////////xZz//////////////////////////8WNGBAUWEBj5BhArJWW19gQFGAgwOBhYda8ZJQUFA9gF+BFGEByVdgQFGRUGAfGWA/PQEWggFgQFI9glI9X2AghAE+YQHOVltgYJFQW1BQUF+AVJBhAQAKkARz//////////////////////////8Wc///////////////////////////FmMPrxAhX4BUkGEBAAqQBHP//////////////////////////xZgQFGCY/////8WYOAbgVJgBAFhAkiRkGEDBVZbX2BAUYCDA4Ffh4A7FYAVYQJfV1+A/VtQWvEVgBVhAnFXPV+APj1f/VtQUFBQUFZbYQKKgGELSYM5AZBWW1+BkFCSkVBQVltQVltfYQKdX4NhAoVWW5FQYQKogmECj1ZbX4IBkFCRkFBWW19hAryCYQKSVluRUIGQUJGQUFZbX3P//////////////////////////4IWkFCRkFBWW19hAu+CYQLGVluQUJGQUFZbYQL/gWEC5VZbglJQUFZbX2AgggGQUGEDGF+DAYRhAvZWW5KRUFBWW2EIHoBhAytfOV/z/mCAYEBSYAQ2EGEAc1dfNWDgHIBjTffj0BFhAE1XgGNN9+PQFGEA3FeAY3R39wAUYQEGV4Bjex2CnBRhATBXgGPPOiF+FGEBWldhAHpWW4BjC2HNfxRhAH5XgGMNvmcfFGEAiFeAYx1j4k0UYQCyV2EAelZbNmEAelcAW1+A/VthAIZhAXBWWwBbNIAVYQCTV1+A/VtQYQCcYQMpVltgQFFhAKmRkGEEmlZbYEBRgJEDkPNbNIAVYQC9V1+A/VtQYQDGYQNMVltgQFFhANORkGEEy1ZbYEBRgJEDkPNbNIAVYQDnV1+A/VtQYQDwYQNSVltgQFFhAP2RkGEEmlZbYEBRgJEDkPNbNIAVYQERV1+A/VtQYQEaYQN3VltgQFFhASeRkGEEy1ZbYEBRgJEDkPNbNIAVYQE7V1+A/VtQYQFEYQN9VltgQFFhAVGRkGEEy1ZbYEBRgJEDkPNbNIAVYQFlV1+A/VtQYQFuYQODVlsAW19/nCL/XyHwuBsRPmP3222pT+3vEbIRm0CIuJZk+5o8tliQUIBgQFFhAaGQYQQTVluBkGBAUYCRA5Bf9ZBQgBWAFWEBvlc9X4A+PV/9W1BfgGEBAAqBVIFz//////////////////////////8CGRaQg3P//////////////////////////xYCF5BVUF+AVJBhAQAKkARz//////////////////////////8Wc///////////////////////////FjRgQFFhAkCQYQURVltfYEBRgIMDgYWHWvGSUFBQPYBfgRRhAnpXYEBRkVBgHxlgPz0BFoIBYEBSPYJSPV9gIIQBPmECf1ZbYGCRUFtQUFBfgFSQYQEACpAEc///////////////////////////FnP//////////////////////////xZjD68QIV+AVJBhAQAKkARz//////////////////////////8WYEBRgmP/////FmDgG4FSYAQBYQL5kZBhBUVWW19gQFGAgwOBX4eAOxWAFWEDEFdfgP1bUFrxFYAVYQMiVz1fgD49X/1bUFBQUFBWW1+AVJBhAQAKkARz//////////////////////////8WgVZbYAVUgVZbYAFfkFSQYQEACpAEc///////////////////////////FoFWW2AEVIFWW2AGVIFWW19/nCL/XyHwuBsRPmP3222pT+3vEbIRm0CIuJZk+5o8tliQUIBgQFFhA7SQYQQTVluBkGBAUYCRA5Bf9ZBQgBWAFWED0Vc9X4A+PV/9W1BfgGEBAAqBVIFz//////////////////////////8CGRaQg3P//////////////////////////xYCF5BVUFBWW2ECioBhBV+DOQGQVltfc///////////////////////////ghaQUJGQUFZbX4GQUJGQUFZbX2EEYmEEXWEEWIRhBCBWW2EEP1ZbYQQgVluQUJGQUFZbX2EEc4JhBEhWW5BQkZBQVltfYQSEgmEEaVZbkFCRkFBWW2EElIFhBHpWW4JSUFBWW19gIIIBkFBhBK1fgwGEYQSLVluSkVBQVltfgZBQkZBQVlthBMWBYQSzVluCUlBQVltfYCCCAZBQYQTeX4MBhGEEvFZbkpFQUFZbX4GQUJKRUFBWW1BWW19hBPxfg2EE5FZbkVBhBQeCYQTuVltfggGQUJGQUFZbX2EFG4JhBPFWW5FQgZBQkZBQVltfYQUvgmEEIFZbkFCRkFBWW2EFP4FhBSVWW4JSUFBWW19gIIIBkFBhBVhfgwGEYQU2VluSkVBQVv5ggGBAUnNDAAAAAAAAAAAAAAAAAAAAAAAAAF+AYQEACoFUgXP//////////////////////////wIZFpCDc///////////////////////////FgIXkFVQc3ojjymNVfjbJ7hg7/HgLRUosWWFYAFfYQEACoFUgXP//////////////////////////wIZFpCDc///////////////////////////FgIXkFVQNIAVYLVXX4D9W1BhAceAYQDDXzlf8/5ggGBAUmAENhBhADdXXzVg4ByAYw+vECEUYQBCV4BjHWPiTRRhAF5XgGN0d/cAFGEAiFdhAD5WWzZhAD5XAFtfgP1bYQBcYASANgOBAZBhAFeRkGEBNVZbYQCyVlsAWzSAFWEAaVdfgP1bUGEAcmEAy1ZbYEBRYQB/kZBhAXhWW2BAUYCRA5DzWzSAFWEAk1dfgP1bUGEAnGEA0VZbYEBRYQCpkZBhAXhWW2BAUYCRA5DzW4Bz//////////////////////////8W/1tgA1SBVltgAlSBVltfgP1bX3P//////////////////////////4IWkFCRkFBWW19hAQSCYQDbVluQUJGQUFZbYQEUgWEA+lZbgRRhAR5XX4D9W1BWW1+BNZBQYQEvgWEBC1ZbkpFQUFZbX2AggoQDEhVhAUpXYQFJYQDXVltbX2EBV4SChQFhASFWW5FQUJKRUFBWW1+BkFCRkFBWW2EBcoFhAWBWW4JSUFBWW19gIIIBkFBhAYtfgwGEYQFpVluSkVBQVv6iZGlwZnNYIhIgeJ3+vUw6BPBQJteR8YhtD8wTPcLbIRYEWUqAC1vSMjBkc29sY0MACBkAM6JkaXBmc1giEiC/VJdrQtHrDXIpsr3UjopR7bzpzAzhLuPtNOmtg7kBFWRzb2xjQwAIGQAzYIBgQFJzQwAAAAAAAAAAAAAAAAAAAAAAAABfgGEBAAqBVIFz//////////////////////////8CGRaQg3P//////////////////////////xYCF5BVUHN6I48pjVX42ye4YO/x4C0VKLFlhWABX2EBAAqBVIFz//////////////////////////8CGRaQg3P//////////////////////////xYCF5BVUDSAFWC1V1+A/VtQYQHHgGEAw185X/P+YIBgQFJgBDYQYQA3V181YOAcgGMPrxAhFGEAQleAYx1j4k0UYQBeV4BjdHf3ABRhAIhXYQA+Vls2YQA+VwBbX4D9W2EAXGAEgDYDgQGQYQBXkZBhATVWW2EAslZbAFs0gBVhAGlXX4D9W1BhAHJhAMtWW2BAUWEAf5GQYQF4VltgQFGAkQOQ81s0gBVhAJNXX4D9W1BhAJxhANFWW2BAUWEAqZGQYQF4VltgQFGAkQOQ81uAc///////////////////////////Fv9bYANUgVZbYAJUgVZbX4D9W19z//////////////////////////+CFpBQkZBQVltfYQEEgmEA21ZbkFCRkFBWW2EBFIFhAPpWW4EUYQEeV1+A/VtQVltfgTWQUGEBL4FhAQtWW5KRUFBWW19gIIKEAxIVYQFKV2EBSWEA11ZbW19hAVeEgoUBYQEhVluRUFCSkVBQVltfgZBQkZBQVlthAXKBYQFgVluCUlBQVltfYCCCAZBQYQGLX4MBhGEBaVZbkpFQUFb+omRpcGZzWCISIHid/r1MOgTwUCbXkfGIbQ/MEz3C2yEWBFlKgAtb0jIwZHNvbGNDAAgZADM=", + "maxFeePerGas": { + "bytes": "yOKYzA==" + }, + "maxPriorityFeePerGas": { + "bytes": "BlE2qw==" + }, + "nonce": "8", + "r": "uEHvjD26MNMUOogGHEac8h8Gyz2aw+Nbzc+mi2kmRS8=", + "receipt": { + "cumulativeGasUsed": "771853", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "s": "E8IkJGk6TjnE8pl+DO4Ty/WfNsTFicVgSpPI2ayGblU=", + "status": "SUCCEEDED", + "to": "tmHJ8wNCN1AUM716ZYd4S3AgslQ=", + "type": "TRX_TYPE_DYNAMIC_FEE", + "value": { + "bytes": "d1bOoA==" + } + } + ], + "ver": 3 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/suicide_double_withdraw/prestate.json b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/suicide_double_withdraw/prestate.json new file mode 100644 index 0000000000..6258a4976b --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestFirehosePrestate/suicide_double_withdraw/prestate.json @@ -0,0 +1,178 @@ +{ + "context": { + "baseFeePerGas": "2466717639", + "difficulty": "0", + "gasLimit": "30000000", + "miner": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "number": "1550267", + "timestamp": "1715793156" + }, + "genesis": { + "alloc": { + "0x2b1d879b5e102e60166202de79537b48e2f18a42": { + "balance": "0xde66edc539e8b2c7ba", + "nonce": "36" + }, + "0x566b022d5794bc4c656f43659000d30b3bb2456b": { + "balance": "0x0", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "0x7a238f298d55f8db27b860eff1e02d1528b16585": { + "balance": "0xdbbf5ceb4f79f1d", + "nonce": "8" + }, + "0xb661c9f3034237501433bd7a6587784b7020b254": { + "balance": "0x0", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000003": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + } + }, + "baseFeePerGas": "2412067821", + "blobGasUsed": "0x60000", + "config": { + "chainId": 17000, + "homesteadBlock": 0, + "daoForkSupport": true, + "eip150Block": 0, + "eip155Block": 0, + "eip158Block": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "istanbulBlock": 0, + "berlinBlock": 0, + "londonBlock": 0, + "shanghaiTime": 1696000704, + "cancunTime": 1707305664, + "terminalTotalDifficulty": 0, + "depositContractAddress": "0x0000000000000000000000000000000000000000", + "ethash": {}, + "blobSchedule": { + "cancun": { + "target": 3, + "max": 6, + "baseFeeUpdateFraction": 3338477 + } + } + }, + "difficulty": "0", + "totalDifficulty": "0", + "excessBlobGas": "0x5000000", + "extraData": "0x", + "gasLimit": "30000000", + "hash": "0x480fe829b1192cad4708bb5802c40ab123265b870eb8647a0aa356a3338ac5c9", + "miner": "0xc6e2459991bfe27cca6d86722f35da23a1e4cb97", + "mixHash": "0xd9aa01bad13cfc5bb4707367bdaec1f7790c1a387faf1acab7fb2fe01788f753", + "nonce": "0x0000000000000000", + "number": "1550266", + "parentBeaconBlockRoot": "0x090f4855361251c1e7496c2fde588cf530635fd7528f93eec22e50366b174dcc", + "stateRoot": "0xc3495340c7aaa4064cc1233cbbe29a93f10a96a4b76fff84760475263b75b225", + "timestamp": "1715793144", + "withdrawals": [ + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x6a2410", + "index": "0x177fb21", + "validatorIndex": "0x159270" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x690f5c", + "index": "0x177fb22", + "validatorIndex": "0x159271" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x6979d3", + "index": "0x177fb23", + "validatorIndex": "0x159272" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x683056", + "index": "0x177fb24", + "validatorIndex": "0x159273" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x69a405", + "index": "0x177fb25", + "validatorIndex": "0x159274" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x69728f", + "index": "0x177fb26", + "validatorIndex": "0x159275" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x697300", + "index": "0x177fb27", + "validatorIndex": "0x159276" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x699d11", + "index": "0x177fb28", + "validatorIndex": "0x159277" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x6a9be7", + "index": "0x177fb29", + "validatorIndex": "0x159278" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x6941a6", + "index": "0x177fb2a", + "validatorIndex": "0x159279" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x697011", + "index": "0x177fb2b", + "validatorIndex": "0x15927a" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x69fe61", + "index": "0x177fb2c", + "validatorIndex": "0x15927b" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x699117", + "index": "0x177fb2d", + "validatorIndex": "0x15927c" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x694474", + "index": "0x177fb2e", + "validatorIndex": "0x15927d" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x69b479", + "index": "0x177fb2f", + "validatorIndex": "0x15927e" + }, + { + "address": "0x2b1d879b5e102e60166202de79537b48e2f18a42", + "amount": "0x691ff4", + "index": "0x177fb30", + "validatorIndex": "0x15927f" + } + ], + "withdrawalsRoot": "0x0b4e1c1cd3f289e89a9e26649ac236ba45431c24dfddd0553e324bf9428d3110" + }, + "input": "0xb90e3602f90e328242680884065136ab84c8e298cc830be38a80847756cea0b90dd3608060405273430000000000000000000000000000000000000060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550737a238f298d55f8db27b860eff1e02d1528b1658560035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506100ba6100bf60201b60201c565b61031e565b5f7f9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb6589050806040516100f090610278565b8190604051809103905ff590508015801561010d573d5f803e3d5ffd5b505f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163460405161018f906102b2565b5f6040518083038185875af1925050503d805f81146101c9576040519150601f19603f3d011682016040523d82523d5f602084013e6101ce565b606091505b5050505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630faf10215f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b81526004016102489190610305565b5f604051808303815f87803b15801561025f575f80fd5b505af1158015610271573d5f803e3d5ffd5b5050505050565b61028a80610b4983390190565b5f81905092915050565b50565b5f61029d5f83610285565b91506102a88261028f565b5f82019050919050565b5f6102bc82610292565b9150819050919050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102ef826102c6565b9050919050565b6102ff816102e5565b82525050565b5f6020820190506103185f8301846102f6565b92915050565b61081e8061032b5f395ff3fe608060405260043610610073575f3560e01c80634df7e3d01161004d5780634df7e3d0146100dc5780637477f700146101065780637b1d829c14610130578063cf3a217e1461015a5761007a565b80630b61cd7f1461007e5780630dbe671f146100885780631d63e24d146100b25761007a565b3661007a57005b5f80fd5b610086610170565b005b348015610093575f80fd5b5061009c610329565b6040516100a9919061049a565b60405180910390f35b3480156100bd575f80fd5b506100c661034c565b6040516100d391906104cb565b60405180910390f35b3480156100e7575f80fd5b506100f0610352565b6040516100fd919061049a565b60405180910390f35b348015610111575f80fd5b5061011a610377565b60405161012791906104cb565b60405180910390f35b34801561013b575f80fd5b5061014461037d565b60405161015191906104cb565b60405180910390f35b348015610165575f80fd5b5061016e610383565b005b5f7f9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb6589050806040516101a190610413565b8190604051809103905ff59050801580156101be573d5f803e3d5ffd5b505f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163460405161024090610511565b5f6040518083038185875af1925050503d805f811461027a576040519150601f19603f3d011682016040523d82523d5f602084013e61027f565b606091505b5050505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630faf10215f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b81526004016102f99190610545565b5f604051808303815f87803b158015610310575f80fd5b505af1158015610322573d5f803e3d5ffd5b5050505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b60065481565b5f7f9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb6589050806040516103b490610413565b8190604051809103905ff59050801580156103d1573d5f803e3d5ffd5b505f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61028a8061055f83390190565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61046261045d61045884610420565b61043f565b610420565b9050919050565b5f61047382610448565b9050919050565b5f61048482610469565b9050919050565b6104948161047a565b82525050565b5f6020820190506104ad5f83018461048b565b92915050565b5f819050919050565b6104c5816104b3565b82525050565b5f6020820190506104de5f8301846104bc565b92915050565b5f81905092915050565b50565b5f6104fc5f836104e4565b9150610507826104ee565b5f82019050919050565b5f61051b826104f1565b9150819050919050565b5f61052f82610420565b9050919050565b61053f81610525565b82525050565b5f6020820190506105585f830184610536565b9291505056fe60806040527343000000000000000000000000000000000000005f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550737a238f298d55f8db27b860eff1e02d1528b1658560015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555034801560b5575f80fd5b506101c7806100c35f395ff3fe608060405260043610610037575f3560e01c80630faf1021146100425780631d63e24d1461005e5780637477f700146100885761003e565b3661003e57005b5f80fd5b61005c60048036038101906100579190610135565b6100b2565b005b348015610069575f80fd5b506100726100cb565b60405161007f9190610178565b60405180910390f35b348015610093575f80fd5b5061009c6100d1565b6040516100a99190610178565b60405180910390f35b8073ffffffffffffffffffffffffffffffffffffffff16ff5b60035481565b60025481565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610104826100db565b9050919050565b610114816100fa565b811461011e575f80fd5b50565b5f8135905061012f8161010b565b92915050565b5f6020828403121561014a576101496100d7565b5b5f61015784828501610121565b91505092915050565b5f819050919050565b61017281610160565b82525050565b5f60208201905061018b5f830184610169565b9291505056fea2646970667358221220789dfebd4c3a04f05026d791f1886d0fcc133dc2db211604594a800b5bd2323064736f6c63430008190033a2646970667358221220bf54976b42d1eb0d7229b2bdd48e8a51edbce9cc0ce12ee3ed34e9ad83b9011564736f6c6343000819003360806040527343000000000000000000000000000000000000005f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550737a238f298d55f8db27b860eff1e02d1528b1658560015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555034801560b5575f80fd5b506101c7806100c35f395ff3fe608060405260043610610037575f3560e01c80630faf1021146100425780631d63e24d1461005e5780637477f700146100885761003e565b3661003e57005b5f80fd5b61005c60048036038101906100579190610135565b6100b2565b005b348015610069575f80fd5b506100726100cb565b60405161007f9190610178565b60405180910390f35b348015610093575f80fd5b5061009c6100d1565b6040516100a99190610178565b60405180910390f35b8073ffffffffffffffffffffffffffffffffffffffff16ff5b60035481565b60025481565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610104826100db565b9050919050565b610114816100fa565b811461011e575f80fd5b50565b5f8135905061012f8161010b565b92915050565b5f6020828403121561014a576101496100d7565b5b5f61015784828501610121565b91505092915050565b5f819050919050565b61017281610160565b82525050565b5f60208201905061018b5f830184610169565b9291505056fea2646970667358221220789dfebd4c3a04f05026d791f1886d0fcc133dc2db211604594a800b5bd2323064736f6c63430008190033c080a0b841ef8c3dba30d3143a88061c469cf21f06cb3d9ac3e35bcdcfa68b6926452fa013c22424693a4e39c4f2997e0cee13cbf59f36c4c589c5604a93c8d9ac866e55" +} diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestSystemCalls/fh2.3/block.1.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestSystemCalls/fh2.3/block.1.golden.json new file mode 100644 index 0000000000..55106f78b2 --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestSystemCalls/fh2.3/block.1.golden.json @@ -0,0 +1,71 @@ +{ + "hash": "N6zSvR8q4sVWyJKo2vdOcc1KsrHinU95Ki/q4tjYQoc=", + "header": { + "baseFeePerGas": { + "bytes": "NCdwwA==" + }, + "blobGasUsed": "0", + "coinbase": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "difficulty": { + "bytes": "AA==" + }, + "excessBlobGas": "0", + "gasLimit": "4712388", + "hash": "N6zSvR8q4sVWyJKo2vdOcc1KsrHinU95Ki/q4tjYQoc=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "1", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "MFX8J9a0oI6wcDOg0e51WkspiAhvKKYYnqwbUHUl7rE=", + "receiptRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "requestsHash": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", + "stateRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "timestamp": "1970-01-01T00:00:10Z", + "transactionsRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=", + "withdrawalsRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=" + }, + "number": "1", + "size": "611", + "systemCalls": [ + { + "address": "AA899tcygH7xMZ+3uLuFItC+rAI=", + "beginOrdinal": "1", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "2", + "gasLimit": "30000000", + "index": 1, + "input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + }, + { + "address": "AAD5CCfxxToQy3oCM1sXUyAAKTU=", + "beginOrdinal": "3", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "4", + "gasLimit": "30000000", + "index": 1, + "input": "MFX8J9a0oI6wcDOg0e51WkspiAhvKKYYnqwbUHUl7rE=" + }, + { + "address": "AAAJYe9IDrVegNGa2DV5pkwAcAI=", + "beginOrdinal": "5", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "6", + "gasLimit": "30000000", + "index": 1 + }, + { + "address": "AAC73cfOSIZC+1efiwDzpZAAclE=", + "beginOrdinal": "7", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "8", + "gasLimit": "30000000", + "index": 1 + } + ], + "ver": 3 +} \ No newline at end of file diff --git a/eth/tracers/internal/tracetest/firehose/testdata/TestSystemCalls/fh3.0/block.1.golden.json b/eth/tracers/internal/tracetest/firehose/testdata/TestSystemCalls/fh3.0/block.1.golden.json new file mode 100644 index 0000000000..1e736ccb0a --- /dev/null +++ b/eth/tracers/internal/tracetest/firehose/testdata/TestSystemCalls/fh3.0/block.1.golden.json @@ -0,0 +1,119 @@ +{ + "hash": "N6zSvR8q4sVWyJKo2vdOcc1KsrHinU95Ki/q4tjYQoc=", + "header": { + "baseFeePerGas": { + "bytes": "NCdwwA==" + }, + "blobGasUsed": "0", + "coinbase": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "difficulty": { + "bytes": "AA==" + }, + "excessBlobGas": "0", + "gasLimit": "4712388", + "hash": "N6zSvR8q4sVWyJKo2vdOcc1KsrHinU95Ki/q4tjYQoc=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "number": "1", + "parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "parentHash": "MFX8J9a0oI6wcDOg0e51WkspiAhvKKYYnqwbUHUl7rE=", + "receiptRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "requestsHash": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", + "stateRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "timestamp": "1970-01-01T00:00:10Z", + "transactionsRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=", + "withdrawalsRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=" + }, + "number": "1", + "size": "611", + "systemCalls": [ + { + "address": "AA899tcygH7xMZ+3uLuFItC+rAI=", + "beginOrdinal": "1", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "4", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "2", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "3", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1, + "input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + }, + { + "address": "AAD5CCfxxToQy3oCM1sXUyAAKTU=", + "beginOrdinal": "5", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "8", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "6", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "7", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1, + "input": "MFX8J9a0oI6wcDOg0e51WkspiAhvKKYYnqwbUHUl7rE=" + }, + { + "address": "AAAJYe9IDrVegNGa2DV5pkwAcAI=", + "beginOrdinal": "9", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "12", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "10", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "11", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1 + }, + { + "address": "AAC73cfOSIZC+1efiwDzpZAAclE=", + "beginOrdinal": "13", + "callType": "CALL", + "caller": "//////////////////////////4=", + "endOrdinal": "16", + "gasChanges": [ + { + "newValue": "30000000", + "ordinal": "14", + "reason": "REASON_CALL_INITIAL_BALANCE" + }, + { + "oldValue": "30000000", + "ordinal": "15", + "reason": "REASON_CALL_LEFT_OVER_RETURNED" + } + ], + "gasLimit": "30000000", + "index": 1 + } + ], + "ver": 4 +} \ No newline at end of file diff --git a/eth/tracers/testdata/firehose/reorder-ordinals-empty.golden.json b/eth/tracers/testdata/firehose/reorder-ordinals-empty.golden.json new file mode 100755 index 0000000000..0844899288 --- /dev/null +++ b/eth/tracers/testdata/firehose/reorder-ordinals-empty.golden.json @@ -0,0 +1,119 @@ +{ + "hash": "sr0uqeYWyrLV1vijvIG6fe+0mu8LRG6FLMHv5UmUxK8=", + "number": "1", + "size": "501", + "header": { + "parentHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=", + "coinbase": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "stateRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "transactionsRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "receiptRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=", + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "difficulty": { + "bytes": "AA==" + }, + "number": "1", + "timestamp": "1970-01-01T00:00:00Z", + "mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "hash": "sr0uqeYWyrLV1vijvIG6fe+0mu8LRG6FLMHv5UmUxK8=" + }, + "transactionTraces": [ + { + "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAI=", + "gasPrice": { + "bytes": "AQ==" + }, + "gasLimit": "1", + "value": { + "bytes": "AQ==" + }, + "v": "AQ==", + "r": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "s": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKo=", + "from": "AAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "beginOrdinal": "1", + "endOrdinal": "4", + "status": "SUCCEEDED", + "receipt": { + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "calls": [ + { + "index": 1, + "callType": "CALL", + "caller": "AAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "address": "AAAAAAAAAAAAAAAAAAAAAAAAAAI=", + "beginOrdinal": "2", + "endOrdinal": "3" + } + ] + }, + { + "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAI=", + "gasPrice": { + "bytes": "AQ==" + }, + "gasLimit": "1", + "value": { + "bytes": "AQ==" + }, + "v": "AQ==", + "r": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "s": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "index": 1, + "hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALs=", + "from": "AAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "beginOrdinal": "5", + "endOrdinal": "8", + "status": "SUCCEEDED", + "receipt": { + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "calls": [ + { + "index": 1, + "callType": "CALL", + "caller": "AAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "address": "AAAAAAAAAAAAAAAAAAAAAAAAAAI=", + "beginOrdinal": "6", + "endOrdinal": "7" + } + ] + }, + { + "to": "AAAAAAAAAAAAAAAAAAAAAAAAAAI=", + "gasPrice": { + "bytes": "AQ==" + }, + "gasLimit": "1", + "value": { + "bytes": "AQ==" + }, + "v": "AQ==", + "r": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "s": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "index": 2, + "hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMw=", + "from": "AAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "beginOrdinal": "9", + "endOrdinal": "12", + "status": "SUCCEEDED", + "receipt": { + "logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" + }, + "calls": [ + { + "index": 1, + "callType": "CALL", + "caller": "AAAAAAAAAAAAAAAAAAAAAAAAAAE=", + "address": "AAAAAAAAAAAAAAAAAAAAAAAAAAI=", + "beginOrdinal": "10", + "endOrdinal": "11" + } + ] + } + ], + "ver": 4 +} \ No newline at end of file diff --git a/go.mod b/go.mod index 66ec7b776a..fe66a84ff6 100644 --- a/go.mod +++ b/go.mod @@ -251,6 +251,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.18.2 // indirect github.com/streadway/amqp v1.1.0 // indirect + github.com/streamingfast/firehose-ethereum/types v0.0.0-20250228213600-8981db4edefa // indirect github.com/stumble/gorocksdb v0.0.3 // indirect github.com/tendermint/btcd v0.1.1 // indirect github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect diff --git a/go.sum b/go.sum index ebb109449b..7c96384cba 100644 --- a/go.sum +++ b/go.sum @@ -2681,6 +2681,8 @@ github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1Sd github.com/streadway/amqp v1.1.0 h1:py12iX8XSyI7aN/3dUT8DFIDJazNJsVJdxNVEpnQTZM= github.com/streadway/amqp v1.1.0/go.mod h1:WYSrTEYHOXHd0nwFeUXAe2G2hRnQT+deZJJf88uS9Bg= github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/streamingfast/firehose-ethereum/types v0.0.0-20250228213600-8981db4edefa h1:QhMsEDwwfYCxfNdqmzHlT+4JlY7HXEvVubj0oyYyWOA= +github.com/streamingfast/firehose-ethereum/types v0.0.0-20250228213600-8981db4edefa/go.mod h1:CG22ObinxSbKIP19bAj0uro0a290kzZTiBbjL8VR0SE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= diff --git a/internal/cli/server/config.go b/internal/cli/server/config.go index 1f6e451dbf..9a714d225b 100644 --- a/internal/cli/server/config.go +++ b/internal/cli/server/config.go @@ -60,6 +60,12 @@ type Config struct { // Record information useful for VM and contract debugging EnablePreimageRecording bool `hcl:"vmdebug,optional" toml:"vmdebug,optional"` + // Name of tracer which should record internal VM operations (costly) + VMTrace string `hcl:"vmtrace,optional" toml:"vmtrace,optional"` + + // Tracer configuration (JSON) + VMTraceJSONConfig string `hcl:"vmtrace.jsonconfig,optional" toml:"vmtrace,optional"` + // DataDir is the directory to store the state in DataDir string `hcl:"datadir,optional" toml:"datadir,optional"` @@ -609,6 +615,8 @@ func DefaultConfig() *Config { Verbosity: 3, LogLevel: "", EnablePreimageRecording: false, + VMTrace: "", + VMTraceJSONConfig: "", DataDir: DefaultDataDir(), Ancient: "", DBEngine: "pebble", @@ -953,6 +961,8 @@ func (c *Config) buildEth(stack *node.Node, accountManager *accounts.Manager) (* } n.EnablePreimageRecording = c.EnablePreimageRecording + n.VMTrace = c.VMTrace + n.VMTraceJsonConfig = c.VMTraceJSONConfig // txpool options {