Skip to content

Extract consensus module into standalone vero-consensus crate - #295

Merged
N-thnI merged 10 commits into
Vero-protocol:mainfrom
Trusty08:fix/extract-consensus-crate
Aug 29, 2026
Merged

Extract consensus module into standalone vero-consensus crate#295
N-thnI merged 10 commits into
Vero-protocol:mainfrom
Trusty08:fix/extract-consensus-crate

Conversation

@Trusty08

@Trusty08 Trusty08 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Closes #224

verification/ previously depended on the full vero-core-contracts crate (including soroban-sdk) just to reach the pure, Env-free consensus module. Extracted consensus into its own zero-dependency crate (vero-consensus) so verification/ can depend on it directly.

  • New consensus/ crate holds the pure consensus logic (no soroban-sdk)

  • Main crate now re-exports from vero-consensus instead of defining it inline

  • verification/Cargo.toml now depends on vero-consensus directly (confirmed via cargo tree: no soroban-sdk in its dependency graph)

  • Fixed inverted cfg_attr that was suppressing the wrong build condition, causing spurious unused-import warnings

  • Full workspace builds cleanly; all existing tests pass (100+ tests, 0 failures)

Note: Kani harnesses were not re-run in this environment (no native Windows support for Kani); requesting a maintainer confirm via 'cargo kani --manifest-path verification/Cargo.toml' before merge.

verification/ previously depended on the full vero-core-contracts crate (including soroban-sdk) just to reach the pure, Env-free consensus module. Extracted consensus into its own zero-dependency crate (vero-consensus) so verification/ can depend on it directly.

- New consensus/ crate holds the pure consensus logic (no soroban-sdk)

- Main crate now re-exports from vero-consensus instead of defining it inline

- verification/Cargo.toml now depends on vero-consensus directly (confirmed via cargo tree: no soroban-sdk in its dependency graph)

- Fixed inverted cfg_attr that was suppressing the wrong build condition, causing spurious unused-import warnings

- Full workspace builds cleanly; all existing tests pass (100+ tests, 0 failures)

Note: Kani harnesses were not re-run in this environment (no native Windows support for Kani); requesting a maintainer confirm via 'cargo kani --manifest-path verification/Cargo.toml' before merge.
@Trusty08
Trusty08 requested review from N-i-xx and N-thnI as code owners August 22, 2026 01:00
@Trusty08

Trusty08 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Closes #224

@N-thnI

N-thnI commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Could you add a Closes #<issue-number> line to the PR description? GrantFox uses that link to tie the merge back to your assignment, so without it the payout doesn't get associated with your work.

Everything else looks fine — just need the link before this can merge.

(For this one it'd be Closes #224.)

@Trusty08

Trusty08 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

Closes #224

@N-thnI

N-thnI commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

The failure is cargo-deny, not your logic:

error[wildcard]: found 1 wildcard dependency for crate 'vero-core-contracts'

Extracting vero-consensus added a path dependency without a version, and deny.toml rejects wildcards. Give it an explicit version alongside the path:

vero-consensus = { path = "consensus", version = "0.1.0" }

Everything else is green — Build & Test, Test Coverage, and cargo-audit all pass.

@N-thnI

N-thnI commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

This needs a Closes #224 line in the description before it can merge — GrantFox links the payout to that reference, and #224 is the issue you're assigned to that this implements.

@N-thnI

N-thnI commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

please ensure all checks pass

Trusty08 and others added 5 commits August 25, 2026 02:37
- src/migrate.rs: remove unused testutils::Address import; add
  #[allow(dead_code)] on synthetic_failing_v1_to_v2 template helper
- src/storage.rs: add doc comment to ARCHIVE_AFTER_SECONDS constant
- src/contracts/storage_layout.rs: add module-level #![allow(missing_docs)]
  to suppress macro-generated items from contracttype that cannot carry
  doc comments; remove now-redundant per-enum allow attribute
- tests/upgrade.rs: remove unused ContractError import; add
  #[allow(dead_code)] on event_symbols helper; fix unused_must_use
  on result.unwrap() in test_propose_same_hash_adds_approval
tests/upgrade.rs used ContractError at lines 639 and 660 but the import was
dropped during the clippy cleanup, breaking Build & Test with E0433.

cargo-deny's wildcard lint rejects a path dependency carrying no version, so
vero-consensus is pinned to 0.1.0 to match consensus/Cargo.toml.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@N-thnI
N-thnI merged commit 206d1cc into Vero-protocol:main Aug 29, 2026
4 checks passed
@N-thnI

N-thnI commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Merged — thanks for the contribution! If you've got a moment, a rating on GrantFox helps the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

verification/ pulls in the entire contract crate just to reach the pure consensus module

2 participants