From 543b8f3a5c6f76ad8566e894dbd0066a19b55665 Mon Sep 17 00:00:00 2001 From: evalir Date: Fri, 22 Nov 2024 08:00:26 -0400 Subject: [PATCH 1/3] chore(repo): general cleanup We don't have the builder here anymore, so we need to remove all these references to it. I'm also taking the chance and updating several things like the rust version used and adding a few make commands. Closes ENG-617 --- .github/CODEOWNERS | 2 ++ Cargo.toml | 6 ++--- Makefile | 7 ++++-- README.md | 55 +++------------------------------------------- 4 files changed, 13 insertions(+), 57 deletions(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..2c1f29c --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +*: @Evalir @prestwich @dylanlott +abi/: @anna-carroll \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index d402b7c..5e0d94b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,10 +4,10 @@ description = "Types for the zenith smart contracts" version = "0.10.1" edition = "2021" -rust-version = "1.81" +rust-version = "1.82" authors = ["Zenith Contributors"] -homepage = "https://github.com/init4tt/zenith" -repository = "https://github.com/init4tt/zenith" +homepage = "https://github.com/init4tech/zenith" +repository = "https://github.com/init4tech/zenith" license = "AGPL-3.0" [dependencies] diff --git a/Makefile b/Makefile index 89b8d01..a987cf4 100644 --- a/Makefile +++ b/Makefile @@ -16,8 +16,11 @@ test: .PHONY: fmt fmt: - @cargo fmt --all + @cargo +nightly fmt --all .PHONY: clippy clippy: - @cargo clippy --all-targets --all-features --workspace -- -D warnings \ No newline at end of file + @cargo clippy --all-targets --all-features -D warnings + +tidy: + @cargo clippy --all-targets --all-features -D warnings && @crago +nightly fmt --all \ No newline at end of file diff --git a/README.md b/README.md index b6bc705..cd3a71c 100644 --- a/README.md +++ b/README.md @@ -1,60 +1,11 @@ # zenith-rs -Rust utilites for working with [Zenith](https://github.com/init4tech/zenith). +Rust types & utilites for working with [Zenith](https://github.com/init4tech/zenith). ![rust](https://github.com/init4tech/zenith-rs/actions/workflows/rust-ci.yml/badge.svg) ![ecr](https://github.com/init4tech/zenith-rs/actions/workflows/ecr-cd.yml/badge.svg) -## Crates - -- `zenith-types`: Common types used by other crates. -- `zenith-builder-example`: a block building example that uses the `builder` library. - ## Development -This crate contains an example block builder in the Signet ecosystem. - -### Requirements - -- Rust 1.79.0 -- Cargo [Lambda](https://www.cargo-lambda.info/) -- AWS CLI and credentials - -### Environment - -The following environment variables are exposed to configure the Builder: - -```bash -# Builder Configs -HOST_CHAIN_ID="17000" # Holesky Testnet -RU_CHAIN_ID="17001" -HOST_RPC_URL="http://host.url.here" -ZENITH_ADDRESS="ZENITH_ADDRESS_HERE" -QUINCEY_URL="http://signer.url.here" -BUILDER_PORT="8080" -BUILDER_KEY="YOUR_BUILDER_KEY_HERE" -INCOMING_TRANSACTIONS_BUFFER="10" -BLOCK_CONFIRMATION_BUFFER="10" -BUILDER_REWARDS_ADDRESS="BUILDER_REWARDS_ADDRESS_HERE" -ROLLUP_BLOCK_GAS_LIMIT="30000000" -# Transaction Pool Configs -TX_POOL_URL="http://pool.url.here/" # trailing slash is required -TX_POOL_POLL_INTERVAL="5" # seconds -TX_POOL_CACHE_DURATION="600" # seconds -``` - -## API - -### SignRequest - -Sign request example payload: +This project requires Rust 1.82.0 or newer. -```json -{ - "hostBlockNumber": "0x0", - "hostChainId": "0x1", - "ruChainId": "0x2", - "gasLimit": "0x5", - "ruRewardAddress": "0x0606060606060606060606060606060606060606", - "contents": "0x0707070707070707070707070707070707070707070707070707070707070707" -} -``` +To build the project, run `make build`. To run tests, run `make test`. Before committing code, make sure to run `make tidy`, which will run clippy and format the whole project. \ No newline at end of file From d0522293355edb8a838f293c639f3f66d06d04d7 Mon Sep 17 00:00:00 2001 From: evalir Date: Fri, 22 Nov 2024 08:10:16 -0400 Subject: [PATCH 2/3] chore: fix typo --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a987cf4..eb140e0 100644 --- a/Makefile +++ b/Makefile @@ -23,4 +23,4 @@ clippy: @cargo clippy --all-targets --all-features -D warnings tidy: - @cargo clippy --all-targets --all-features -D warnings && @crago +nightly fmt --all \ No newline at end of file + @cargo clippy --all-targets --all-features -D warnings && cargo +nightly fmt --all \ No newline at end of file From 5d822130611edcc7d82dcbf0755dd6878f72c936 Mon Sep 17 00:00:00 2001 From: evalir Date: Fri, 22 Nov 2024 08:11:10 -0400 Subject: [PATCH 3/3] chore: add the swan --- .github/CODEOWNERS | 3 ++- README.md | 2 +- clippy.toml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2c1f29c..8fa0719 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,3 @@ *: @Evalir @prestwich @dylanlott -abi/: @anna-carroll \ No newline at end of file +abi/: @anna-carroll +.github/: @rswanson \ No newline at end of file diff --git a/README.md b/README.md index cd3a71c..7903558 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # zenith-rs -Rust types & utilites for working with [Zenith](https://github.com/init4tech/zenith). +Rust types & utilities for working with [Zenith](https://github.com/init4tech/zenith). ![rust](https://github.com/init4tech/zenith-rs/actions/workflows/rust-ci.yml/badge.svg) ![ecr](https://github.com/init4tech/zenith-rs/actions/workflows/ecr-cd.yml/badge.svg) diff --git a/clippy.toml b/clippy.toml index 7e606c3..834ac15 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1,2 +1,2 @@ -msrv = "1.76" +msrv = "1.82" too-large-for-stack = 128