kona-derive

Crates.iokona-derive
lib.rskona-derive
version
sourcesrc
created_at2024-02-22 20:38:47.339401
updated_at2024-12-04 00:10:01.555141
descriptionA no_std derivation pipeline implementation for the OP Stack
homepagehttps://github.com/anton-rs/kona
repositoryhttps://github.com/anton-rs/kona
max_upload_size
id1149712
Cargo.toml error:TOML parse error at line 21, column 1 | 21 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
refcell (refcell)

documentation

README

kona-derive

CI Kona Derive License Codecov

A no_std compatible implementation of the OP Stack's derivation pipeline.

Usage

The intended way of working with kona-derive is to use the DerivationPipeline which implements the Pipeline trait. To create an instance of the DerivationPipeline, it's recommended to use the PipelineBuilder as follows.

use std::sync::Arc;
use op_alloy_genesis::RollupConfig;
use kona_derive::sources::EthereumDataSource;
use kona_derive::pipeline::PipelineBuilder;
use kona_derive::attributes::StatefulAttributesBuilder;

let chain_provider = todo!();
let l2_chain_provider = todo!();
let blob_provider = todo!();
let l1_origin = todo!();

let cfg = Arc::new(RollupConfig::default());
let attributes = StatefulAttributesBuilder::new(
   cfg.clone(),
   l2_chain_provider.clone(),
   chain_provider.clone(),
);
let dap = EthereumDataSource::new(
   chain_provider.clone(),
   blob_provider,
   cfg.as_ref()
);

// Construct a new derivation pipeline.
let pipeline = PipelineBuilder::new()
   .rollup_config(cfg)
   .dap_source(dap)
   .l2_chain_provider(l2_chain_provider)
   .chain_provider(chain_provider)
   .builder(attributes)
   .origin(l1_origin)
   .build();

Features

The most up-to-date feature list will be available on the docs.rs Feature Flags tab of the kona-derive crate.

Some features include the following.

  • serde: Serialization and Deserialization support for kona-derive types.
  • test-utils: Test utilities for downstream libraries.

By default, kona-derive enables the serde feature.

Commit count: 667

cargo fmt