Repository navigation
feat(drive): add shielded pool storage, actions, and verification (Medusa part 2) #3198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 13 commits
855d593
2c74098
c93ae0e
73c058a
d1c1a61
357e9b0
5218ddf
743faeb
95f8e04
77615a6
2543341
0432425
7221772
7ca50a6
ea9e63c
f2b5338
0b82b6b
295f777
f483b62
3fb7801
a8de751
4d13397
0f5acd5
acf830a
b78d53e
04c537e
83ea01f
160749d
3220e43
82eddb8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1445,6 +1445,12 @@ pub(crate) fn verify_state_transitions_were_or_were_not_executed( | |
| } | ||
| } | ||
| StateTransitionAction::BumpAddressInputNoncesAction(_) => {} | ||
| StateTransitionAction::ShieldAction(_) => {} | ||
| StateTransitionAction::ShieldedTransferAction(_) => {} | ||
| StateTransitionAction::UnshieldAction(_) => {} | ||
| StateTransitionAction::ShieldFromAssetLockAction(_) => {} | ||
| StateTransitionAction::ShieldedWithdrawalAction(_) => {} | ||
| StateTransitionAction::PenalizeShieldedPoolAction(_) => {} | ||
|
Comment on lines
+1452
to
+1457
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't silently skip proof assertions for shielded transitions. These no-op arms let every new shielded action pass this helper without checking execution outcome, proof contents, or even the returned root hash. That means a broken shielded proof path can still go green here. Please verify these variants explicitly, or make the test fail until shielded verification is implemented. 🤖 Prompt for AI Agents
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is just temporary
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
✏️ Learnings added
🧠 Learnings used |
||
| } | ||
| } else { | ||
| // if we don't have an action this means there was a problem in the validation of the state transition | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
In Rust semver, is adding a variant to a public enum without#[non_exhaustive]considered a breaking change for downstream crates?💡 Result:
Yes. In Rust, adding a new variant to a public enum that is not marked
#[non_exhaustive]is considered a SemVer-breaking change for downstream crates, because downstream code can (and often does) exhaustivelymatchon the enum, and a new variant makes those matches fail to compile. [1], [2]If the enum is
#[non_exhaustive], downstream crates are required to include a wildcard arm (or otherwise handle unknown variants), so adding variants is intended to be non-breaking. [1]Sources:
[1] Rust Cargo Book — SemVer Compatibility
[2] Effective Rust — SemVer discussion of adding enum variants
🏁 Script executed:
cat -n packages/rs-dpp/src/errors/protocol_error.rs | head -160Repository: dashpay/platform
Length of output: 6248
🏁 Script executed:
rg "AddressWitnessError|ShieldedBuildError" --type rust -B 2 -A 2Repository: dashpay/platform
Length of output: 22729
This is a breaking expansion of the public
ProtocolErrorsurface.ProtocolErroris public and not#[non_exhaustive], so addingAddressWitnessErrorandShieldedBuildErrorbreaks downstream exhaustivematches. These variants are returned from public builder and witness-verification functions, so callers that key offGenericspecifically will miss them unless this release is treated as breaking.🤖 Prompt for AI Agents