An open API service indexing awesome lists of open source software.

https://github.com/op-rs/kona

Monorepo for OP Stack Types, Components, and Services built in Rust.
https://github.com/op-rs/kona

asterisc cannon ethereum fault-proofs layer2 optimism rust

Last synced: 9 days ago
JSON representation

Monorepo for OP Stack Types, Components, and Services built in Rust.

Awesome Lists containing this project

README

        


Kona


The Monorepo for OP Stack Types, Components, and Services built in Rust.




CI
Codecov
License
Book


What's Kona?
Overview
MSRV
Contributing
Credits
License

## What's Kona?

Originally a suite of portable implementations of the OP Stack rollup state transition,
Kona has been extended to be _the monorepo_ for OP Stack
types, components, and services built in Rust. Kona provides an ecosystem of extensible, low-level
crates that compose into components and services required for the OP Stack.

The [book][book] contains a more in-depth overview of the project, contributor guidelines, tutorials for
getting started with building your own programs, and a reference for the libraries and tools provided by Kona.

### Development Status

> [!WARNING]
>
> `kona` is currently in active development, and is not yet ready for use in production.

## Overview

> [!NOTE]
>
> Ethereum (Alloy) types modified for the OP Stack live in [op-alloy](https://github.com/alloy-rs/op-alloy).

**Binaries**

- [`client`](./bin/client): The bare-metal program that executes the state transition, to be ran on a prover.
- [`host`](./bin/host): The host program that runs natively alongside the prover, serving as the [Preimage Oracle][g-preimage-oracle] server.
- [`node`](./bin/node): [WIP] A [Rollup Node][rollup-node-spec] implementation, backed by [`kona-derive`](./crates/protocol/derive).

**Protocol**

- [`genesis`](./crates/protocol/genesis): Genesis types for OP Stack chains.
- [`protocol`](./crates/protocol/protocol): Core protocol types used across OP Stack rust crates.
- [`derive`](./crates/protocol/derive): `no_std` compatible implementation of the [derivation pipeline][g-derivation-pipeline].
- [`driver`](./crates/protocol/driver): Stateful derivation pipeline driver.
- [`interop`](./crates/protocol/interop): Core functionality and primitives for the [Interop feature](https://specs.optimism.io/interop/overview.html) of the OP Stack.
- [`registry`](./crates/protocol/registry): Rust bindings for the [superchain-registry][superchain-registry].

**Proof**

- [`mpt`](./crates/proof/mpt): Utilities for interacting with the Merkle Patricia Trie in the client program.
- [`executor`](./crates/proof/executor): `no_std` stateless block executor for the [OP Stack][op-stack].
- [`proof`](./crates/proof/proof): High level OP Stack state transition proof SDK.
- [`proof-interop`](./crates/proof/proof-interop): Extension of `kona-proof` with interop support.
- [`preimage`](./crates/proof/preimage): High level interfaces to the [`PreimageOracle`][fpp-specs] ABI.
- [`std-fpvm`](./crates/proof/std-fpvm): Platform specific [Fault Proof VM][g-fault-proof-vm] kernel APIs.
- [`std-fpvm-proc`](./crates/proof/std-fpvm-proc): Proc macro for [Fault Proof Program][fpp-specs] entrypoints.

**Node**

- [`engine`](./crates/node/engine): An extensible implementation of the [OP Stack][op-stack] rollup node engine client
- [`rpc`](./crates/node/rpc): OP Stack RPC types and extensions.
- [`p2p`](./crates/node/p2p): OP Stack P2P Networking including Gossip and Discovery.
- [`service`](./crates/node/service): The OP Stack rollup node service.

**Providers**

- [`providers-alloy`](./crates/providers/providers-alloy): Provider implementations for `kona-derive` backed by [Alloy][alloy].
- [`providers-local`](./crates/providers/providers-local): Local provider implementations for `kona-derive`.

**Utilities**

- [`serde`](./crates/utilities/serde): Serialization helpers.
- [`cli`](./crates/utilities/cli): Standard CLI utilities, used across `kona`'s binaries.

### Proof

Built on top of these libraries, this repository also features a [proof program][fpp-specs]
designed to deterministically execute the rollup state transition in order to verify an
[L2 output root][g-output-root] from the L1 inputs it was [derived from][g-derivation-pipeline].

Kona's libraries were built with alternative backend support and extensibility in mind - the repository features
a fault proof virtual machine backend for use in the governance-approved OP Stack, but it's portable across
provers! Kona is also used by:

- [`op-succinct`][op-succinct]
- [`kailua`][kailua]

To build your own backend for kona, or build a new application on top of its libraries,
see the [SDK section of the book](https://op-rs.github.io/kona/sdk/intro.html).

## MSRV

The current MSRV (minimum supported rust version) is `1.85`.

The MSRV is not increased automatically, and will be updated
only as part of a patch (pre-1.0) or minor (post-1.0) release.

## Crate Releases

`kona` releases are done using the [`cargo-release`](https://crates.io/crates/cargo-release) crate.
A detailed guide is available in [./RELEASES.md](./RELEASES.md).

## Contributing

`kona` is built by open source contributors like you, thank you for improving the project!

A [contributing guide][contributing] is available that sets guidelines for contributing.

Pull requests will not be merged unless CI passes, so please ensure that your contribution
follows the linting rules and passes clippy.

## Credits

`kona` is inspired by the work of several teams, namely [OP Labs][op-labs] and other contributors' work on the
[Optimism monorepo][op-go-monorepo] and [BadBoiLabs][bad-boi-labs]'s work on [Cannon-rs][badboi-cannon-rs].

`kona` is also built on rust types in [alloy][alloy], [op-alloy][op-alloy], and [maili][maili].

## License

Licensed under the [MIT license.](https://github.com/op-rs/kona/blob/main/LICENSE.md)

> [!NOTE]
>
> Contributions intentionally submitted for inclusion in these crates by you
> shall be licensed as above, without any additional terms or conditions.

[alloy]: https://github.com/alloy-rs/alloy
[maili]: https://github.com/op-rs/maili
[op-alloy]: https://github.com/alloy-rs/op-alloy
[contributing]: https://op-rs.github.io/kona/CONTRIBUTING.html
[op-stack]: https://github.com/ethereum-optimism/optimism
[superchain-registry]: https://github.com/ethereum-optimism/superchain-registry
[op-go-monorepo]: https://github.com/ethereum-optimism/optimism/tree/develop
[cannon]: https://github.com/ethereum-optimism/optimism/tree/develop/cannon
[cannon-rs]: https://github.com/op-rs/cannon-rs
[rollup-node-spec]: https://specs.optimism.io/protocol/rollup-node.html
[badboi-cannon-rs]: https://github.com/BadBoiLabs/cannon-rs
[asterisc]: https://github.com/etheruem-optimism/asterisc
[fpp-specs]: https://specs.optimism.io/fault-proof/index.html
[book]: https://op-rs.github.io/kona/
[op-succinct]: https://github.com/succinctlabs/op-succinct
[kailua]: https://github.com/risc0/kailua
[op-labs]: https://github.com/ethereum-optimism
[bad-boi-labs]: https://github.com/BadBoiLabs
[g-output-root]: https://specs.optimism.io/glossary.html#l2-output-root
[g-derivation-pipeline]: https://specs.optimism.io/protocol/derivation.html#l2-chain-derivation-pipeline
[g-fault-proof-vm]: https://specs.optimism.io/experimental/fault-proof/index.html#fault-proof-vm
[g-preimage-oracle]: https://specs.optimism.io/fault-proof/index.html#pre-image-oracle