Skip to content

Commit

Permalink
Merge #2029
Browse files Browse the repository at this point in the history
2029: Update dependency on ledger and consensus r=mrBliss a=mrBliss

The main reason is to pull in:
IntersectMBO/cardano-ledger#1943

Co-authored-by: Thomas Winant <thomas@well-typed.com>
  • Loading branch information
iohk-bors[bot] and mrBliss committed Oct 28, 2020
2 parents ce3e96e + ee06b21 commit c54b3b8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 25 deletions.
8 changes: 4 additions & 4 deletions cabal.project
Expand Up @@ -110,8 +110,8 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 1a2d7717682f8191cf818362df28ac20fac19b83
--sha256: 136pp0653w8chk53wnz6mlkdhf0ldglrb74p1i93d1xnf6ssvjhs
tag: 623bbb8d4b13bcb0157c5c576a69536387f1b5be
--sha256: 0nspz67p6ixw4zr6q4r2gzn37583mlag8f1g5pk0i4f1yisi69d1
subdir:
byron/chain/executable-spec
byron/crypto
Expand Down Expand Up @@ -159,8 +159,8 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 43080299637c24254774cd59d634e55be4844d4c
--sha256: 1k77y77k58rfxhnb4smw2kyci3xsswlcbxk2zicvdhkrifx09kpd
tag: 116ed8b475632ac13ab05c3561d4b23b44f4a230
--sha256: 1ml9r3scnsqqpigiwlsjky9a4zlrp6797sg2m4yrvj7jq3hph2lq
subdir:
io-sim
io-sim-classes
Expand Down
34 changes: 15 additions & 19 deletions cardano-api/src/Cardano/Api/Typed.hs
Expand Up @@ -469,6 +469,7 @@ import qualified Cardano.Chain.UTxO as Byron
import Ouroboros.Consensus.Shelley.Eras (StandardShelley)
import Ouroboros.Consensus.Shelley.Protocol.Crypto (StandardCrypto)

import qualified Cardano.Ledger.Core as Shelley (Script)
import qualified Cardano.Ledger.Crypto as Shelley (DSIGN, KES, VRF)

import qualified Shelley.Spec.Ledger.Address as Shelley
Expand Down Expand Up @@ -1277,11 +1278,10 @@ getTxWitnesses (ByronTx Byron.ATxAux { Byron.aTaWitness = witnesses }) =

getTxWitnesses (ShelleyTx Shelley.Tx {
Shelley._witnessSet =
Shelley.WitnessSet {
Shelley.addrWits,
Shelley.bootWits,
Shelley.msigWits
}
Shelley.WitnessSet
addrWits
msigWits
bootWits
}) =
map ShelleyBootstrapWitness (Set.elems bootWits)
++ map ShelleyKeyWitness (Set.elems addrWits)
Expand All @@ -1305,15 +1305,11 @@ makeSignedTransaction witnesses (ShelleyTxBody txbody txmetadata) =
ShelleyTx $
Shelley.Tx
txbody
Shelley.WitnessSet {
Shelley.bootWits = Set.fromList
[ w | ShelleyBootstrapWitness w <- witnesses ],
Shelley.addrWits = Set.fromList
[ w | ShelleyKeyWitness w <- witnesses ],
Shelley.msigWits = Map.fromList
[ (Shelley.hashMultiSigScript sw, sw)
| ShelleyScriptWitness sw <- witnesses ]
}
(Shelley.WitnessSet
(Set.fromList [ w | ShelleyKeyWitness w <- witnesses ])
(Map.fromList [ (Shelley.hashMultiSigScript sw, sw)
| ShelleyScriptWitness sw <- witnesses ])
(Set.fromList [ w | ShelleyBootstrapWitness w <- witnesses ]))
(maybeToStrictMaybe txmetadata)

makeByronKeyWitness :: NetworkId
Expand Down Expand Up @@ -1379,14 +1375,14 @@ makeShelleyBootstrapWitness nwOrAddr (ShelleyTxBody txbody _) (ByronSigningKey s
-- reuse that here.
--
signature :: Shelley.SignedDSIGN StandardCrypto
(Shelley.Hash StandardCrypto (Shelley.TxBody StandardShelley))
(Shelley.Hash StandardCrypto Shelley.EraIndependentTxBody)
signature = makeShelleySignature
txhash
-- Make the signature with the extended key directly:
(ShelleyExtendedSigningKey (Byron.unSigningKey sk))

txhash :: Shelley.Hash StandardCrypto (Shelley.TxBody StandardShelley)
txhash = Crypto.hashWith CBOR.serialize' txbody
txhash :: Shelley.Hash StandardCrypto Shelley.EraIndependentTxBody
txhash = Shelley.eraIndTxBodyHash txbody

-- And finally we need to provide the extra suffix bytes necessary to
-- reconstruct the mini-Merkel tree that is a Byron address. The suffix
Expand Down Expand Up @@ -1778,7 +1774,7 @@ instance HasTextEnvelope Script where


scriptHash :: Script -> Hash Script
scriptHash (Script s) = ScriptHash (Shelley.hashAnyScript s)
scriptHash (Script s) = ScriptHash (Shelley.hashMultiSigScript s)

makeMultiSigScript :: MultiSigScript -> Script
makeMultiSigScript = Script . go
Expand Down Expand Up @@ -1955,7 +1951,7 @@ toShelleyPoolParams StakePoolParameters {
} =
--TODO: validate pool parameters
Shelley.PoolParams {
Shelley._poolPubKey = poolkh
Shelley._poolId = poolkh
, Shelley._poolVrf = vrfkh
, Shelley._poolPledge = toShelleyLovelace stakePoolPledge
, Shelley._poolCost = toShelleyLovelace stakePoolCost
Expand Down
2 changes: 1 addition & 1 deletion cardano-node-chairman/app/Cardano/Chairman.hs
Expand Up @@ -469,7 +469,7 @@ localInitiatorNetworkApplication
-> SecurityParam
-> Versions
NodeToClientVersion
(DictVersion NodeToClientVersion AgreedOptions)
NodeToClientVersionData
(OuroborosApplication InitiatorMode LocalAddress ByteString m () Void)
localInitiatorNetworkApplication
chairmanTracer chainSyncTracer
Expand Down
2 changes: 1 addition & 1 deletion cardano-node/chairman/Cardano/Chairman.hs
Expand Up @@ -493,7 +493,7 @@ localInitiatorNetworkApplication
-> SocketPath
-> ChainsVar m blk
-> SecurityParam
-> Versions NodeToClientVersion (DictVersion NodeToClientVersion AgreedOptions)
-> Versions NodeToClientVersion NodeToClientVersionData
(OuroborosApplication InitiatorMode LocalAddress ByteString m () Void)
localInitiatorNetworkApplication chairmanTracer chainSyncTracer
localTxSubmissionTracer
Expand Down

0 comments on commit c54b3b8

Please sign in to comment.