mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core, cmd/evm, params: update beaconroot address, address review concerns
This commit is contained in:
parent
3b794e9340
commit
dbc1aacc6a
5 changed files with 11 additions and 11 deletions
2
cmd/evm/testdata/29/alloc.json
vendored
2
cmd/evm/testdata/29/alloc.json
vendored
|
|
@ -6,7 +6,7 @@
|
|||
"storage" : {
|
||||
}
|
||||
},
|
||||
"0xBeAC00541d49391ED88ABF392bfC1F4dEa8c4143" : {
|
||||
"0xbEac00dDB15f3B6d645C48263dC93862413A222D" : {
|
||||
"balance" : "0x1",
|
||||
"code" : "0x3373fffffffffffffffffffffffffffffffffffffffe14604457602036146024575f5ffd5b620180005f350680545f35146037575f5ffd5b6201800001545f5260205ff35b6201800042064281555f359062018000015500",
|
||||
"nonce" : "0x00",
|
||||
|
|
|
|||
4
cmd/evm/testdata/29/exp.json
vendored
4
cmd/evm/testdata/29/exp.json
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"alloc": {
|
||||
"0xbeac00541d49391ed88abf392bfc1f4dea8c4143": {
|
||||
"0xbeac00ddb15f3b6d645c48263dc93862413a222d": {
|
||||
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe14604457602036146024575f5ffd5b620180005f350680545f35146037575f5ffd5b6201800001545f5260205ff35b6201800042064281555f359062018000015500",
|
||||
"storage": {
|
||||
"0x000000000000000000000000000000000000000000000000000000000000079e": "0x000000000000000000000000000000000000000000000000000000000000079e",
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
}
|
||||
},
|
||||
"result": {
|
||||
"stateRoot": "0xecde4500714cc55d9e3f13e154f6db0b21b2aad708380c39d64d5295b32af8a7",
|
||||
"stateRoot": "0x2db9f6bc233e8fd0af2d8023404493a19b37d9d69ace71f4e73158851fced574",
|
||||
"txRoot": "0x248074fabe112f7d93917f292b64932394f835bb98da91f21501574d58ec92ab",
|
||||
"receiptsRoot": "0xf78dfb743fbd92ade140711c8bbc542b5e307f0ab7984eff35d751969fe57efa",
|
||||
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
|
||||
|
|
|
|||
2
cmd/evm/testdata/29/readme.md
vendored
2
cmd/evm/testdata/29/readme.md
vendored
|
|
@ -1,7 +1,7 @@
|
|||
## EIP 4788
|
||||
|
||||
This test contains testcases for EIP-4788. The 4788-contract is
|
||||
located at address ``, and this test executes a simple transaction. It also
|
||||
located at address `0xbeac00ddb15f3b6d645c48263dc93862413a222d`, and this test executes a simple transaction. It also
|
||||
implicitly invokes the system tx, which sets calls the contract and sets the
|
||||
storage values
|
||||
```
|
||||
|
|
|
|||
|
|
@ -171,15 +171,15 @@ func ProcessBeaconBlockRoot(beaconRoot common.Hash, vmenv *vm.EVM, statedb *stat
|
|||
// the new root
|
||||
msg := &Message{
|
||||
From: params.SystemAddress,
|
||||
GasLimit: 100_000,
|
||||
GasPrice: new(big.Int).SetUint64(0), // TODO use nil?
|
||||
GasFeeCap: new(big.Int).SetUint64(0), // TODO use basefee?
|
||||
GasTipCap: new(big.Int).SetUint64(0), // TODO use zero?
|
||||
GasLimit: 30_000_000,
|
||||
GasPrice: common.Big0,
|
||||
GasFeeCap: common.Big0,
|
||||
GasTipCap: common.Big0,
|
||||
To: ¶ms.BeaconRootsStorageAddress,
|
||||
Data: beaconRoot[:], // TODO use 4byte invocation?
|
||||
Data: beaconRoot[:],
|
||||
}
|
||||
vmenv.Reset(NewEVMTxContext(msg), statedb)
|
||||
statedb.AddAddressToAccessList(params.BeaconRootsStorageAddress)
|
||||
_, _, _ = vmenv.Call(vm.AccountRef(msg.From), *msg.To, msg.Data, 100_000, common.Big0)
|
||||
_, _, _ = vmenv.Call(vm.AccountRef(msg.From), *msg.To, msg.Data, 30_000_000, common.Big0)
|
||||
statedb.Finalise(true)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ var (
|
|||
DurationLimit = big.NewInt(13) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not.
|
||||
|
||||
// BeaconRootsStorageAddress is the address where historical beacon roots are stored as per EIP-4788
|
||||
BeaconRootsStorageAddress = common.HexToAddress("0xBeAC00541d49391ED88ABF392bfC1F4dEa8c4143")
|
||||
BeaconRootsStorageAddress = common.HexToAddress("0xbEac00dDB15f3B6d645C48263dC93862413A222D")
|
||||
// SystemAddress is where the system-transaction is sent from as per EIP-4788
|
||||
SystemAddress common.Address = common.HexToAddress("0xfffffffffffffffffffffffffffffffffffffffe")
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue