Simplify Contract, accept direct RPC input - #4
Conversation
| Debug, Clone, BorshDeserialize, BorshSchema, BorshSerialize, tree_hash_derive::TreeHash, | ||
| )] | ||
| #[cfg_attr(not(target_arch = "wasm32"), derive(Serialize, Deserialize))] | ||
| pub struct ExecutionHeader { |
There was a problem hiding this comment.
Why this copied copied instead of using the BlockHeader https://github.com/Near-One/rainbow-bridge/blob/691af191297eb6d67fd637dedfe79f3315b8a8e9/contracts/near/eth-types/src/lib.rs#L150?
We should somehow avoid reimplementing the same block header, we already have 3-4 different implementations
There was a problem hiding this comment.
There's a different set of fields in the Beacon's Execution Header:
| Concept | ExecutionHeader | BlockHeader | Notes |
|---|---|---|---|
| Prev Randao | prev_randao: H256 | ❌ Not present | ExecutionHeader only |
| Block Hash | block_hash: H256 | ❌ Not present | ExecutionHeader only |
| Uncles Hash | ❌ Not present | uncles_hash: H256 | BlockHeader only |
| Difficulty | ❌ Not present | difficulty: U256 | BlockHeader only |
| Mix Hash | ❌ Not present | mix_hash: H256 | BlockHeader only |
| Nonce | ❌ Not present | nonce: H64 | BlockHeader only |
| Parent Beacon Block Root | ❌ Not present | parent_beacon_block_root: Option | BlockHeader only |
| Requests Hash | ❌ Not present | requests_hash: Option | BlockHeader only |
| Hash | ❌ Not present | hash: Option | BlockHeader only |
| Partial Hash | ❌ Not present | partial_hash: Option | BlockHeader only |
| #[cfg_attr(not(target_arch = "wasm32"), serde(with = "serde_utils::quoted_u64"))] | ||
| pub blob_gas_used: u64, | ||
| #[cfg_attr(not(target_arch = "wasm32"), serde(with = "serde_utils::quoted_u64"))] | ||
| pub excess_blob_gas: u64, |
There was a problem hiding this comment.
How will we handle optional fields that may be added after the new network upgrade? or, for example, if we want to run the tests for blocks without excess_blob_gas
There was a problem hiding this comment.
I think that's why the specs have this weird implementation for get_lc_execution_root
No description provided.