Comments (1)
Parent Beacon Root is not part of the state tests, because this is a block behavior, it happens at the start of the block, and the purpose of the state test is to evaluate a single tx state transition.
In tests where they are written with a beacon root contract interaction in mind, the env
still does not have any reference to the beacon root, and the beacon root storage in the pre
is already filled with the information:
{
"tests/cancun/eip4788_beacon_root/test_beacon_root_contract.py::test_calldata_lengths[fork_Cancun-state_test-timestamp_12-valid_call_False-valid_input_False-1024_bytes]": {
"_info": {
"comment": "`execution-spec-tests` generated test",
"filling-transition-tool": "evm version 1.13.9-unstable-0b471c31",
"reference-spec": "https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4788.md",
"reference-spec-version": "e7608fe8ac8a60934ca874f5aab7d5c1f4ff7782"
},
"env": {
"currentCoinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentGasLimit": "0x016345785d8a0000",
"currentNumber": "0x01",
"currentTimestamp": "0x0c",
"currentRandom": "0x0000000000000000000000000000000000000000000000000000000000000000",
"currentDifficulty": "0x00",
"currentBaseFee": "0x07",
"currentExcessBlobGas": "0x00"
},
"pre": {
"0x000f3df6d732807ef1319fb7b8bb8522d0beac02": {
"nonce": "0x01",
"balance": "0x00",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500",
"storage": {
"0x0c": "0x0c", <= This part
"0x200b": "0x6c31fc15422ebad28aaf9089c306702f67540b53c7eea8b7d2941044b027100f" <= And this part
}
},
If you really want to, you can parse this storage, it will always have the correct info:
0x0c
is equal to currentTimestamp
, and the parent beacon root, 0x6c31fc15422ebad28aaf9089c306702f67540b53c7eea8b7d2941044b027100f
in this case, is at 0x0c + 0x1fff
, where 0x1fff
is the HISTORY_BUFFER_LENGTH
constant in the EIP.
from execution-spec-tests.
Related Issues (20)
- do we need "blocknumber" : "1", in rlp_decoded section of invalid block? HOT 2
- rlp_decoded vs provided rlp inconsistency HOT 6
- invalid blocks must have valid rlp structure HOT 3
- invalid block json description HOT 2
- feat(fw): add pretty printing of vm traces HOT 5
- Op.DELEGATECALL accept incorrect number of arguments HOT 2
- feat(fw): add versioning to the `_info` section of fixtures
- beacon contract in pre state is not a requirement
- pyspec makes tests with pre state accounts having zero value storage keys HOT 1
- feauture request: make Op.OOG pseudo Opcode HOT 1
- chore(fw): clean up and extend `test_fixtures` framework tests
- chore(fw): extra opcode metadata - block opcode usage based on fork
- fix(docs): nested lists and content tabs are incorrectly formatted
- Split tests .py files from execution specs
- `markdownlint-cli2` v0.9.0 incorrectly reports `MD051/link-fragments` HOT 1
- filling state test as blockchain makes invalid gas limit
- generate tests with Paris keyword instead of Merge HOT 6
- mcopy tests: `env` fixture that sets `gas_limit` is unused
- still able to generate tests with empty storage records
- README: The command to verify a fixture points to incorrect path
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from execution-spec-tests.