From 99c8d365ee3b116cb836b77f4db1c01c65f9a3d8 Mon Sep 17 00:00:00 2001 From: refcell Date: Mon, 11 Nov 2024 11:38:43 -0500 Subject: [PATCH 1/2] fixes --- CONTRIBUTING.md | 2 +- Cargo.lock | 160 ++++++++++++++--------------- Cargo.toml | 15 ++- README.md | 14 +-- bin/hera/Cargo.toml | 4 +- bin/hera/src/disc.rs | 2 +- bin/hera/src/gossip.rs | 4 +- bin/hera/src/main.rs | 2 +- cliff.toml | 4 +- crates/derive/Cargo.toml | 2 +- crates/derive/README.md | 10 +- crates/derive/src/lib.rs | 4 +- crates/driver/Cargo.toml | 2 +- crates/driver/README.md | 2 +- crates/driver/src/lib.rs | 2 +- crates/{super => hilo}/Cargo.toml | 14 +-- crates/hilo/README.md | 15 +++ crates/{super => hilo}/src/lib.rs | 8 +- crates/net/Cargo.toml | 2 +- crates/net/README.md | 4 +- crates/net/src/builder.rs | 8 +- crates/net/src/discovery/driver.rs | 2 +- crates/net/src/lib.rs | 2 +- crates/registry/Cargo.toml | 2 +- crates/registry/README.md | 38 +++---- crates/registry/src/lib.rs | 4 +- crates/super/README.md | 3 - crates/superchain/Cargo.toml | 12 +-- crates/superchain/src/lib.rs | 8 +- 29 files changed, 181 insertions(+), 170 deletions(-) rename crates/{super => hilo}/Cargo.toml (61%) create mode 100644 crates/hilo/README.md rename crates/{super => hilo}/src/lib.rs (72%) delete mode 100644 crates/super/README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 74555ae..50aa0e4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,7 @@ Before working with this repository locally, you'll need to install the followin ## Pull Request Process -1. Before anything, [create an issue](https://github.com/anton-rs/superchain/issues/new) to discuss the change you're +1. Before anything, [create an issue](https://github.com/anton-rs/hilo/issues/new) to discuss the change you're wanting to make, if it is significant or changes functionality. Feel free to skip this step for trivial changes. 1. Once your change is implemented, ensure that all checks are passing before creating a PR. The full CI pipeline can be run locally via the `justfile`s in the repository. diff --git a/Cargo.lock b/Cargo.lock index 46f1198..7120d7b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2166,9 +2166,9 @@ version = "0.1.0" dependencies = [ "clap", "eyre", + "hilo", + "hilo-net", "metrics-exporter-prometheus", - "super-net", - "superchain", "tokio", "tracing", "tracing-subscriber", @@ -2253,6 +2253,82 @@ dependencies = [ "tracing", ] +[[package]] +name = "hilo" +version = "0.11.0" +dependencies = [ + "hilo-derive", + "hilo-registry", +] + +[[package]] +name = "hilo-derive" +version = "0.11.0" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-node-bindings", + "alloy-primitives", + "alloy-provider", + "alloy-rlp", + "alloy-rpc-client", + "alloy-rpc-types-beacon", + "alloy-serde", + "alloy-transport", + "alloy-transport-http", + "async-trait", + "derive_more", + "kona-derive", + "lru", + "op-alloy-consensus", + "op-alloy-genesis", + "op-alloy-protocol", + "reqwest", + "serde", + "serde_json", + "tokio", + "tracing", +] + +[[package]] +name = "hilo-driver" +version = "0.11.0" + +[[package]] +name = "hilo-net" +version = "0.11.0" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-rpc-types-engine", + "arbitrary", + "arbtest", + "discv5", + "eyre", + "futures", + "lazy_static", + "libp2p", + "libp2p-identity", + "op-alloy-rpc-types-engine", + "openssl", + "snap", + "tokio", + "tracing", + "unsigned-varint 0.8.0", +] + +[[package]] +name = "hilo-registry" +version = "0.11.0" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "lazy_static", + "op-alloy-genesis", + "serde", + "serde_json", +] + [[package]] name = "hkdf" version = "0.12.4" @@ -5047,88 +5123,12 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "super" -version = "0.11.0" -dependencies = [ - "super-derive", - "super-registry", -] - -[[package]] -name = "super-derive" -version = "0.11.0" -dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-node-bindings", - "alloy-primitives", - "alloy-provider", - "alloy-rlp", - "alloy-rpc-client", - "alloy-rpc-types-beacon", - "alloy-serde", - "alloy-transport", - "alloy-transport-http", - "async-trait", - "derive_more", - "kona-derive", - "lru", - "op-alloy-consensus", - "op-alloy-genesis", - "op-alloy-protocol", - "reqwest", - "serde", - "serde_json", - "tokio", - "tracing", -] - -[[package]] -name = "super-driver" -version = "0.11.0" - -[[package]] -name = "super-net" -version = "0.11.0" -dependencies = [ - "alloy-primitives", - "alloy-rlp", - "alloy-rpc-types-engine", - "arbitrary", - "arbtest", - "discv5", - "eyre", - "futures", - "lazy_static", - "libp2p", - "libp2p-identity", - "op-alloy-rpc-types-engine", - "openssl", - "snap", - "tokio", - "tracing", - "unsigned-varint 0.8.0", -] - -[[package]] -name = "super-registry" -version = "0.11.0" -dependencies = [ - "alloy-eips", - "alloy-primitives", - "lazy_static", - "op-alloy-genesis", - "serde", - "serde_json", -] - [[package]] name = "superchain" version = "0.11.0" dependencies = [ - "super-derive", - "super-registry", + "hilo-derive", + "hilo-registry", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 0dd2c93..24003cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,8 +8,8 @@ edition = "2021" license = "MIT" rust-version = "1.81" authors = ["clabby", "refcell"] -homepage = "https://github.com/anton-rs/superchain" -repository = "https://github.com/anton-rs/superchain" +homepage = "https://github.com/anton-rs/hilo" +repository = "https://github.com/anton-rs/hilo" keywords = ["ethereum", "optimism", "crypto"] categories = ["cryptography", "cryptography::cryptocurrencies"] exclude = ["benches/", "tests/"] @@ -38,12 +38,11 @@ rustdoc-args = ["--cfg", "docsrs"] [workspace.dependencies] # Workspace -super = { version = "0.11.0", path = "crates/super", default-features = false } -super-net = { version = "0.11.0", path = "crates/net", default-features = false } -super-driver = { version = "0.11.0", path = "crates/driver", default-features = false } -super-derive = { version = "0.11.0", path = "crates/derive", default-features = false } -superchain = { version = "0.11.0", path = "crates/superchain", default-features = false } -super-registry = { version = "0.11.0", path = "crates/registry", default-features = false } +hilo = { version = "0.11.0", path = "crates/hilo", default-features = false } +hilo-net = { version = "0.11.0", path = "crates/net", default-features = false } +hilo-driver = { version = "0.11.0", path = "crates/driver", default-features = false } +hilo-derive = { version = "0.11.0", path = "crates/derive", default-features = false } +hilo-registry = { version = "0.11.0", path = "crates/registry", default-features = false } # Kona kona-derive = { version = "0.0.6", default-features = false } diff --git a/README.md b/README.md index 3765407..1aeea99 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- superchain + hilo

@@ -7,10 +7,10 @@

- CI - License - Book - Codecov + CI + License + Book + Codecov

@@ -23,14 +23,14 @@ ## Overview -`super` is a suite of portable, modular `std` OP Stack components. +`hilo` is a suite of portable, modular `std` OP Stack components. [bin/](./bin/) provides a host of binary applications that compose [crates](./crates/). ## Development Status -`super` is currently in active development, and is not yet ready for use in production. +`hilo` is currently in active development, and is not yet ready for use in production. ## Security diff --git a/bin/hera/Cargo.toml b/bin/hera/Cargo.toml index 4fb0ac2..4a0ee5b 100644 --- a/bin/hera/Cargo.toml +++ b/bin/hera/Cargo.toml @@ -13,8 +13,8 @@ rust-version.workspace = true [dependencies] # Local -super-net.workspace = true -superchain = { workspace = true, features = ["registry"] } +hilo-net.workspace = true +hilo = { workspace = true, features = ["registry"] } # Workspace eyre.workspace = true diff --git a/bin/hera/src/disc.rs b/bin/hera/src/disc.rs index 3187ee6..eccf67d 100644 --- a/bin/hera/src/disc.rs +++ b/bin/hera/src/disc.rs @@ -3,8 +3,8 @@ use crate::globals::GlobalArgs; use clap::Args; use eyre::Result; +use hilo_net::discovery::builder::DiscoveryBuilder; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; -use super_net::discovery::builder::DiscoveryBuilder; /// The Hera discovery subcommand. #[derive(Debug, Clone, Args)] diff --git a/bin/hera/src/gossip.rs b/bin/hera/src/gossip.rs index bf5fbbe..0644f4a 100644 --- a/bin/hera/src/gossip.rs +++ b/bin/hera/src/gossip.rs @@ -3,9 +3,9 @@ use crate::globals::GlobalArgs; use clap::Args; use eyre::Result; +use hilo::registry::ROLLUP_CONFIGS; +use hilo_net::driver::NetworkDriver; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; -use super_net::driver::NetworkDriver; -use superchain::registry::ROLLUP_CONFIGS; /// The Hera gossip subcommand. #[derive(Debug, Clone, Args)] diff --git a/bin/hera/src/main.rs b/bin/hera/src/main.rs index 260a0f0..d13a14a 100644 --- a/bin/hera/src/main.rs +++ b/bin/hera/src/main.rs @@ -1,5 +1,5 @@ #![doc = include_str!("../README.md")] -#![doc(issue_tracker_base_url = "https://github.com/anton-rs/super/issues/")] +#![doc(issue_tracker_base_url = "https://github.com/anton-rs/hilo/issues/")] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #![cfg_attr(not(test), warn(unused_crate_dependencies))] diff --git a/cliff.toml b/cliff.toml index 3fd74d1..a375176 100644 --- a/cliff.toml +++ b/cliff.toml @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 # https://tera.netlify.app/docs/#introduction body = """ {% if version %}\ - ## [{{ version | trim_start_matches(pat="v") }}](https://github.com/anton-rs/superchain + ## [{{ version | trim_start_matches(pat="v") }}](https://github.com/anton-rs/hilo /releases/tag/v{{ version | trim_start_matches(pat="v") }}) - {{ timestamp | date(format="%Y-%m-%d") }} {% endif %}\ {% for group, commits in commits | group_by(attribute="group") %} @@ -30,7 +30,7 @@ footer = "" conventional_commits = true filter_unconventional = false commit_preprocessors = [ - { pattern = '#(\d+)', replace = "[#$1](https://github.com/anton-rs/superchain/issues/$1)" }, + { pattern = '#(\d+)', replace = "[#$1](https://github.com/anton-rs/hilo/issues/$1)" }, ] commit_parsers = [ { message = "^[Ff]eat", group = "Features" }, diff --git a/crates/derive/Cargo.toml b/crates/derive/Cargo.toml index 740d0e9..e19da3c 100644 --- a/crates/derive/Cargo.toml +++ b/crates/derive/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "super-derive" +name = "hilo-derive" description = "An alloy-backed derivation pipeline for the OP Stack, built on `kona-derive`" version.workspace = true diff --git a/crates/derive/README.md b/crates/derive/README.md index 477d8f6..0117641 100644 --- a/crates/derive/README.md +++ b/crates/derive/README.md @@ -1,9 +1,9 @@ ## `super-derive` -CI -Kona Derive Alloy -License -Codecov +CI +Kona Derive Alloy +License +Codecov _Notice: Requires an `std` environment._ @@ -16,7 +16,7 @@ backed by [alloy][a] providers is to use the exported `new_online_pipeline` meth ```rust use std::sync::Arc; -use super_derive::prelude::*; +use hilo_derive::prelude::*; use op_alloy_protocol::BlockInfo; use op_alloy_genesis::RollupConfig; diff --git a/crates/derive/src/lib.rs b/crates/derive/src/lib.rs index 0bc41c0..d108b67 100644 --- a/crates/derive/src/lib.rs +++ b/crates/derive/src/lib.rs @@ -1,7 +1,7 @@ #![doc = include_str!("../README.md")] #![doc( - html_logo_url = "https://raw.githubusercontent.com/anton-rs/superchain/main/assets/square.png", - html_favicon_url = "https://raw.githubusercontent.com/anton-rs/superchain/main/assets/favicon.ico" + html_logo_url = "https://raw.githubusercontent.com/anton-rs/hilo/main/assets/square.png", + html_favicon_url = "https://raw.githubusercontent.com/anton-rs/hilo/main/assets/favicon.ico" )] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #![cfg_attr(not(test), warn(unused_crate_dependencies))] diff --git a/crates/driver/Cargo.toml b/crates/driver/Cargo.toml index 6ff81f3..ca8e3cb 100644 --- a/crates/driver/Cargo.toml +++ b/crates/driver/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "super-driver" +name = "hilo-driver" description = "Derivation driver for the OP Stack" version.workspace = true diff --git a/crates/driver/README.md b/crates/driver/README.md index 60e25ee..14a7832 100644 --- a/crates/driver/README.md +++ b/crates/driver/README.md @@ -1,3 +1,3 @@ -# `super-driver` +# `hilo-driver` A driver implementation for Kona's derivation pipeline that extends `kona-driver`. diff --git a/crates/driver/src/lib.rs b/crates/driver/src/lib.rs index bade432..bc3b843 100644 --- a/crates/driver/src/lib.rs +++ b/crates/driver/src/lib.rs @@ -1,5 +1,5 @@ #![doc = include_str!("../README.md")] -#![doc(issue_tracker_base_url = "https://github.com/anton-rs/super/issues/")] +#![doc(issue_tracker_base_url = "https://github.com/anton-rs/hilo/issues/")] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #![cfg_attr(not(test), warn(unused_crate_dependencies))] diff --git a/crates/super/Cargo.toml b/crates/hilo/Cargo.toml similarity index 61% rename from crates/super/Cargo.toml rename to crates/hilo/Cargo.toml index 6dcb33c..0e95687 100644 --- a/crates/super/Cargo.toml +++ b/crates/hilo/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "super" +name = "hilo" description = "Components for the Superchain" version.workspace = true @@ -16,20 +16,20 @@ rust-version.workspace = true workspace = true [dependencies] -super-derive = { workspace = true, optional = true } -super-registry = { workspace = true, optional = true } +hilo-derive = { workspace = true, optional = true } +hilo-registry = { workspace = true, optional = true } [features] default = ["std", "full"] -std = ["super-registry?/std"] +std = ["hilo-registry?/std"] full = [ "derive", "registry", ] -derive = ["dep:super-derive"] -registry = ["dep:super-registry"] +derive = ["dep:hilo-derive"] +registry = ["dep:hilo-registry"] -test-utils = ["super-derive?/test-utils"] +test-utils = ["hilo-derive?/test-utils"] diff --git a/crates/hilo/README.md b/crates/hilo/README.md new file mode 100644 index 0000000..6c24933 --- /dev/null +++ b/crates/hilo/README.md @@ -0,0 +1,15 @@ +## `hilo` + +CI +Kona Derive Alloy +License +Codecov + + +A suite of `std` components for the Superchain. + +To use `hilo`, add the crate as a dependency to a `Cargo.toml`. + +```toml +hilo = "0.11" +``` diff --git a/crates/super/src/lib.rs b/crates/hilo/src/lib.rs similarity index 72% rename from crates/super/src/lib.rs rename to crates/hilo/src/lib.rs index 2980929..a757678 100644 --- a/crates/super/src/lib.rs +++ b/crates/hilo/src/lib.rs @@ -1,15 +1,15 @@ #![doc = include_str!("../README.md")] #![doc( - html_logo_url = "https://raw.githubusercontent.com/anton-rs/superchain/main/assets/alloy.jpg", - html_favicon_url = "https://raw.githubusercontent.com/anton-rs/superchain/main/assets/favicon.ico" + html_logo_url = "https://raw.githubusercontent.com/anton-rs/hilo/main/assets/alloy.jpg", + html_favicon_url = "https://raw.githubusercontent.com/anton-rs/hilo/main/assets/favicon.ico" )] #![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #[cfg(feature = "derive")] #[doc(inline)] -pub use super_derive as derive; +pub use hilo_derive as derive; #[cfg(feature = "registry")] #[doc(inline)] -pub use super_registry as registry; +pub use hilo_registry as registry; diff --git a/crates/net/Cargo.toml b/crates/net/Cargo.toml index 89d9e0d..a586189 100644 --- a/crates/net/Cargo.toml +++ b/crates/net/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "super-net" +name = "hilo-net" description = "Networking library for the OP Stack" version.workspace = true diff --git a/crates/net/README.md b/crates/net/README.md index a870e32..d2d82ba 100644 --- a/crates/net/README.md +++ b/crates/net/README.md @@ -1,4 +1,4 @@ -# `super` +#@ `hilo-net` A consensus network library for the OP Stack. @@ -16,7 +16,7 @@ Contains a gossipsub driver to run discv5 peer discovery and block gossip. ```rust,no_run use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use alloy_primitives::address; -use super_net::driver::NetworkDriver; +use hilo_net::driver::NetworkDriver; // Build the network driver. let signer = address!("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"); diff --git a/crates/net/src/builder.rs b/crates/net/src/builder.rs index 34354d2..f696f56 100644 --- a/crates/net/src/builder.rs +++ b/crates/net/src/builder.rs @@ -126,8 +126,8 @@ impl NetworkDriverBuilder { /// ## Example /// /// ```rust,ignore - /// use super_net::gossip::config; - /// use super_net::NetworkDriverBuilder; + /// use hilo_net::gossip::config; + /// use hilo_net::NetworkDriverBuilder; /// use std::net::{IpAddr, Ipv4Addr, SocketAddr}; /// /// let chain_id = 10; @@ -160,8 +160,8 @@ impl NetworkDriverBuilder { /// ```rust /// use alloy_primitives::{address, Address}; /// use discv5::{ConfigBuilder, ListenConfig}; + /// use hilo_net::builder::NetworkDriverBuilder; /// use std::net::{IpAddr, Ipv4Addr, SocketAddr}; - /// use super_net::builder::NetworkDriverBuilder; /// /// let id = 10; /// let signer = Address::random(); @@ -202,7 +202,7 @@ impl NetworkDriverBuilder { /// /// ```rust,ignore /// use std::net::{IpAddr, Ipv4Addr, SocketAddr}; - /// use super_net::NetworkDriverBuilder; + /// use hilo_net::NetworkDriverBuilder; /// /// let chain_id = 10; /// let signer = Address::random(); diff --git a/crates/net/src/discovery/driver.rs b/crates/net/src/discovery/driver.rs index ef2c783..fbd0733 100644 --- a/crates/net/src/discovery/driver.rs +++ b/crates/net/src/discovery/driver.rs @@ -51,8 +51,8 @@ impl DiscoveryDriver { /// ## Example /// /// ```no_run + /// use hilo_net::discovery::builder::DiscoveryBuilder; /// use std::net::{IpAddr, Ipv4Addr, SocketAddr}; - /// use super_net::discovery::builder::DiscoveryBuilder; /// /// #[tokio::main] /// async fn main() { diff --git a/crates/net/src/lib.rs b/crates/net/src/lib.rs index 72007ea..7e942d3 100644 --- a/crates/net/src/lib.rs +++ b/crates/net/src/lib.rs @@ -1,5 +1,5 @@ #![doc = include_str!("../README.md")] -#![doc(issue_tracker_base_url = "https://github.com/anton-rs/super/issues/")] +#![doc(issue_tracker_base_url = "https://github.com/anton-rs/hilo/issues/")] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #![cfg_attr(not(test), warn(unused_crate_dependencies))] diff --git a/crates/registry/Cargo.toml b/crates/registry/Cargo.toml index 226c436..65955b1 100644 --- a/crates/registry/Cargo.toml +++ b/crates/registry/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "super-registry" +name = "hilo-registry" description = "The Superchain Registry" version.workspace = true diff --git a/crates/registry/README.md b/crates/registry/README.md index b12aae1..603be06 100644 --- a/crates/registry/README.md +++ b/crates/registry/README.md @@ -1,35 +1,35 @@ -## `super-registry` +## `hilo-registry` -CI -Kona Derive Alloy -License -Codecov +CI +Kona Derive Alloy +License +Codecov -[`super-registry`][sc] is a `no_std` crate that exports rust type definitions for chains +[`hilo-registry`][sc] is a `no_std` crate that exports rust type definitions for chains in the [`superchain-registry`][osr]. Since it reads static files to read configurations for -various chains into instantiated objects, the [`super-registry`][sc] crate requires -[`serde`][serde] as a dependency. To use the [`super-registry`][sc] crate, add the crate +various chains into instantiated objects, the [`hilo-registry`][sc] crate requires +[`serde`][serde] as a dependency. To use the [`hilo-registry`][sc] crate, add the crate as a dependency to a `Cargo.toml`. ```toml -super-registry = "0.9" +hilo-registry = "0.9" ``` -[`super-registry`][sc] declares lazy evaluated statics that expose `ChainConfig`s, `RollupConfig`s, +[`hilo-registry`][sc] declares lazy evaluated statics that expose `ChainConfig`s, `RollupConfig`s, and `Chain` objects for all chains with static definitions in the superchain registry. The way this works is the the golang side of the superchain registry contains an "internal code generation" script that has been modified to output configuration files to the [`crates/registry`][s] directory in the -`etc` folder that are read by the [`super-registry`][sc] rust crate. These static config files +`etc` folder that are read by the [`hilo-registry`][sc] rust crate. These static config files contain an up-to-date list of all superchain configurations with their chain configs. -There are three core statics exposed by the [`super-registry`][sc]. +There are three core statics exposed by the [`hilo-registry`][sc]. - `CHAINS`: A list of chain objects containing the superchain metadata for this chain. - `OPCHAINS`: A map from chain id to `ChainConfig`. - `ROLLUP_CONFIGS`: A map from chain id to `RollupConfig`. While the [`op-alloy-genesis`][oag] crate contains a few hardcoded `RollupConfig` objects, the -[`super-registry`][sc] exports the _complete_ list of superchains and their chain's `RollupConfig`s +[`hilo-registry`][sc] exports the _complete_ list of superchains and their chain's `RollupConfig`s and `ChainConfig`s. [`CHAINS`][chains], [`OPCHAINS`][opchains], and [`ROLLUP_CONFIGS`][rollups] are exported at the top-level @@ -43,20 +43,20 @@ Add the following to your `Cargo.toml`. ```toml [dependencies] -super-registry = "0.9" +hilo-registry = "0.9" ``` -To make `super-registry` `no_std`, toggle `default-features` off like so. +To make `hilo-registry` `no_std`, toggle `default-features` off like so. ```toml [dependencies] -super-registry = { version = "0.9", default-features = false } +hilo-registry = { version = "0.9", default-features = false } ``` Below demonstrates getting the `RollupConfig` for OP Mainnet (Chain ID `10`). ```rust -use super_registry::ROLLUP_CONFIGS; +use hilo_registry::ROLLUP_CONFIGS; let op_chain_id = 10; let op_rollup_config = ROLLUP_CONFIGS.get(&op_chain_id); @@ -66,7 +66,7 @@ println!("OP Mainnet Rollup Config: {:?}", op_rollup_config); A mapping from chain id to `ChainConfig` is also available. ```rust -use super_registry::OPCHAINS; +use hilo_registry::OPCHAINS; let op_chain_id = 10; let op_chain_config = OPCHAINS.get(&op_chain_id); @@ -91,7 +91,7 @@ println!("OP Mainnet Chain Config: {:?}", op_chain_config); [serde]: https://crates.io/crates/serde [alloy]: https://github.com/alloy-rs/alloy [op-alloy]: https://github.com/alloy-rs/op-alloy -[super]: https://github.com/anton-rs/super +[hilo]: https://github.com/anton-rs/hilo [op-superchain]: https://docs.optimism.io/stack/explainer [osr]: https://github.com/ethereum-optimism/superchain-registry diff --git a/crates/registry/src/lib.rs b/crates/registry/src/lib.rs index b714fb7..fc6bf6e 100644 --- a/crates/registry/src/lib.rs +++ b/crates/registry/src/lib.rs @@ -1,8 +1,8 @@ #![doc = include_str!("../README.md")] #![doc( - html_logo_url = "https://raw.githubusercontent.com/anton-rs/superchain/main/assets/superchain.png", + html_logo_url = "https://raw.githubusercontent.com/anton-rs/hilo/main/assets/superchain.png", html_favicon_url = "https://avatars.githubusercontent.com/u/139668603?s=256", - issue_tracker_base_url = "https://github.com/anton-rs/superchain/issues/" + issue_tracker_base_url = "https://github.com/anton-rs/hilo/issues/" )] #![warn(missing_debug_implementations, missing_docs, rustdoc::all)] #![deny(unused_must_use, rust_2018_idioms)] diff --git a/crates/super/README.md b/crates/super/README.md deleted file mode 100644 index f8ede0d..0000000 --- a/crates/super/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `super` - -A suite of `std` components for the `superchain`. diff --git a/crates/superchain/Cargo.toml b/crates/superchain/Cargo.toml index e279c06..3c4fe90 100644 --- a/crates/superchain/Cargo.toml +++ b/crates/superchain/Cargo.toml @@ -16,20 +16,20 @@ rust-version.workspace = true workspace = true [dependencies] -super-derive = { workspace = true, optional = true } -super-registry = { workspace = true, optional = true } +hilo-derive = { workspace = true, optional = true } +hilo-registry = { workspace = true, optional = true } [features] default = ["std", "full"] -std = ["super-registry?/std"] +std = ["hilo-registry?/std"] full = [ "derive", "registry", ] -derive = ["dep:super-derive"] -registry = ["dep:super-registry"] +derive = ["dep:hilo-derive"] +registry = ["dep:hilo-registry"] -test-utils = ["super-derive?/test-utils"] +test-utils = ["hilo-derive?/test-utils"] diff --git a/crates/superchain/src/lib.rs b/crates/superchain/src/lib.rs index 2980929..a757678 100644 --- a/crates/superchain/src/lib.rs +++ b/crates/superchain/src/lib.rs @@ -1,15 +1,15 @@ #![doc = include_str!("../README.md")] #![doc( - html_logo_url = "https://raw.githubusercontent.com/anton-rs/superchain/main/assets/alloy.jpg", - html_favicon_url = "https://raw.githubusercontent.com/anton-rs/superchain/main/assets/favicon.ico" + html_logo_url = "https://raw.githubusercontent.com/anton-rs/hilo/main/assets/alloy.jpg", + html_favicon_url = "https://raw.githubusercontent.com/anton-rs/hilo/main/assets/favicon.ico" )] #![cfg_attr(not(test), warn(unused_crate_dependencies))] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #[cfg(feature = "derive")] #[doc(inline)] -pub use super_derive as derive; +pub use hilo_derive as derive; #[cfg(feature = "registry")] #[doc(inline)] -pub use super_registry as registry; +pub use hilo_registry as registry; From 339e16b3e093ff41cf888d461c701b061803dbe8 Mon Sep 17 00:00:00 2001 From: refcell Date: Mon, 11 Nov 2024 11:45:00 -0500 Subject: [PATCH 2/2] no_std check fix --- .github/workflows/no_std.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/no_std.yaml b/.github/workflows/no_std.yaml index 0fc9555..a6e1149 100644 --- a/.github/workflows/no_std.yaml +++ b/.github/workflows/no_std.yaml @@ -14,7 +14,7 @@ jobs: timeout-minutes: 30 strategy: matrix: - package: ["super-registry"] + package: ["hilo-registry"] name: check no_std ${{ matrix.features }} ${{ matrix.package }} steps: - uses: actions/checkout@v4