Conversation
examples/example_host.cpp
Outdated
| (void)topics_count; | ||
| } | ||
|
|
||
| evmc_bytes32 get_chain_id() noexcept final { return 0_bytes32; } |
There was a problem hiding this comment.
I think this should go into the tx_context header.
There was a problem hiding this comment.
My line of thought was: 1. it's probably not going to be used very often, so why copy it with every get_tx_context call; 2. it's not "transaction context" conceptually, but rather more global chain constant.
But I don't insist, can change.
e5aa7a2 to
8ae8d7e
Compare
|
Not sure what happens to |
7051c32 to
1ab538f
Compare
|
@axic I'm bumping the version here, is that ok? |
| int64_t block_timestamp; /**< The block timestamp. */ | ||
| int64_t block_gas_limit; /**< The block gas limit. */ | ||
| evmc_uint256be block_difficulty; /**< The block difficulty. */ | ||
| evmc_uint256be chain_id; /**< The blockchain's ChainID. */ |
There was a problem hiding this comment.
This part is contentious. There is a long discussion on https://ethereum-magicians.org/t/eip-1344-add-chain-id-opcode/1131/56
However many say it should be a hash, e.g. bytes32, however the calculation done the transaction format requires it to be a number.
Geth uses 256-bit, Parity 64-bit and Pantheon 32-bit numbers for chain id.
|
Rebased. |
chfast
left a comment
There was a problem hiding this comment.
Please rebase and squash the first 2 commits.
|
Rebased. |
CHANGELOG.md
Outdated
| and this project adheres to [Semantic Versioning]. | ||
|
|
||
| ## [7.0.0] - unreleased | ||
| - Added: [[#375](https://github.com/ethereum/evmc/pull/375)] |
|
@axic Can you check Rust CI? It is failing from some days. |
https://eips.ethereum.org/EIPS/eip-1344