Skip to content

Commit

Permalink
Merge #4118
Browse files Browse the repository at this point in the history
4118: Update cardano-ledger and ouroboros-network dependencies r=Jimbo4350 a=newhoggy



Co-authored-by: John Ky <john.ky@iohk.io>
  • Loading branch information
iohk-bors[bot] and newhoggy authored Jul 5, 2022
2 parents 96a58be + 6db19f2 commit 3fca5ff
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Cardano.Benchmarking.GeneratorTx.Genesis
where

import Cardano.Prelude hiding (TypeError, filter)
import qualified Data.Map.Strict as Map
import qualified Data.ListMap as ListMap
import Prelude (error, filter)

import Cardano.Api
Expand All @@ -25,7 +25,7 @@ genesisFunds :: forall era. IsShelleyBasedEra era
=> NetworkId -> ShelleyGenesis StandardShelley -> [(AddressInEra era, Lovelace)]
genesisFunds networkId g
= map (castAddr *** fromShelleyLovelace)
$ Map.toList
$ ListMap.toList
$ sgInitialFunds g
where
castAddr (Addr _ pcr stref)
Expand Down
1 change: 1 addition & 0 deletions bench/tx-generator/tx-generator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ library
, cardano-cli
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-data
, cardano-git-rev
, cardano-ledger-alonzo
, cardano-ledger-byron
Expand Down
8 changes: 4 additions & 4 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: ce3057e0863304ccb3f79d78c77136219dc786c6
--sha256: 19ijcy1sl1iqa7diy5nsydnjsn3281kp75i2i42qv0fpn58238s9
tag: 0913292b13963ae4b60136eddb8d18b137f96a21
--sha256: 19rrnvvplvg8v989bcv6vpjwvblfa0m65izxkcp8dclf0a914qq3
subdir:
eras/alonzo/impl
eras/alonzo/test-suite
Expand Down Expand Up @@ -263,8 +263,8 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: a65c29b6a85e90d430c7f58d362b7eb097fd4949
--sha256: 1fmab5hmi1y8lss97xh6hhikmyhsx9x31yhvg6zpr2kcq7kc6qkf
tag: 69b748ea07ffbaf9c7868645f9f8ca9b58f658b5
--sha256: 0yfici9p5gbj7gzpbk19izwsksagzc8fjls3cax291128jyvpi7w
subdir:
monoidal-synchronisation
network-mux
Expand Down
1 change: 1 addition & 0 deletions cardano-api/cardano-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ test-suite cardano-api-test
, cardano-api
, cardano-api:gen
, cardano-binary
, cardano-data
, cardano-crypto
, cardano-crypto-class
, cardano-crypto-test
Expand Down
3 changes: 2 additions & 1 deletion cardano-api/src/Cardano/Api/Shelley/Genesis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module Cardano.Api.Shelley.Genesis

import Prelude

import qualified Data.ListMap as ListMap
import qualified Data.Map.Strict as Map
import Data.Maybe (fromMaybe)
import qualified Data.Time as Time
Expand Down Expand Up @@ -65,7 +66,7 @@ shelleyGenesisDefaults =
-- genesis keys and initial funds
, sgGenDelegs = Map.empty
, sgStaking = emptyGenesisStaking
, sgInitialFunds = Map.empty
, sgInitialFunds = ListMap.empty
, sgMaxLovelaceSupply = 0
}
where
Expand Down
1 change: 0 additions & 1 deletion cardano-api/src/Cardano/Api/TxBody.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3521,7 +3521,6 @@ toAllegraAuxiliaryData :: forall era ledgerera.
ShelleyLedgerEra era ~ ledgerera
=> Ledger.AuxiliaryData ledgerera ~ Allegra.AuxiliaryData ledgerera
=> Ledger.AnnotatedData (Ledger.Script ledgerera)
=> Ord (Ledger.Script ledgerera)
=> Map Word64 TxMetadataValue
-> [ScriptInEra era]
-> Ledger.AuxiliaryData ledgerera
Expand Down
3 changes: 2 additions & 1 deletion cardano-api/test/Test/Cardano/Api/Genesis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Cardano.Prelude

import Cardano.Api.Shelley (ShelleyGenesis (..))

import Data.ListMap (ListMap(ListMap))
import qualified Data.Map.Strict as Map
import Data.Time.Clock.POSIX (posixSecondsToUTCTime)

