Skip to content

Commit

Permalink
Removed proposal return address from required witnesses
Browse files Browse the repository at this point in the history
  • Loading branch information
Soupstraw committed Jun 2, 2023
1 parent 8759c72 commit 258b3d9
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Utxow.hs
Expand Up @@ -36,10 +36,10 @@ import Cardano.Ledger.Babbage.Tx (refScripts)
import Cardano.Ledger.BaseTypes (ShelleyBase, quorum)
import Cardano.Ledger.Conway.Core
import Cardano.Ledger.Conway.Era (ConwayUTXOW)
import Cardano.Ledger.Conway.Governance (ProposalProcedure (..), VotingProcedure (..))
import Cardano.Ledger.Conway.Governance (VotingProcedure (..))
import Cardano.Ledger.Credential (credKeyHashWitness)
import Cardano.Ledger.Crypto (DSIGN, HASH)
import Cardano.Ledger.Keys (GenDelegs, KeyHash, KeyRole (..), asWitness)
import Cardano.Ledger.Keys (GenDelegs, KeyHash, KeyRole (..))
import Cardano.Ledger.Rules.ValidationMode (runTest, runTestOnSignal)
import Cardano.Ledger.Shelley.LedgerState (UTxOState (..), witsFromTxWitnesses)
import Cardano.Ledger.Shelley.Rules (
Expand Down Expand Up @@ -178,26 +178,14 @@ voteWitnesses txb = foldr' accum mempty (txb ^. votingProceduresTxBodyL)
Just x -> Set.insert x khs
Nothing -> khs

govActionWitnesses ::
ConwayEraTxBody era =>
TxBody era ->
Set (KeyHash 'Witness (EraCrypto era))
govActionWitnesses txb = foldr' accum mempty (txb ^. proposalProceduresTxBodyL)
where
accum ga = Set.insert . asWitness $ pProcReturnAddr ga

witsVKeyNeeded ::
(EraTx era, ConwayEraTxBody era) =>
UTxO era ->
Tx era ->
GenDelegs (EraCrypto era) ->
Set (KeyHash 'Witness (EraCrypto era))
witsVKeyNeeded utxo tx genDelegs =
Set.unions
[ Shelley.witsVKeyNeeded utxo tx genDelegs
, voteWitnesses txb
, govActionWitnesses txb
]
Shelley.witsVKeyNeeded utxo tx genDelegs `Set.union` voteWitnesses txb
where
txb = tx ^. bodyTxL

Expand Down

0 comments on commit 258b3d9

Please sign in to comment.