Replies: 2 comments
-
|
Completing all of the above issues would complete the following issue: #748 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I've gone through this list and created issues corresponding to each individual predicate. In doing so, I've found some entires here are duplicated, some link to the incorrect reference code. When picking up each ticket, one should verify all the information included is correct and comprehensive. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As we prepare for demoing Amaru as a relay node, I have been reviewing the ledger predicates that we have implemented in Amaru, and those we are missing from the Haskell implementation. For transparency, the following list was collected with the assistance of LLM tools. As I've been implementing the missing rules (#744 and #750), I've been manually verifying the information regarding the specific predicate. The list below has been mostly a helpful starting place to reduce the time/effort reading through the Haskell logic:
Conway-Era Ledger Predicates
BBODY
WrongBlockBodySizeBBODY-- body size matches header (Alonzo Bbody.hs)TooManyExUnits-- block execution units ≤ max (Alonzo Bbody.hs)InvalidBodyHashBBODY-- body hash matches header (Alonzo Bbody.hs)HeaderProtVerTooHigh-- header protocol version ≤ successor (Conway Bbody.hs#L314)BodyRefScriptsSizeTooBig-- total ref script size per block ≤ max (Conway Bbody.hs#L27)LEDGER
ConwayTreasuryValueMismatch-- treasury assertion matches actual (Ledger.hs#L383)ConwayTxRefScriptsSizeTooBig-- ref script size per tx ≤ max (Ledger.hs#L384)ConwayWdrlNotDelegatedToDRep-- withdrawal credentials delegated to DRep (Ledger.hs#L399)ConwayWithdrawalsMissingAccounts-- withdrawn accounts exist (v11+) (Ledger.hs#L214)ConwayIncompleteWithdrawals-- must withdraw full balance (v11+) (Ledger.hs#L215)UTXOW
MissingScriptWitnessesUTXOW/ExtraneousScriptWitnessesUTXOW-- required scripts match witnessed (Babbage Utxow.hs#L217)MissingRequiredDatums/NotAllowedSupplementalDatums-- datum presence (Babbage Utxow.hs#L362)MissingRedeemers/ExtraRedeemers-- redeemers match scripts (Babbage Utxow.hs#L366)InvalidWitnessesUTXOW-- VKey signatures verify (Babbage Utxow.hs#L371)MissingTxBodyMetadataHash/MissingTxMetadata/ConflictingMetadataHash/InvalidMetadata-- metadata hash + script validation (Babbage Utxow.hs#L379, Shelley Utxow.hs#L30)MalformedScriptWitnesses/MalformedReferenceScripts-- scripts well-formed (Babbage Utxow.hs#L277)UnspendableUTxONoDatumHash-- V1/V2 inputs have datum hash (Babbage Utxow.hs#L362)MissingVKeyWitnessesUTXOW-- all required VKey witnesses present (Babbage Utxow.hs#L374)ScriptWitnessNotValidatingUTXOW-- native scripts validate (Babbage Utxow.hs#L244)PPViewHashesDontMatch/ScriptIntegrityHashMismatch-- script integrity hash (Babbage Utxow.hs#L394)UTXO
BabbageNonDisjointRefInputs-- spending and ref inputs disjoint (Babbage Utxo.hs#L234)InputSetEmptyUTxO-- at least one spending input (Babbage Utxo.hs#L389)BadInputsUTxO-- all inputs exist in UTxO set (Babbage Utxo.hs#L396)BabbageOutputTooSmallUTxO-- outputs meet min ADA (Babbage Utxo.hs#L406)OutputTooBigUTxO-- output value size ≤ max (Babbage Utxo.hs#L410)WrongNetwork-- output addresses have correct network (Babbage Utxo.hs#L418)TooManyCollateralInputs-- collateral count ≤ max (Babbage Utxo.hs#L50)OutsideValidityIntervalUTxO-- current slot within validity interval (Babbage Utxo.hs#L380)OutsideForecast-- upper bound convertible to UTC (Babbage Utxo.hs#L386)FeeTooSmallUTxO-- fee ≥ minimum fee (Babbage Utxo.hs#L213)ValueNotConservedUTxO-- consumed == produced (Babbage Utxo.hs#L399)OutputBootAddrAttrsTooBig-- Byron address attrs ≤ 64 bytes (Babbage Utxo.hs#L413)WrongNetworkWithdrawal-- withdrawal address network matches (Babbage Utxo.hs#L421)WrongNetworkInTxBody-- tx body network ID matches (Babbage Utxo.hs#L424)MaxTxSizeUTxO-- tx size ≤ max (Babbage Utxo.hs#L427)ExUnitsTooBigUTxO-- per-tx execution units ≤ max (Babbage Utxo.hs#L430)feesOK (collateral sub-checks)
FeeTooSmallUTxO-- fee ≥ min (same check as above, part offeesOK) (Babbage Utxo.hs#L213)ScriptsNotPaidUTxO-- collateral UTxOs are VKey-locked (Babbage Utxo.hs#L251)CollateralContainsNonADA-- collateral is ADA-only (Babbage Utxo.hs#L282)InsufficientCollateral-- collateral ≥ fee * collateralPercent / 100 (Babbage Utxo.hs#L256)IncorrectTotalCollateralField-- declared total matches actual (Babbage Utxo.hs#L322)NoCollateralInputs-- at least one collateral input (Babbage Utxo.hs#L260)UTXOS
CollectErrors(valid tx) -- script context collection succeeds (Alonzo Utxos.hs#L214)CollectErrors(invalid tx) -- collection must also succeed for invalid txs (Alonzo Utxos.hs#L214)ValidationTagMismatch(isValid=true) -- all scripts pass (Alonzo Utxos.hs#L250)ValidationTagMismatch(isValid=false) -- at least one script fails (Alonzo Utxos.hs#L277)CERTS
WithdrawalsNotInRewardsCERTS-- withdrawals drain registered accounts (pv < 11) (Certs.hs#L233)DELEG
StakeKeyRegisteredDELEG-- credential not already registered (Deleg.hs#L214)DepositIncorrectDELEG/IncorrectDepositDELEG-- deposit == ppKeyDeposit (Deleg.hs#L204)StakeKeyNotRegisteredDELEG(dereg) -- credential registered (Deleg.hs#L271)RefundIncorrectDELEG-- refund matches deposit (Deleg.hs#L252)StakeKeyHasNonZeroAccountBalanceDELEG-- zero balance before dereg (Deleg.hs#L268)StakeKeyNotRegisteredDELEG(deleg) -- credential registered to delegate (Deleg.hs#L283)DelegateeStakePoolNotRegisteredDELEG-- target pool registered (Deleg.hs#L219)DelegateeDRepNotRegisteredDELEG-- target DRep registered (Deleg.hs#L226)DepositIncorrectDELEG(reg+deleg) -- deposit == ppKeyDeposit forConwayRegDelegCert(Deleg.hs#L294)StakeKeyRegisteredDELEG(reg+deleg) -- credential not already registered forConwayRegDelegCert(Deleg.hs#L295)DelegateeStakePoolNotRegisteredDELEG(reg+deleg) -- target pool registered forConwayRegDelegCert(Deleg.hs#L296)DelegateeDRepNotRegisteredDELEG(reg+deleg) -- target DRep registered forConwayRegDelegCert(Deleg.hs#L296)POOL
WrongNetworkPOOL-- pool reward address network matches (Pool.hs#L237)PoolMedataHashTooBig-- metadata hash size valid (Pool.hs#L251)StakePoolCostTooLowPOOL-- pool cost ≥ minPoolCost (Pool.hs#L256)VRFKeyHashAlreadyRegistered(new pool) -- VRF key unique (Pool.hs#L268)VRFKeyHashAlreadyRegistered(re-reg) -- VRF key same or unique (Pool.hs#L283)StakePoolNotRegisteredOnKeyPOOL-- pool registered to retire (Pool.hs#L93)StakePoolRetirementWrongEpochPOOL-- retirement epoch in valid range (Pool.hs#L96)GOVCERT
ConwayDRepAlreadyRegistered-- DRep not already registered (GovCert.hs#L212)ConwayDRepIncorrectDeposit-- deposit == ppDRepDeposit (GovCert.hs#L215)ConwayDRepNotRegistered(unreg) -- DRep registered to deregister (GovCert.hs#L241)ConwayDRepIncorrectRefund-- refund matches deposit (GovCert.hs#L242)ConwayDRepNotRegistered(update) -- DRep registered to update (GovCert.hs#L258)ConwayCommitteeHasPreviouslyResigned-- cold key not resigned (GovCert.hs#L196)ConwayCommitteeIsUnknown(auth) -- cold key is known committee member (GovCert.hs#L205)ConwayCommitteeHasPreviouslyResigned(resign) -- cold key not resigned forConwayResignCommitteeColdKey(GovCert.hs#L276)ConwayCommitteeIsUnknown(resign) -- cold key is known forConwayResignCommitteeColdKey(GovCert.hs#L276)GOV
UnelectedCommitteeVoters-- only elected CC members vote (Gov.hs#L489)VotersDoNotExist-- all voters registered (Gov.hs#L613)GovActionsDoNotExist-- voted-on actions exist (Gov.hs#L614)DisallowedVotesDuringBootstrap-- restricted voting during bootstrap (Gov.hs#L394)VotingOnExpiredGovAction-- action not expired (Gov.hs#L369)DisallowedVoters-- voter role permitted for action type (Gov.hs#L380)DisallowedProposalDuringBootstrap-- restricted proposals during bootstrap (Gov.hs#L450)ProposalCantFollow-- hardfork version is valid successor (Gov.hs#L507)MalformedProposal-- parameter change is well-formed (Gov.hs#L403)ProposalReturnAccountDoesNotExist-- return address registered (Gov.hs#L516)TreasuryWithdrawalReturnAccountsDoNotExist-- withdrawal addresses registered (Gov.hs#L527)ProposalDepositIncorrect-- deposit == ppGovActionDeposit (Gov.hs#L534)ProposalProcedureNetworkIdMismatch-- return address network matches (Gov.hs#L543)TreasuryWithdrawalsNetworkIdMismatch-- withdrawal address network matches (Gov.hs#L552)InvalidGuardrailsScriptHash(treasury) -- policy matches constitution forTreasuryWithdrawals(Gov.hs#L433)InvalidGuardrailsScriptHash(params) -- policy matches constitution forParameterChange(Gov.hs#L433)ZeroTreasuryWithdrawals-- withdrawal total non-zero (Gov.hs#L559)ConflictingCommitteeUpdate-- add/remove sets disjoint (Gov.hs#L562)ExpirationEpochTooSmall-- new member expiry > current epoch (Gov.hs#L565)InvalidPrevGovActionId-- previous action ID matches proposals tree root (Gov.hs#L575)Beta Was this translation helpful? Give feedback.
All reactions