snarkOS icon indicating copy to clipboard operation
snarkOS copied to clipboard

feat: test targets

Open joske opened this issue 1 year ago • 3 comments

Motivation

Add feature flag to be able to lower coinbase and proof targets for testing purposes. This feature flag will lower the proof and coinbase targets to 8 and 32 respectively.

The feature flag needed to be cascaded to all dependencies of snarkVM to be sure everything uses same constants.

To use, compile with --features test_targets e.g.

cargo install --locked --features test_targets --path .

Test Plan

tested by using tx-cannon and adding println to verify correct targets.

CI link

Related PRs

Must first merge https://github.com/AleoNet/snarkVM/pull/2529 and the snarkVM revision must be updated in snarkOS in 2 places before merging this.

joske avatar Aug 09 '24 11:08 joske

Does this apply to compiled snarkOS binaries via cargo install --path .? What does that process look like? Additional documentation in the PR description/in the code would be helpful to know the implications.

raychu86 avatar Aug 12 '24 17:08 raychu86

@raychu86 I've updated the description. Let me know if still not clear.

joske avatar Aug 12 '24 18:08 joske

So if cargo install --locked --features test_targets --path . is used, the snarkOS binary will always have the test_targets version of the coinbase targets? We should have some failsafes where the node fails to boot-up in production mode if that is the case.

We need some sort of enforcement that the test_targets is being used only for devnets via --dev

raychu86 avatar Aug 12 '24 21:08 raychu86

Superseded by https://github.com/AleoNet/snarkOS/pull/3424 to resolve merge conflict

vicsn avatar Oct 29 '24 19:10 vicsn

NOTE: this was not actually merged, must be a bug in Github since the branchname is the same as the superseding PR.

vicsn avatar Nov 05 '24 12:11 vicsn