Expand Down Expand Up @@ -53,7 +54,7 @@ exampleShelleyGenesis =
[( genesisVerKeyHash
, GenDelegPair delegVerKeyHash delegVrfKeyHash)
]
, sgInitialFunds = Map.fromList [(initialFundedAddress,initialFunds)]
, sgInitialFunds = ListMap [(initialFundedAddress,initialFunds)]
, sgStaking = emptyGenesisStaking
}
where
Expand Down
8 changes: 5 additions & 3 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/Genesis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import qualified Data.ByteString.Lazy.Char8 as LBS
import Data.Coerce (coerce)
import qualified Data.List as List
import qualified Data.List.Split as List
import Data.ListMap (ListMap(ListMap))
import qualified Data.ListMap as ListMap
import qualified Data.Map.Strict as Map

import qualified Data.Sequence.Strict as Seq
Expand Down Expand Up @@ -1012,18 +1014,18 @@ updateTemplate (SystemStart start)
{ sgSystemStart = start
, sgMaxLovelaceSupply = fromIntegral $ nonDelegCoin + delegCoin
, sgGenDelegs = shelleyDelKeys
, sgInitialFunds = Map.fromList
, sgInitialFunds = ListMap
[ (toShelleyAddr addr, toShelleyLovelace v)
| (addr, v) <-
distribute (nonDelegCoin - subtractForTreasury) utxoAddrsNonDeleg ++
distribute (delegCoin - subtractForTreasury) utxoAddrsDeleg ++
mkStuffedUtxo stuffedUtxoAddrs ]
, sgStaking =
ShelleyGenesisStaking
{ sgsPools = Map.fromList
{ sgsPools = ListMap
[ (Ledger._poolId poolParams, poolParams)
| poolParams <- Map.elems poolSpecs ]
, sgsStake = Ledger._poolId <$> poolSpecs
, sgsStake = ListMap.fromMap $ Ledger._poolId <$> poolSpecs
}
, sgProtocolParams = pparamsFromTemplate
}
Expand Down
7 changes: 0 additions & 7 deletions cardano-node/src/Cardano/Node/Tracing/Tracers/P2P.hs
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,6 @@ namesForConnectionManager TrConnectionManagerCounters {} = ["ConnectionManagerCo
namesForConnectionManager TrState {} = ["State"]
namesForConnectionManager ConnectionManager.TrUnexpectedlyFalseAssertion {} =
["UnexpectedlyFalseAssertion"]
namesForConnectionManager TrUnknownConnection {} = ["UnknownConnection"]

severityConnectionManager ::
ConnectionManagerTrace addr
Expand Down Expand Up @@ -790,7 +789,6 @@ severityConnectionManager TrConnectionManagerCounters {} = Info
severityConnectionManager TrState {} = Info
severityConnectionManager ConnectionManager.TrUnexpectedlyFalseAssertion {} =
Error
severityConnectionManager TrUnknownConnection {} = Debug

instance (Show addr, Show versionNumber, Show agreedOptions, LogFormatting addr,
ToJSON addr, ToJSON versionNumber, ToJSON agreedOptions)
Expand Down Expand Up @@ -927,11 +925,6 @@ instance (Show addr, Show versionNumber, Show agreedOptions, LogFormatting addr,
[ "kind" .= String "UnexpectedlyFalseAssertion"
, "info" .= String (pack . show $ info)
]
forMachine _dtal (TrUnknownConnection info) =
mconcat
[ "kind" .= String "UnknownConnection"
, "info" .= String (pack . show $ info)
]
forHuman = pack . show
asMetrics (TrConnectionManagerCounters ConnectionManagerCounters {..}) =
[ IntM
Expand Down
5 changes: 0 additions & 5 deletions cardano-node/src/Cardano/Tracing/OrphanInstances/Network.hs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ instance HasSeverityAnnotation (ConnectionManagerTrace addr (ConnectionHandlerTr
TrConnectionManagerCounters {} -> Info
TrState {} -> Info
ConnMgr.TrUnexpectedlyFalseAssertion {} -> Error
TrUnknownConnection {} -> Debug

instance HasPrivacyAnnotation (ConnMgr.AbstractTransitionTrace addr)
instance HasSeverityAnnotation (ConnMgr.AbstractTransitionTrace addr) where
Expand Down Expand Up @@ -1917,10 +1916,6 @@ instance (Show addr, Show versionNumber, Show agreedOptions, ToObject addr,
[ "kind" .= String "UnexpectedlyFalseAssertion"
, "info" .= String (pack . show $ info)
]
TrUnknownConnection {} ->
mconcat
[ "kind" .= String "UnknownConnection"
]

instance ToJSON state => ToJSON (ConnMgr.MaybeUnknown state) where
toJSON (ConnMgr.Known st) =
Expand Down

0 comments on commit 3fca5ff

Please sign in to comment.