fix(dao): audit punch list — H-1 to H-4 + M-2 + pallas bump
Lands the high-priority fixes from the 2026-05-06 audit before any mainnet submit of the new vote/cosign/advance/destroy txs. ## H-1: Locked→Finished gate (MCP tool) `dao_proposal_advance_unsigned` now refuses LockedToFinished unless `tx_lower_ms > executing_end`. During the executing period the validator demands gstMoved=true (governor input present); builder doesn't include the governor input, so a tx in that window would fee-burn. The proper Locked→Finished + GAT-mint flow is Phase 4c-bis; this gate keeps us out of the broken middle. ## H-2 + H-4: strict-boundary + tx-upper-inside-period (MCP tool) Validator's pgetRelation is strict on PAfter (`period_end < lb`) and demands `ub <= period_end` on PWithin. Tool now picks PWithin only when `tx_lower_ms >= period_start && tx_upper_ms <= period_end`, PAfter only when `tx_lower_ms > period_end` strictly, and explicit- errors on the boundary-straddling case (when tx validity range crosses out of the target period). Same logic mirrored for the VotingReady→Locked + VotingReady→Finished branches. ## H-3: vote builder lower-bound preflight (MCP tool) `dao_proposal_vote_unsigned` previously checked only validity_upper vs voting_end_ms. Validator demands BOTH `voting_start <= lb` AND `ub <= voting_end`. Vote-too-early would hit "too early or invalid" script error. New preflight on tx_lower_ms vs voting_start. ## M-2: DRep deposit pulled from ProtocolParams Hardcoded constant (500 ADA) was wrong if the protocol changes drep_deposit OR if the DRep was originally registered at a different deposit amount (deregistration must match registration). Added `drep_deposit_lovelace: u64` to ProtocolParams (default 500 ADA), governance.rs build_signed_drep_registration / deregistration now read from params instead of the constant. Constant kept for backward compat with a doc note pointing at the params field. ## Pallas fork bump 507fd9da → 8091abd1 M-4 from the audit landed on the fork: voting_procedures builder debug_assert_ne!s against empty CBOR map (0xa0) and docs the upstream NonEmptyKeyValuePairs::decode footgun. L-1 from the audit was a false finding — the audit subagent misread the constants. PROPOSAL_CREATE_*_EX_UNITS are already at the post-2026-05-05-H-2 values (5M mem / 2G steps per spend, 2M / 1G per mint). The new builders alias these correctly. No change needed.
This commit is contained in:
parent
86a2787b7c
commit
8b48e7224e
4 changed files with 110 additions and 26 deletions
14
Cargo.lock
generated
14
Cargo.lock
generated
|
|
@ -1253,7 +1253,7 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
|
|||
[[package]]
|
||||
name = "pallas-addresses"
|
||||
version = "0.32.1"
|
||||
source = "git+https://git.sulkta.com/Sulkta-Coop/pallas.git?branch=feat-aux-data#507fd9da15f1239ff2df866e0d7601d4518e83a3"
|
||||
source = "git+https://git.sulkta.com/Sulkta-Coop/pallas.git?branch=feat-aux-data#8091abd1b45c716453b7360def29311cf4600c0d"
|
||||
dependencies = [
|
||||
"base58",
|
||||
"bech32",
|
||||
|
|
@ -1268,7 +1268,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "pallas-codec"
|
||||
version = "0.32.1"
|
||||
source = "git+https://git.sulkta.com/Sulkta-Coop/pallas.git?branch=feat-aux-data#507fd9da15f1239ff2df866e0d7601d4518e83a3"
|
||||
source = "git+https://git.sulkta.com/Sulkta-Coop/pallas.git?branch=feat-aux-data#8091abd1b45c716453b7360def29311cf4600c0d"
|
||||
dependencies = [
|
||||
"hex",
|
||||
"minicbor",
|
||||
|
|
@ -1279,7 +1279,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "pallas-crypto"
|
||||
version = "0.32.1"
|
||||
source = "git+https://git.sulkta.com/Sulkta-Coop/pallas.git?branch=feat-aux-data#507fd9da15f1239ff2df866e0d7601d4518e83a3"
|
||||
source = "git+https://git.sulkta.com/Sulkta-Coop/pallas.git?branch=feat-aux-data#8091abd1b45c716453b7360def29311cf4600c0d"
|
||||
dependencies = [
|
||||
"cryptoxide",
|
||||
"hex",
|
||||
|
|
@ -1293,7 +1293,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "pallas-primitives"
|
||||
version = "0.32.1"
|
||||
source = "git+https://git.sulkta.com/Sulkta-Coop/pallas.git?branch=feat-aux-data#507fd9da15f1239ff2df866e0d7601d4518e83a3"
|
||||
source = "git+https://git.sulkta.com/Sulkta-Coop/pallas.git?branch=feat-aux-data#8091abd1b45c716453b7360def29311cf4600c0d"
|
||||
dependencies = [
|
||||
"base58",
|
||||
"bech32",
|
||||
|
|
@ -1308,7 +1308,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "pallas-traverse"
|
||||
version = "0.32.1"
|
||||
source = "git+https://git.sulkta.com/Sulkta-Coop/pallas.git?branch=feat-aux-data#507fd9da15f1239ff2df866e0d7601d4518e83a3"
|
||||
source = "git+https://git.sulkta.com/Sulkta-Coop/pallas.git?branch=feat-aux-data#8091abd1b45c716453b7360def29311cf4600c0d"
|
||||
dependencies = [
|
||||
"hex",
|
||||
"itertools",
|
||||
|
|
@ -1324,7 +1324,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "pallas-txbuilder"
|
||||
version = "0.32.1"
|
||||
source = "git+https://git.sulkta.com/Sulkta-Coop/pallas.git?branch=feat-aux-data#507fd9da15f1239ff2df866e0d7601d4518e83a3"
|
||||
source = "git+https://git.sulkta.com/Sulkta-Coop/pallas.git?branch=feat-aux-data#8091abd1b45c716453b7360def29311cf4600c0d"
|
||||
dependencies = [
|
||||
"hex",
|
||||
"pallas-addresses",
|
||||
|
|
@ -1341,7 +1341,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "pallas-wallet"
|
||||
version = "0.32.1"
|
||||
source = "git+https://git.sulkta.com/Sulkta-Coop/pallas.git?branch=feat-aux-data#507fd9da15f1239ff2df866e0d7601d4518e83a3"
|
||||
source = "git+https://git.sulkta.com/Sulkta-Coop/pallas.git?branch=feat-aux-data#8091abd1b45c716453b7360def29311cf4600c0d"
|
||||
dependencies = [
|
||||
"bech32",
|
||||
"bip39",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue