-
Notifications
You must be signed in to change notification settings - Fork 210
Open
Labels
A-examplesArea: examplesArea: examplesA-protocolArea: protocol cratesArea: protocol cratesK-debtKind: debtKind: debtK-docsKind: documentationKind: documentation
Description
kona/docs/docs/pages/sdk/examples/new-l1-block-info-tx-hardfork.mdx
Lines 64 to 103 in 4733473
| ## Protocol Changes | |
| Introduce a new `glacier.rs` module containing a `L1BlockInfoGlacier` type | |
| in [`kona_genesis::info` module][info-mod]. | |
| This should include a few methods used in the `L1BlockInfoTx` later. | |
| ```rust | |
| pub fn encode_calldata(&self) -> Bytes { ... } | |
| pub fn decode_calldata(r: &[u8]) -> Result<Self, DecodeError> { ... } | |
| ``` | |
| Use other hardfork variants like the [`L1BlockInfoEcotone`][ecotone] | |
| for reference. | |
| Next, add the new "Glacier" variant to the [`L1BlockInfoTx`][info-tx]. | |
| ```rust | |
| pub enum L1BlockInfoTx { | |
| ... | |
| Glacier(L1BlockInfoGlacier) | |
| } | |
| ``` | |
| Update [`L1BlockInfoTx::try_new`][try-new] to construct the `L1BlockInfoGlacier` | |
| if the hardfork is active using the `RollupConfig::is_glacier_active`. | |
| Also, be sure to update [`L1BlockInfoTx::decode_calldata`][decode-calldata] | |
| with the new variant decoding, as well as other [`L1BlockInfoTx`][info-tx] | |
| methods. | |
| Once some tests are added surrounding the decoding and encoding of the new | |
| `L1BlockInfoGlacier` variant, all required changes are complete! | |
| Now, [this example PR diff][pr-diff] introducing the Isthmus changes should | |
| make sense, since it effectively implements the above changes for the Isthmus | |
| hardfork (replacing "Glacier" with "Isthmus"). Notice, Isthmus introduces | |
| some new "operator fee" fields as part of it's `L1BlockInfoIsthmus` type. | |
| Some new error variants to the [`BlockInfoError`][bie] are needed as well. |
https://github.com/op-rs/kona/actions/runs/17097895931/job/48486594111?pr=2689#step:3:809
Metadata
Metadata
Assignees
Labels
A-examplesArea: examplesArea: examplesA-protocolArea: protocol cratesArea: protocol cratesK-debtKind: debtKind: debtK-docsKind: documentationKind: documentation
Type
Projects
Status
Backlog