diff --git a/.github/workflows/rust_ci.yaml b/.github/workflows/rust_ci.yaml index 2bd61b01e3..7906e3ae45 100644 --- a/.github/workflows/rust_ci.yaml +++ b/.github/workflows/rust_ci.yaml @@ -258,3 +258,15 @@ jobs: - name: Lint features run: | zepter + + lychee: + runs-on: ubuntu-latest + env: + # Use GITHUB_TOKEN to avoid rate limiting + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + timeout-minutes: 30 + steps: + - uses: actions/checkout@v5 + - uses: lycheeverse/lychee-action@v2 + with: + args: --config ./lychee.toml --cache-exclude-status 429 '**/README.md' './docs/**/*.md' './docs/**/*.mdx' './docs/**/*.html' './docs/**/*.com' diff --git a/README.md b/README.md index 0c8beea0ab..a9e3ac6a63 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,9 @@ getting started with building your own programs, and a reference for the librari - [`service`](./crates/node/service): The OP Stack rollup node service. - [`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. +- [`gossip`](./crates/node/gossip): OP Stack P2P Networking - Gossip. +- [`disc`](./crates/node/disc): OP Stack P2P Networking - Discovery. +- [`peers`](./crates/node/peers): Networking Utilities ported from reth. - [`sources`](./crates/node/sources): Data source types and utilities for the kona-node. **Providers** diff --git a/crates/protocol/protocol/README.md b/crates/protocol/protocol/README.md index 648724922e..799f7e0829 100644 --- a/crates/protocol/protocol/README.md +++ b/crates/protocol/protocol/README.md @@ -9,10 +9,3 @@ Core protocol types for Optimism. These include types, constants, and methods for derivation as well as batch-submission. - -### Provenance - -This code was initially ported from [kona-primitives] to [op-alloy] as part of maili migrations. - -[kona-primitives]: https://github.com/ethereum-optimism/kona/tree/main/crates/kona-primitives -[op-alloy]: https://github.com/alloy-rs/op-alloy diff --git a/docs/docs/pages/node/design/p2p.mdx b/docs/docs/pages/node/design/p2p.mdx index da8a7c19fe..52d3ed1938 100644 --- a/docs/docs/pages/node/design/p2p.mdx +++ b/docs/docs/pages/node/design/p2p.mdx @@ -169,7 +169,7 @@ TODO [discv5-service]: https://docs.rs/discv5/latest/discv5/struct.Discv5.html -[driver]: https://github.com/op-rs/kona/blob/main/crates/node/p2p/src/discv5/mod.rs +[driver]: https://docs.rs/kona-p2p/latest/kona_p2p/struct.Discv5Driver.html [discv5]: https://github.com/ethereum/devp2p/blob/master/discv5/discv5.md [libp2p]: https://libp2p.io/ diff --git a/docs/docs/pages/sdk/examples/batch-to-frames.mdx b/docs/docs/pages/sdk/examples/batch-to-frames.mdx index 50634582f8..67b614bea0 100644 --- a/docs/docs/pages/sdk/examples/batch-to-frames.mdx +++ b/docs/docs/pages/sdk/examples/batch-to-frames.mdx @@ -181,7 +181,7 @@ fn main() { [channel-id]: https://docs.rs/kona-protocol/latest/kona_protocol/type.ChannelId.html [encode-batch]: https://docs.rs/kona-protocol/latest/kona_protocol/enum.Batch.html#method.encode -[compress-brotli]: https://docs.rs/kona-comp/latest/kona_comp/fn.compress_brotli.html +[compress-brotli]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.BrotliCompressor.html [channel-out]: https://docs.rs/kona-comp/latest/kona_comp/struct.ChannelOut.html [ready-bytes]: https://docs.rs/kona-comp/latest/kona_comp/struct.ChannelOut.html#method.ready_bytes [output-frame]: https://docs.rs/kona-comp/latest/kona_comp/struct.ChannelOut.html#method.output_frame diff --git a/docs/docs/pages/sdk/proof/custom-backend.mdx b/docs/docs/pages/sdk/proof/custom-backend.mdx index 3a2c493a81..bd93731fcf 100644 --- a/docs/docs/pages/sdk/proof/custom-backend.mdx +++ b/docs/docs/pages/sdk/proof/custom-backend.mdx @@ -48,9 +48,9 @@ Before getting started, we need to create custom implementations of the followin | Trait | Description | | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| [`ChainProvider`](https://docs.rs/kona-derive/latest/kona_derive/traits/trait.ChainProvider.html) | The `ChainProvider` trait describes the minimal interface for fetching data from L1 during L2 chain derivation. | -| [`L2ChainProvider`](https://docs.rs/kona-derive/latest/kona_derive/traits/trait.L2ChainProvider.html) | The `ChainProvider` trait describes the minimal interface for fetching data from the safe L2 chain during L2 chain derivation. | -| [`BlobProvider`](https://docs.rs/kona-derive/latest/kona_derive/traits/trait.BlobProvider.html) | The `BlobProvider` trait describes an interface for fetching EIP-4844 blobs from the L1 consensus layer during L2 chain derivation. | +| [`ChainProvider`](https://docs.rs/kona-derive/latest/kona_derive/trait.ChainProvider.html) | The `ChainProvider` trait describes the minimal interface for fetching data from L1 during L2 chain derivation. | +| [`L2ChainProvider`](https://docs.rs/kona-derive/latest/kona_derive/trait.L2ChainProvider.html) | The `ChainProvider` trait describes the minimal interface for fetching data from the safe L2 chain during L2 chain derivation. | +| [`BlobProvider`](https://docs.rs/kona-derive/latest/kona_derive/trait.BlobProvider.html) | The `BlobProvider` trait describes an interface for fetching EIP-4844 blobs from the L1 consensus layer during L2 chain derivation. | Once these are implemented, constructing the pipeline is as simple as passing in the data sources to the `PipelineBuilder`. Keep in mind the requirements for validation of incoming data, depending on your platform. For example, programs targeting zkVMs must constrain that the incoming data is indeed valid, whereas fault proof programs can offload this validation to the on-chain implementation of the host. @@ -93,8 +93,8 @@ Before getting started, we need to create custom implementations of the followin | Trait | Description | | ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [`TrieDBFetcher`](https://docs.rs/kona-mpt/latest/kona_mpt/trait.TrieDBFetcher.html) | The `TrieDBFetcher` trait describes the interface for fetching trie node preimages and chain information while executing a payload on the L2 chain. | -| [`TrieDBHinter`](https://docs.rs/kona-mpt/latest/kona_mpt/trait.TrieDBHinter.html) | The `TrieDBHinter` trait describes the interface for requesting the host program to prepare trie proof preimages for the client's consumption. For targets with upfront witness generation, i.e. zkVMs, a no-op hinter is exported as [`NoopTrieDBHinter`](https://docs.rs/kona-mpt/latest/kona_mpt/struct.NoopTrieDBHinter.html). | +| [`TrieProvider`](https://docs.rs/kona-mpt/latest/kona_mpt/trait.TrieProvider.html) | The `TrieProvider` trait describes the interface for fetching trie node preimages and chain information while executing a payload on the L2 chain. | +| [`TrieDBHinter`](https://docs.rs/kona-mpt/latest/kona_mpt/trait.TrieHinter.html) | The `TrieDBHinter` trait describes the interface for requesting the host program to prepare trie proof preimages for the client's consumption. For targets with upfront witness generation, i.e. zkVMs, a no-op hinter is exported as [`NoopTrieHinter`](https://docs.rs/kona-mpt/latest/kona_mpt/struct.NoopTrieHinter.html). | Once we have those, the `StatelessL2BlockExecutor` can be constructed like so: diff --git a/docs/docs/pages/sdk/proof/fpvm-backend.mdx b/docs/docs/pages/sdk/proof/fpvm-backend.mdx index 993648793b..dab1ecfc4a 100644 --- a/docs/docs/pages/sdk/proof/fpvm-backend.mdx +++ b/docs/docs/pages/sdk/proof/fpvm-backend.mdx @@ -101,7 +101,7 @@ to pull in untyped data from the host by `PreimageKey`. These data source traits the [Custom Backend](/sdk/proof/custom-backend) section, but we'll quickly gloss over them here to build intuition. Let's take, for example, [`OracleL1ChainProvider`](https://github.com/op-rs/kona/blob/40a8d7ec3def4a1eeb26492a1e4338d8b032e428/bin/client/src/l1/chain_provider.rs#L16-L23). -The [`ChainProvider`](https://docs.rs/kona-derive/latest/kona_derive/traits/trait.ChainProvider.html) trait in `kona-derive` +The [`ChainProvider`](https://docs.rs/kona-derive/latest/kona_derive/trait.ChainProvider.html) trait in `kona-derive` defines a simple interface for fetching information about the L1 chain. In the `OracleL1ChainProvider`, this information is pulled in over the [PreimageOracle ABI][preimage-specs]. There are many other examples of these data source traits, namely the `L2ChainProvider`, `BlobProvider`, `TrieProvider`, and `TrieHinter`, which enable the creation of different diff --git a/docs/docs/pages/sdk/protocol/derive/intro.mdx b/docs/docs/pages/sdk/protocol/derive/intro.mdx index 5f1e309e1d..7e19c86adf 100644 --- a/docs/docs/pages/sdk/protocol/derive/intro.mdx +++ b/docs/docs/pages/sdk/protocol/derive/intro.mdx @@ -285,9 +285,9 @@ program on top of the RISCV or MIPS ISAs. So, [@clabby][clabby] and [@refcell][refcell] stood up [kona][kona] in a few months. -[driver]: https://github.com/op-rs/kona/blob/main/bin/client/src/l1/driver.rs#L74 +[driver]: https://docs.rs/kona-driver/latest/kona_driver/struct.Driver.html [next]: https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#tymethod.next -[builder]: https://docs.rs/kona-derive/latest/kona_derive/pipeline/struct.PipelineBuilder.html +[builder]: https://docs.rs/kona-derive/latest/kona_derive/struct.PipelineBuilder.html [alloy]: https://github.com/alloy-rs/alloy [ethers-rs]: https://github.com/gakonst/ethers-rs [kona]: https://github.com/op-rs/kona @@ -297,16 +297,16 @@ So, [@clabby][clabby] and [@refcell][refcell] stood up [kona][kona] in a few mon [magi]: https://github.com/a16z/magi [kd]: https://crates.io/crates/kona-derive [iterator]: https://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html -[p]: https://docs.rs/kona-derive/latest/kona_derive/traits/trait.Pipeline.html +[p]: https://docs.rs/kona-derive/latest/kona_derive/trait.Pipeline.html [op-dp]: https://github.com/ethereum-optimism/optimism/tree/develop/op-node/rollup/derive -[dp]: https://docs.rs/kona-derive/latest/kona_derive/pipeline/struct.DerivationPipeline.html -[attributes]: https://docs.rs/op-alloy-rpc-types-engine/latest/op_alloy_rpc_types_engine/struct.OpAttributesWithParent.html +[dp]: https://docs.rs/kona-derive/latest/kona_derive/struct.DerivationPipeline.html +[attributes]: https://docs.rs/kona-protocol/latest/kona_protocol/struct.OpAttributesWithParent.html -[attributes-queue]: https://docs.rs/kona-derive/latest/kona_derive/stages/struct.AttributesQueue.html -[batch-provider]: https://docs.rs/kona-derive/latest/kona_derive/stages/struct.BatchProvider.html -[batch-stream]: https://docs.rs/kona-derive/latest/kona_derive/stages/struct.BatchStream.html -[channel-reader]: https://docs.rs/kona-derive/latest/kona_derive/stages/struct.ChannelReader.html +[attributes-queue]: https://docs.rs/kona-derive/latest/kona_derive/struct.AttributesQueue.html +[batch-provider]: https://docs.rs/kona-derive/latest/kona_derive/struct.BatchProvider.html +[batch-stream]: https://docs.rs/kona-derive/latest/kona_derive/struct.BatchStream.html +[channel-reader]: https://docs.rs/kona-derive/latest/kona_derive/struct.ChannelReader.html [channel-provider]: https://docs.rs/kona-derive/latest/kona_derive/struct.ChannelProvider.html -[frame-queue]: https://docs.rs/kona-derive/latest/kona_derive/stages/struct.FrameQueue.html -[retrieval]: https://docs.rs/kona-derive/latest/kona_derive/stages/struct.L1Retrieval.html -[traversal]: https://docs.rs/kona-derive/latest/kona_derive/stages/struct.IndexedTraversal.html +[frame-queue]: https://docs.rs/kona-derive/latest/kona_derive/struct.FrameQueue.html +[retrieval]: https://docs.rs/kona-derive/latest/kona_derive/struct.L1Retrieval.html +[traversal]: https://docs.rs/kona-derive/latest/kona_derive/struct.IndexedTraversal.html diff --git a/docs/docs/pages/sdk/protocol/derive/providers.mdx b/docs/docs/pages/sdk/protocol/derive/providers.mdx index 42840ed475..05999248f3 100644 --- a/docs/docs/pages/sdk/protocol/derive/providers.mdx +++ b/docs/docs/pages/sdk/protocol/derive/providers.mdx @@ -91,11 +91,11 @@ impl DataAvailabilityProvider for ExampleAvail { -[dap]: https://docs.rs/kona-derive/latest/kona_derive/traits/trait.DataAvailabilityProvider.html -[next]: https://docs.rs/kona-derive/latest/kona_derive/traits/trait.DataAvailabilityProvider.html#tymethod.next -[builder]: https://docs.rs/kona-derive/latest/kona_derive/pipeline/struct.PipelineBuilder.html +[dap]: https://docs.rs/kona-derive/latest/kona_derive/trait.DataAvailabilityProvider.html +[next]: https://docs.rs/kona-derive/latest/kona_derive/trait.DataAvailabilityProvider.html#tymethod.next +[builder]: https://docs.rs/kona-derive/latest/kona_derive/struct.PipelineBuilder.html [alloy]: https://github.com/alloy-rs/alloy [kda]: https://crates.io/crates/kona-derive-alloy -[chain-provider]: https://docs.rs/kona-derive/latest/kona_derive/traits/trait.ChainProvider.html -[l2-chain-provider]: https://docs.rs/kona-derive/latest/kona_derive/traits/trait.L2ChainProvider.html -[dap]: https://docs.rs/kona-derive/latest/kona_derive/traits/trait.DataAvailabilityProvider.html +[chain-provider]: https://docs.rs/kona-derive/latest/kona_derive/trait.ChainProvider.html +[l2-chain-provider]: https://docs.rs/kona-derive/latest/kona_derive/trait.L2ChainProvider.html +[dap]: https://docs.rs/kona-derive/latest/kona_derive/trait.DataAvailabilityProvider.html diff --git a/docs/docs/pages/sdk/protocol/derive/signaling.mdx b/docs/docs/pages/sdk/protocol/derive/signaling.mdx index 329da7162e..9376d775e9 100644 --- a/docs/docs/pages/sdk/protocol/derive/signaling.mdx +++ b/docs/docs/pages/sdk/protocol/derive/signaling.mdx @@ -146,10 +146,10 @@ impl SignalReceiver for IndexedTraversal { -[traversal]: https://docs.rs/kona-derive/latest/kona_derive/stages/struct.IndexedTraversal.html -[dp]: https://docs.rs/kona-derive/latest/kona_derive/pipeline/struct.DerivationPipeline.html -[stages]: https://docs.rs/kona-derive/latest/kona_derive/stages/index.html -[receiver]: https://docs.rs/kona-derive/latest/kona_derive/traits/trait.SignalReceiver.html -[signal]: https://docs.rs/kona-derive/latest/kona_derive/traits/enum.Signal.html -[error-kind]: https://docs.rs/kona-derive/latest/kona_derive/errors/enum.PipelineErrorKind.html -[step-result]: https://docs.rs/kona-derive/latest/kona_derive/traits/enum.StepResult.html +[traversal]: https://docs.rs/kona-derive/latest/kona_derive/struct.IndexedTraversal.html +[dp]: https://docs.rs/kona-derive/latest/kona_derive/struct.DerivationPipeline.html +[stages]: https://docs.rs/kona-derive/latest/kona_derive/index.html +[receiver]: https://docs.rs/kona-derive/latest/kona_derive/trait.SignalReceiver.html +[signal]: https://docs.rs/kona-derive/latest/kona_derive/enum.Signal.html +[error-kind]: https://docs.rs/kona-derive/latest/kona_derive/enum.PipelineErrorKind.html +[step-result]: https://docs.rs/kona-derive/latest/kona_derive/enum.StepResult.html diff --git a/docs/docs/pages/sdk/protocol/derive/stages.mdx b/docs/docs/pages/sdk/protocol/derive/stages.mdx index 913a770275..6a0ef304ef 100644 --- a/docs/docs/pages/sdk/protocol/derive/stages.mdx +++ b/docs/docs/pages/sdk/protocol/derive/stages.mdx @@ -103,10 +103,10 @@ DapRetrieval> [intro]: ./intro.md -[dp]: https://docs.rs/kona-derive/latest/kona_derive/pipeline/struct.DerivationPipeline.html -[retrieval-provider]: https://docs.rs/kona-derive/latest/kona_derive/stages/trait.L1RetrievalProvider.html -[frame-queue-provider]: https://docs.rs/kona-derive/latest/kona_derive/stages/trait.FrameQueueProvider.html +[dp]: https://docs.rs/kona-derive/latest/kona_derive/struct.DerivationPipeline.html +[retrieval-provider]: https://docs.rs/kona-derive/latest/kona_derive/trait.L1RetrievalProvider.html +[frame-queue-provider]: https://docs.rs/kona-derive/latest/kona_derive/trait.FrameQueueProvider.html -[frame-queue]: https://docs.rs/kona-derive/latest/kona_derive/stages/struct.FrameQueue.html -[retrieval]: https://docs.rs/kona-derive/latest/kona_derive/stages/struct.L1Retrieval.html -[traversal]: https://docs.rs/kona-derive/latest/kona_derive/stages/struct.IndexedTraversal.html +[frame-queue]: https://docs.rs/kona-derive/latest/kona_derive/struct.FrameQueue.html +[retrieval]: https://docs.rs/kona-derive/latest/kona_derive/struct.L1Retrieval.html +[traversal]: https://docs.rs/kona-derive/latest/kona_derive/struct.IndexedTraversal.html diff --git a/lychee.toml b/lychee.toml new file mode 100644 index 0000000000..903446ae72 --- /dev/null +++ b/lychee.toml @@ -0,0 +1,16 @@ +# Config example at: https://lychee.cli.rs/usage/config/ + +verbose = "debug" + +no_progress = false + +exclude_all_private = false + +exclude = [ + 'foo.bar', + 'localhost', + '^https://github\.com/op-rs/kona/pull/' +] + +# exclude_path values are ignored if cli is glob pattern that matches +# this list, at least in lycheeverse/lychee-action@v2 \ No newline at end of file