diff --git a/.cargo/config b/.cargo/config.toml similarity index 100% rename from .cargo/config rename to .cargo/config.toml diff --git a/flake.lock b/flake.lock index cef230226d..36f685a393 100644 --- a/flake.lock +++ b/flake.lock @@ -158,24 +158,6 @@ "inputs": { "systems": "systems_4" }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_6": { - "inputs": { - "systems": "systems_5" - }, "locked": { "lastModified": 1681202837, "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", @@ -367,11 +349,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1706487304, - "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", + "lastModified": 1718428119, + "narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", + "rev": "e6cea36f83499eb4e9cd184c8a8e823296b50ad5", "type": "github" }, "original": { @@ -472,15 +454,14 @@ }, "rust-overlay_2": { "inputs": { - "flake-utils": "flake-utils_5", "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1714616033, - "narHash": "sha256-JcWAjIDl3h0bE/pII0emeHwokTeBl+SWrzwrjoRu7a0=", + "lastModified": 1722219664, + "narHash": "sha256-xMOJ+HW4yj6e69PvieohUJ3dBSdgCfvI0nnCEe6/yVc=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "3e416d5067ba31ff8ac31eeb763e4388bdf45089", + "rev": "a6fbda5d9a14fb5f7c69b8489d24afeb349c7bb4", "type": "github" }, "original": { @@ -491,7 +472,7 @@ }, "solc-bin": { "inputs": { - "flake-utils": "flake-utils_6", + "flake-utils": "flake-utils_5", "nixpkgs": "nixpkgs_7" }, "locked": { @@ -568,21 +549,6 @@ "type": "github" } }, - "systems_5": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": "nixpkgs_4" diff --git a/hotshot-state-prover/src/circuit.rs b/hotshot-state-prover/src/circuit.rs index f46aa5e75b..c903473f97 100644 --- a/hotshot-state-prover/src/circuit.rs +++ b/hotshot-state-prover/src/circuit.rs @@ -123,6 +123,7 @@ impl AsRef<[Variable]> for LightClientStateVar { /// - a list of schnorr signatures of the updated states (`Vec`), default if the node doesn't sign the state /// - updated light client state (`(view_number, block_height, block_comm_root, fee_ledger_comm, stake_table_comm)`) /// - a quorum threshold +/// /// Lengths of input vectors should not exceed the `stake_table_capacity`. /// The list of stake table entries, bit indicators and signatures will be padded to the `stake_table_capacity`. /// It checks that @@ -130,6 +131,7 @@ impl AsRef<[Variable]> for LightClientStateVar { /// - the signers' accumulated weight exceeds the quorum threshold /// - the stake table corresponds to the one committed in the light client state /// - all Schnorr signatures over the light client state are valid +/// /// and returns /// - A circuit for proof generation /// - A list of public inputs for verification diff --git a/hotshot-state-prover/src/snark.rs b/hotshot-state-prover/src/snark.rs index ae85424396..08ab7a80be 100644 --- a/hotshot-state-prover/src/snark.rs +++ b/hotshot-state-prover/src/snark.rs @@ -43,12 +43,15 @@ pub fn preprocess( /// - updated light client state (`(view_number, block_height, block_comm_root, fee_ledger_comm, stake_table_comm)`) /// - a bit vector indicates the signers /// - a quorum threshold +/// /// Returns error or a pair `(proof, public_inputs)` asserting that /// - the signer's accumulated weight exceeds the quorum threshold /// - the stake table corresponds to the one committed in the light client state /// - all schnorr signatures over the light client state are valid +/// /// # Errors /// Errors if unable to generate proof +/// /// # Panics /// if the stake table is not up to date #[allow(clippy::too_many_arguments)] diff --git a/sequencer/Cargo.toml b/sequencer/Cargo.toml index fd2fd9505d..ff8a93793d 100644 --- a/sequencer/Cargo.toml +++ b/sequencer/Cargo.toml @@ -131,3 +131,6 @@ zeroize = { workspace = true } [package.metadata.cargo-udeps.ignore] normal = ["hotshot-testing"] + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(async_executor_impl, values("tokio", "async-std"))'] }