mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
Fixed ordinals and account creations differences on system calls
This commit is contained in:
parent
69a64b2b78
commit
e2a3cfbf4c
9 changed files with 642 additions and 675 deletions
|
|
@ -314,6 +314,7 @@ func (f *Firehose) OnBlockchainInit(chainConfig *params.ChainConfig) {
|
|||
log.Info("Firehose tracer initialized", "chain_id", chainConfig.ChainID, "apply_backward_compatibility", *f.applyBackwardCompatibility, "protocol_version", FirehoseProtocolVersion)
|
||||
}
|
||||
|
||||
var gethDevChainID = big.NewInt(1337)
|
||||
var mainnetChainID = big.NewInt(1)
|
||||
var goerliChainID = big.NewInt(5)
|
||||
var sepoliaChainID = big.NewInt(11155111)
|
||||
|
|
@ -1095,10 +1096,10 @@ func (f *Firehose) callStart(source string, callType pbeth.CallType, from common
|
|||
|
||||
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. remove on new chain.
|
||||
// be assigned back to 0 because of a bug in the console reader.
|
||||
//
|
||||
// New chain integration should remove this `if` statement
|
||||
if source == "root" {
|
||||
// However, system calls are not affected by this bug and must keep their ordinal.
|
||||
if source == "root" && !f.inSystemCall {
|
||||
call.BeginOrdinal = 0
|
||||
}
|
||||
}
|
||||
|
|
@ -1140,7 +1141,7 @@ func (f *Firehose) getExecutedCode(evm *tracing.VMContext, call *pbeth.Call) boo
|
|||
}
|
||||
|
||||
if precompile {
|
||||
firehoseTrace("executed code isprecompile (callType=%s inputLength=%d)", call.CallType.String(), len(call.Input))
|
||||
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
|
||||
}
|
||||
|
||||
|
|
@ -1470,6 +1471,22 @@ func (f *Firehose) OnNewAccount(a common.Address) {
|
|||
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(),
|
||||
|
|
@ -1621,6 +1638,18 @@ func (f *Firehose) ensureInSystemCall() {
|
|||
}
|
||||
}
|
||||
|
||||
func (f *Firehose) isChainOneOf(chainIDs ...*big.Int) bool {
|
||||
f.ensureBlockChainInit()
|
||||
|
||||
for _, chainID := range chainIDs {
|
||||
if f.chainConfig.ChainID.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 {
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ func Test_TypesHeader_AllConsensusFieldsAreKnown(t *testing.T) {
|
|||
// 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 mistmatch, got %q but expecting %q on *types.Header:\n\nGeth Header (from fillNonDefault(new(*types.Header)))\n%s",
|
||||
"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),
|
||||
|
|
@ -176,7 +176,7 @@ func Test_FirehoseAndGethHeaderFieldMatches(t *testing.T) {
|
|||
t,
|
||||
pbFieldCount,
|
||||
gethFieldCount,
|
||||
fieldsCountMistmatchMessage(t, pbFieldNames, gethFieldNames))
|
||||
fieldsCountMismatchMessage(t, pbFieldNames, gethFieldNames))
|
||||
|
||||
for pbFieldName := range pbFieldNames {
|
||||
pbFieldRenamedName, found := pbFieldNameToGethMapping[pbFieldName]
|
||||
|
|
@ -228,7 +228,7 @@ func fillAllFieldsWithNonEmptyValues(t *testing.T, structValue reflect.Value, fi
|
|||
}
|
||||
}
|
||||
|
||||
func fieldsCountMistmatchMessage(t *testing.T, pbFieldNames map[string]bool, gethFieldNames map[string]bool) string {
|
||||
func fieldsCountMismatchMessage(t *testing.T, pbFieldNames map[string]bool, gethFieldNames map[string]bool) string {
|
||||
t.Helper()
|
||||
|
||||
pbRemappedFieldNames := make(map[string]bool, len(pbFieldNames))
|
||||
|
|
|
|||
|
|
@ -1,26 +1,19 @@
|
|||
package firehose_test
|
||||
|
||||
import (
|
||||
"hash"
|
||||
"math/big"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"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/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/log"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
"github.com/ethereum/go-ethereum/rlp"
|
||||
"github.com/ethereum/go-ethereum/tests"
|
||||
"github.com/ethereum/go-ethereum/trie"
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/crypto/sha3"
|
||||
)
|
||||
|
||||
func runPrestateBlock(t *testing.T, prestatePath string, hooks *tracing.Hooks) {
|
||||
|
|
@ -89,59 +82,6 @@ func runPrestateBlock(t *testing.T, prestatePath string, hooks *tracing.Hooks) {
|
|||
}
|
||||
}
|
||||
|
||||
func newBlockchain(t *testing.T, alloc types.GenesisAlloc, context vm.BlockContext, tracer *tracing.Hooks) (*core.Genesis, *core.BlockChain) {
|
||||
t.Helper()
|
||||
|
||||
genesis := &core.Genesis{
|
||||
Difficulty: new(big.Int).Sub(context.Difficulty, big.NewInt(1)),
|
||||
Timestamp: context.Time - 1,
|
||||
Number: new(big.Int).Sub(context.BlockNumber, big.NewInt(1)).Uint64(),
|
||||
BaseFee: big.NewInt(params.InitialBaseFee),
|
||||
Coinbase: context.Coinbase,
|
||||
Config: params.AllEthashProtocolChanges,
|
||||
Alloc: alloc,
|
||||
}
|
||||
|
||||
log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.LevelInfo, false)))
|
||||
defer log.SetDefault(log.NewLogger(log.DiscardHandler()))
|
||||
|
||||
blockchain, err := core.NewBlockChain(rawdb.NewMemoryDatabase(), core.DefaultCacheConfigWithScheme(rawdb.HashScheme), genesis, nil, ethash.NewFullFaker(), vm.Config{
|
||||
Tracer: tracer,
|
||||
}, nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
return genesis, blockchain
|
||||
}
|
||||
|
||||
// testHasher is the helper tool for transaction/receipt list hashing.
|
||||
// The original hasher is trie, in order to get rid of import cycle,
|
||||
// use the testing hasher instead.
|
||||
type testHasher struct {
|
||||
hasher hash.Hash
|
||||
}
|
||||
|
||||
// NewHasher returns a new testHasher instance.
|
||||
func NewHasher() *testHasher {
|
||||
return &testHasher{hasher: sha3.NewLegacyKeccak256()}
|
||||
}
|
||||
|
||||
// Reset resets the hash state.
|
||||
func (h *testHasher) Reset() {
|
||||
h.hasher.Reset()
|
||||
}
|
||||
|
||||
// Update updates the hash state with the given key and value.
|
||||
func (h *testHasher) Update(key, val []byte) error {
|
||||
h.hasher.Write(key)
|
||||
h.hasher.Write(val)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Hash returns the hash value.
|
||||
func (h *testHasher) Hash() common.Hash {
|
||||
return common.BytesToHash(h.hasher.Sum(nil))
|
||||
}
|
||||
|
||||
var _ core.Validator = (*ignoreValidateStateValidator)(nil)
|
||||
|
||||
type ignoreValidateStateValidator struct {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import (
|
|||
"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"
|
||||
|
|
@ -16,56 +17,10 @@ import (
|
|||
"github.com/ethereum/go-ethereum/core/vm/program"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
"github.com/ethereum/go-ethereum/trie"
|
||||
"github.com/holiman/uint256"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestFirehoseChain(t *testing.T) {
|
||||
context := vm.BlockContext{
|
||||
CanTransfer: core.CanTransfer,
|
||||
Transfer: core.Transfer,
|
||||
Coinbase: common.Address{},
|
||||
BlockNumber: new(big.Int).SetUint64(uint64(1)),
|
||||
Time: 1,
|
||||
Difficulty: big.NewInt(2),
|
||||
GasLimit: uint64(1000000),
|
||||
BaseFee: big.NewInt(8),
|
||||
}
|
||||
|
||||
tracer, tracingHooks, onClose := newFirehoseTestTracer(t)
|
||||
defer onClose()
|
||||
|
||||
genesis, blockchain := newBlockchain(t, types.GenesisAlloc{}, context, tracingHooks)
|
||||
|
||||
block := types.NewBlock(&types.Header{
|
||||
ParentHash: 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{}),
|
||||
}, nil, nil, trie.NewStackTrie(nil))
|
||||
|
||||
blockchain.SetBlockValidatorAndProcessorForTesting(
|
||||
ignoreValidateStateValidator{core.NewBlockValidator(genesis.Config, blockchain)},
|
||||
core.NewStateProcessor(genesis.Config, blockchain.HeaderChain()),
|
||||
)
|
||||
|
||||
n, err := blockchain.InsertChain(types.Blocks{block})
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, 1, n)
|
||||
|
||||
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.assertEquals(t, filepath.Join("testdata", t.Name()),
|
||||
firehoseBlockLineParams{"1", "8e6ee4b1054d94df1d8a51fb983447dc2e27a854590c3ac0061f994284be8150", "0", "845bad515694a416bab4b8d44e22cf97a8c894a8502110ab807883940e185ce0", "0", "1000000000"},
|
||||
)
|
||||
}
|
||||
|
||||
func TestFirehosePrestate(t *testing.T) {
|
||||
testFolders := []string{
|
||||
"./testdata/TestFirehosePrestate/keccak256_too_few_memory_bytes_get_padded",
|
||||
|
|
@ -91,7 +46,6 @@ func TestFirehosePrestate(t *testing.T) {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
func TestFirehose_EIP7702(t *testing.T) {
|
||||
// Copied from ./core/blockchain_test.go#L4180 (TestEIP7702)
|
||||
|
||||
|
|
@ -203,15 +157,37 @@ func TestFirehose_EIP7702(t *testing.T) {
|
|||
}
|
||||
})
|
||||
|
||||
assertBlockTracesCorrectly(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) {})
|
||||
|
||||
assertBlockTracesCorrectly(t, gspec, engine, blocks, "TestSystemCalls")
|
||||
}
|
||||
|
||||
func assertBlockTracesCorrectly(t *testing.T, genesisSpec *core.Genesis, engine consensus.Engine, blocks []*types.Block, goldenDir string) {
|
||||
t.Helper()
|
||||
|
||||
tracer, tracingHooks, onClose := newFirehoseTestTracer(t)
|
||||
defer onClose()
|
||||
|
||||
chain, err := core.NewBlockChain(rawdb.NewMemoryDatabase(), nil, gspec, nil, engine, vm.Config{Tracer: tracingHooks}, nil)
|
||||
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", "TestEIP7702"), len(blocks))
|
||||
assertBlockEquals(t, tracer, filepath.Join("testdata", goldenDir), len(blocks))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -265,6 +265,7 @@
|
|||
"address": "AA899tcygH7xMZ+3uLuFItC+rAI=",
|
||||
"gasLimit": "30000000",
|
||||
"input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
|
||||
"beginOrdinal": "1",
|
||||
"endOrdinal": "2"
|
||||
},
|
||||
{
|
||||
|
|
@ -274,6 +275,7 @@
|
|||
"address": "AAD5CCfxxToQy3oCM1sXUyAAKTU=",
|
||||
"gasLimit": "30000000",
|
||||
"input": "pWIUj7qpHz/G8tLNdaLNz8Jr1TmoyDxTXP9TdFcxi1w=",
|
||||
"beginOrdinal": "3",
|
||||
"endOrdinal": "4"
|
||||
},
|
||||
{
|
||||
|
|
@ -282,6 +284,7 @@
|
|||
"caller": "//////////////////////////4=",
|
||||
"address": "AAAJYe9IDrVegNGa2DV5pkwAcAI=",
|
||||
"gasLimit": "30000000",
|
||||
"beginOrdinal": "28",
|
||||
"endOrdinal": "29"
|
||||
},
|
||||
{
|
||||
|
|
@ -290,6 +293,7 @@
|
|||
"caller": "//////////////////////////4=",
|
||||
"address": "AAC73cfOSIZC+1efiwDzpZAAclE=",
|
||||
"gasLimit": "30000000",
|
||||
"beginOrdinal": "30",
|
||||
"endOrdinal": "31"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@
|
|||
"address": "AA899tcygH7xMZ+3uLuFItC+rAI=",
|
||||
"gasLimit": "30000000",
|
||||
"input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
|
||||
"beginOrdinal": "1",
|
||||
"endOrdinal": "2"
|
||||
},
|
||||
{
|
||||
|
|
@ -195,6 +196,7 @@
|
|||
"address": "AAD5CCfxxToQy3oCM1sXUyAAKTU=",
|
||||
"gasLimit": "30000000",
|
||||
"input": "tNKSM8SZPvaEgBA4yUj9YayXYYuXnLCuHx5oWJwVOhw=",
|
||||
"beginOrdinal": "3",
|
||||
"endOrdinal": "4"
|
||||
},
|
||||
{
|
||||
|
|
@ -203,6 +205,7 @@
|
|||
"caller": "//////////////////////////4=",
|
||||
"address": "AAAJYe9IDrVegNGa2DV5pkwAcAI=",
|
||||
"gasLimit": "30000000",
|
||||
"beginOrdinal": "22",
|
||||
"endOrdinal": "23"
|
||||
},
|
||||
{
|
||||
|
|
@ -211,6 +214,7 @@
|
|||
"caller": "//////////////////////////4=",
|
||||
"address": "AAC73cfOSIZC+1efiwDzpZAAclE=",
|
||||
"gasLimit": "30000000",
|
||||
"beginOrdinal": "24",
|
||||
"endOrdinal": "25"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@
|
|||
"address": "AA899tcygH7xMZ+3uLuFItC+rAI=",
|
||||
"gasLimit": "30000000",
|
||||
"input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
|
||||
"beginOrdinal": "1",
|
||||
"endOrdinal": "2"
|
||||
},
|
||||
{
|
||||
|
|
@ -159,6 +160,7 @@
|
|||
"address": "AAD5CCfxxToQy3oCM1sXUyAAKTU=",
|
||||
"gasLimit": "30000000",
|
||||
"input": "Hlau1KLprrOkaDe4TNZdPEoXeJ4UGEL1PwUY/qq+/rk=",
|
||||
"beginOrdinal": "3",
|
||||
"endOrdinal": "4"
|
||||
},
|
||||
{
|
||||
|
|
@ -167,6 +169,7 @@
|
|||
"caller": "//////////////////////////4=",
|
||||
"address": "AAAJYe9IDrVegNGa2DV5pkwAcAI=",
|
||||
"gasLimit": "30000000",
|
||||
"beginOrdinal": "16",
|
||||
"endOrdinal": "17"
|
||||
},
|
||||
{
|
||||
|
|
@ -175,6 +178,7 @@
|
|||
"caller": "//////////////////////////4=",
|
||||
"address": "AAC73cfOSIZC+1efiwDzpZAAclE=",
|
||||
"gasLimit": "30000000",
|
||||
"beginOrdinal": "18",
|
||||
"endOrdinal": "19"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,61 +0,0 @@
|
|||
{
|
||||
"hash": "jm7ksQVNlN8dilH7mDRH3C4nqFRZDDrABh+ZQoS+gVA=",
|
||||
"number": "1",
|
||||
"size": "541",
|
||||
"header": {
|
||||
"parentHash": "hFutUVaUpBa6tLjUTiLPl6jIlKhQIRCrgHiDlA4YXOA=",
|
||||
"uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=",
|
||||
"coinbase": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
|
||||
"stateRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
|
||||
"transactionsRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=",
|
||||
"receiptRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=",
|
||||
"logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
|
||||
"difficulty": {
|
||||
"bytes": "Ag=="
|
||||
},
|
||||
"number": "1",
|
||||
"gasLimit": "1000000",
|
||||
"timestamp": "1970-01-01T00:00:01Z",
|
||||
"mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
|
||||
"hash": "jm7ksQVNlN8dilH7mDRH3C4nqFRZDDrABh+ZQoS+gVA=",
|
||||
"baseFeePerGas": {
|
||||
"bytes": "CA=="
|
||||
},
|
||||
"parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
|
||||
},
|
||||
"balanceChanges": [
|
||||
{
|
||||
"address": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
|
||||
"newValue": {
|
||||
"bytes": "G8FtZ07IAAA="
|
||||
},
|
||||
"reason": "REASON_REWARD_MINE_BLOCK",
|
||||
"ordinal": "5"
|
||||
}
|
||||
],
|
||||
"systemCalls": [
|
||||
{
|
||||
"index": 1,
|
||||
"callType": "CALL",
|
||||
"caller": "//////////////////////////4=",
|
||||
"address": "AA899tcygH7xMZ+3uLuFItC+rAI=",
|
||||
"gasLimit": "30000000",
|
||||
"input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
|
||||
"gasChanges": [
|
||||
{
|
||||
"newValue": "30000000",
|
||||
"reason": "REASON_CALL_INITIAL_BALANCE",
|
||||
"ordinal": "2"
|
||||
},
|
||||
{
|
||||
"oldValue": "30000000",
|
||||
"reason": "REASON_CALL_LEFT_OVER_RETURNED",
|
||||
"ordinal": "3"
|
||||
}
|
||||
],
|
||||
"beginOrdinal": "1",
|
||||
"endOrdinal": "4"
|
||||
}
|
||||
],
|
||||
"ver": 4
|
||||
}
|
||||
71
eth/tracers/internal/tracetest/firehose/testdata/TestSystemCalls/block.1.golden.json
vendored
Normal file
71
eth/tracers/internal/tracetest/firehose/testdata/TestSystemCalls/block.1.golden.json
vendored
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
"hash": "N6zSvR8q4sVWyJKo2vdOcc1KsrHinU95Ki/q4tjYQoc=",
|
||||
"number": "1",
|
||||
"size": "611",
|
||||
"header": {
|
||||
"parentHash": "MFX8J9a0oI6wcDOg0e51WkspiAhvKKYYnqwbUHUl7rE=",
|
||||
"uncleHash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=",
|
||||
"coinbase": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=",
|
||||
"stateRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=",
|
||||
"transactionsRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=",
|
||||
"receiptRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=",
|
||||
"logsBloom": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
|
||||
"difficulty": {
|
||||
"bytes": "AA=="
|
||||
},
|
||||
"number": "1",
|
||||
"gasLimit": "4712388",
|
||||
"timestamp": "1970-01-01T00:00:10Z",
|
||||
"mixHash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
|
||||
"hash": "N6zSvR8q4sVWyJKo2vdOcc1KsrHinU95Ki/q4tjYQoc=",
|
||||
"baseFeePerGas": {
|
||||
"bytes": "NCdwwA=="
|
||||
},
|
||||
"withdrawalsRoot": "VugfFxvMVab/g0XmksD4bltI4BuZbK3AAWIvteNjtCE=",
|
||||
"blobGasUsed": "0",
|
||||
"excessBlobGas": "0",
|
||||
"parentBeaconRoot": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
|
||||
"requestsHash": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="
|
||||
},
|
||||
"systemCalls": [
|
||||
{
|
||||
"index": 1,
|
||||
"callType": "CALL",
|
||||
"caller": "//////////////////////////4=",
|
||||
"address": "AA899tcygH7xMZ+3uLuFItC+rAI=",
|
||||
"gasLimit": "30000000",
|
||||
"input": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
|
||||
"beginOrdinal": "1",
|
||||
"endOrdinal": "2"
|
||||
},
|
||||
{
|
||||
"index": 1,
|
||||
"callType": "CALL",
|
||||
"caller": "//////////////////////////4=",
|
||||
"address": "AAD5CCfxxToQy3oCM1sXUyAAKTU=",
|
||||
"gasLimit": "30000000",
|
||||
"input": "MFX8J9a0oI6wcDOg0e51WkspiAhvKKYYnqwbUHUl7rE=",
|
||||
"beginOrdinal": "3",
|
||||
"endOrdinal": "4"
|
||||
},
|
||||
{
|
||||
"index": 1,
|
||||
"callType": "CALL",
|
||||
"caller": "//////////////////////////4=",
|
||||
"address": "AAAJYe9IDrVegNGa2DV5pkwAcAI=",
|
||||
"gasLimit": "30000000",
|
||||
"beginOrdinal": "5",
|
||||
"endOrdinal": "6"
|
||||
},
|
||||
{
|
||||
"index": 1,
|
||||
"callType": "CALL",
|
||||
"caller": "//////////////////////////4=",
|
||||
"address": "AAC73cfOSIZC+1efiwDzpZAAclE=",
|
||||
"gasLimit": "30000000",
|
||||
"beginOrdinal": "7",
|
||||
"endOrdinal": "8"
|
||||
}
|
||||
],
|
||||
"ver": 3
|
||||
}
|
||||
Loading…
Reference in a new issue