Skip to content

Commit 54155a2

Browse files
committed
Revert bump to ledger and consensus versions.
This partially reverts 600f5d2, keeping only the changes related to updating Plutus and dropping the packages to move to `plutus-apps`.
1 parent 75de27d commit 54155a2

File tree

22 files changed

+265
-179
lines changed

22 files changed

+265
-179
lines changed

cabal.project

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ source-repository-package
184184
source-repository-package
185185
type: git
186186
location: https://github.com/input-output-hk/cardano-ledger
187-
tag: 3df3ca8db4d52952cb750e8859b71f0a371323af
188-
--sha256: 0jacfhqnj76cyjwdxz05h7rqmdasgxp9skd01f5y61xraz746x21
187+
tag: 1a9ec4ae9e0b09d54e49b2a40c4ead37edadcce5
188+
--sha256: 0avzyiqq0m8njd41ck9kpn992yq676b1az9xs77977h7cf85y4wm
189189
subdir:
190190
eras/alonzo/impl
191191
eras/alonzo/test-suite
@@ -248,8 +248,8 @@ source-repository-package
248248
source-repository-package
249249
type: git
250250
location: https://github.com/input-output-hk/ouroboros-network
251-
tag: 48e498cfea694b89f99fd92ae7a86b9fcd5f29f0
252-
--sha256: 1klgvlfcd1kxgjicws964k2xkxr79xf3vvgkbx4x7cyn4xfng166
251+
tag: 4fac197b6f0d2ff60dc3486c593b68dc00969fbf
252+
--sha256: 1b43vbdsr9m3ry1kgag2p2ixpv54gw7a4vvmndxl6knqg8qbsb8b
253253
subdir:
254254
io-sim
255255
io-classes

cardano-api/gen/Gen/Cardano/Api/Typed.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ genTxId :: Gen TxId
383383
genTxId = TxId <$> genShelleyHash
384384

385385
genTxIndex :: Gen TxIx
386-
genTxIndex = TxIx . fromIntegral <$> Gen.word16 Range.constantBounded
386+
genTxIndex = TxIx . fromIntegral <$> Gen.word32 Range.constantBounded
387387

388388
genTxOutValue :: CardanoEra era -> Gen (TxOutValue era)
389389
genTxOutValue era =

cardano-api/src/Cardano/Api/Block.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ getShelleyBlockTxs :: forall era ledgerera.
164164
ledgerera ~ ShelleyLedgerEra era
165165
=> Consensus.ShelleyBasedEra ledgerera
166166
=> ShelleyBasedEra era
167-
-> Ledger.Block (TPraos.BHeader (Ledger.Crypto ledgerera)) ledgerera
167+
-> Ledger.Block TPraos.BHeader ledgerera
168168
-> [Tx era]
169169
getShelleyBlockTxs era (Ledger.Block _header txs) =
170170
[ ShelleyTx era txinblock

cardano-api/src/Cardano/Api/Fees.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,7 @@ instance Error TransactionValidityError where
457457
displayError (TransactionValidityBasicFailure (Alonzo.UnknownTxIns txins)) =
458458
"The transaction contains inputs that are not present in the UTxO: "
459459
<> show (map (renderTxIn . fromShelleyTxIn) $ Set.toList txins)
460-
displayError (TransactionValidityBasicFailure (Alonzo.BadTranslation errmsg)) =
461-
"Error translating the transaction context: " <> show errmsg
460+
462461

463462
-- | Compute the 'ExecutionUnits' needed for each script in the transaction.
464463
--

cardano-api/src/Cardano/Api/LedgerEvent.hs

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import Cardano.Ledger.Shelley.Rewards
3232
import Cardano.Ledger.Shelley.Rules.Epoch (EpochEvent (PoolReapEvent))
3333
import Cardano.Ledger.Shelley.Rules.Mir (MirEvent (..))
3434
import Cardano.Ledger.Shelley.Rules.NewEpoch
35-
(NewEpochEvent (EpochEvent, MirEvent, DeltaRewardEvent, TotalRewardEvent))
35+
(NewEpochEvent (EpochEvent, MirEvent, RewardEvent))
3636
import Cardano.Ledger.Shelley.Rules.PoolReap (PoolreapEvent (RetiredPools))
3737
import Cardano.Ledger.Shelley.Rules.Tick (TickEvent (NewEpochEvent))
3838
import Control.State.Transition (Event)
@@ -51,16 +51,13 @@ import Ouroboros.Consensus.Ledger.Basics (AuxLedgerEvent)
5151
import Ouroboros.Consensus.Shelley.Ledger (ShelleyBlock,
5252
ShelleyLedgerEvent (ShelleyLedgerEventTICK))
5353
import Ouroboros.Consensus.TypeFamilyWrappers
54-
import Cardano.Ledger.Shelley.Rules.Rupd (RupdEvent(RupdEvent))
5554

5655
data LedgerEvent
5756
= -- | The given pool is being registered for the first time on chain.
5857
PoolRegistration Certificate
5958
| -- | The given pool already exists and is being re-registered.
6059
PoolReRegistration Certificate
61-
| -- | Incremental rewards are being computed.
62-
IncrementalRewardsDistribution EpochNo (Map StakeCredential (Set (Reward StandardCrypto)))
63-
| -- | Reward distribution has completed.
60+
| -- | Rewards are being distributed.
6461
RewardsDistribution EpochNo (Map StakeCredential (Set (Reward StandardCrypto)))
6562
| -- | MIR are being distributed.
6663
MIRDistribution MIRDistributionDetails
@@ -79,13 +76,11 @@ instance
7976
Event (Ledger.Core.EraRule "NEWEPOCH" ledgerera) ~ NewEpochEvent ledgerera,
8077
Event (Ledger.Core.EraRule "EPOCH" ledgerera) ~ EpochEvent ledgerera,
8178
Event (Ledger.Core.EraRule "POOLREAP" ledgerera) ~ PoolreapEvent ledgerera,
82-
Event (Ledger.Core.EraRule "MIR" ledgerera) ~ MirEvent ledgerera,
83-
Event (Ledger.Core.EraRule "RUPD" ledgerera) ~ RupdEvent (Crypto ledgerera)
79+
Event (Ledger.Core.EraRule "MIR" ledgerera) ~ MirEvent ledgerera
8480
) =>
8581
ConvertLedgerEvent (ShelleyBlock ledgerera)
8682
where
8783
toLedgerEvent evt = case unwrapLedgerEvent evt of
88-
LEDeltaRewardEvent e m -> Just $ IncrementalRewardsDistribution e m
8984
LERewardEvent e m -> Just $ RewardsDistribution e m
9085
LEMirTransfer rp rt rtt ttr ->
9186
Just $
@@ -142,20 +137,7 @@ pattern LERewardEvent ::
142137
AuxLedgerEvent (LedgerState (ShelleyBlock ledgerera))
143138
pattern LERewardEvent e m <-
144139
ShelleyLedgerEventTICK
145-
(NewEpochEvent (TotalRewardEvent e (Map.mapKeys fromShelleyStakeCredential -> m)))
146-
147-
pattern LEDeltaRewardEvent ::
148-
( Crypto ledgerera ~ StandardCrypto,
149-
Event (Ledger.Core.EraRule "TICK" ledgerera) ~ TickEvent ledgerera,
150-
Event (Ledger.Core.EraRule "NEWEPOCH" ledgerera) ~ NewEpochEvent ledgerera,
151-
Event (Ledger.Core.EraRule "RUPD" ledgerera) ~ RupdEvent (Crypto ledgerera)
152-
) =>
153-
EpochNo ->
154-
Map StakeCredential (Set (Reward StandardCrypto)) ->
155-
AuxLedgerEvent (LedgerState (ShelleyBlock ledgerera))
156-
pattern LEDeltaRewardEvent e m <-
157-
ShelleyLedgerEventTICK
158-
(NewEpochEvent (DeltaRewardEvent (RupdEvent e (Map.mapKeys fromShelleyStakeCredential -> m))))
140+
(NewEpochEvent (RewardEvent e (Map.mapKeys fromShelleyStakeCredential -> m)))
159141

160142
pattern LEMirTransfer ::
161143
( Crypto ledgerera ~ StandardCrypto,

cardano-api/src/Cardano/Api/LedgerState.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ import qualified Cardano.Ledger.Crypto as Crypto
116116
import qualified Cardano.Ledger.Era as Ledger
117117
import qualified Cardano.Ledger.Keys as Shelley.Spec
118118
import qualified Cardano.Ledger.Shelley.API as ShelleyAPI
119-
import qualified Cardano.Protocol.TPraos.API as TPraos
119+
import qualified Cardano.Ledger.Shelley.API.Protocol as TPraos
120120
import qualified Cardano.Ledger.Shelley.Genesis as Shelley.Spec
121121
import qualified Cardano.Protocol.TPraos.BHeader as TPraos
122122
import qualified Cardano.Protocol.TPraos.Rules.Tickn as Tick
@@ -151,7 +151,6 @@ import qualified Ouroboros.Network.Block
151151
import qualified Ouroboros.Network.Protocol.ChainSync.Client as CS
152152
import qualified Ouroboros.Network.Protocol.ChainSync.ClientPipelined as CSP
153153
import Ouroboros.Network.Protocol.ChainSync.PipelineDecision
154-
import qualified Cardano.Protocol.TPraos.Rules.Prtcl as TPraos
155154

156155
data InitialLedgerStateError
157156
= ILSEConfigFile Text
@@ -1342,7 +1341,7 @@ nextEpochEligibleLeadershipSlots sbe sGen serCurrEpochState ptclState
13421341
-- We need the candidate nonce, the previous epoch's last block header hash
13431342
-- and the extra entropy from the protocol parameters. We then need to combine them
13441343
-- with the (⭒) operator.
1345-
let TPraos.PrtclState _ evolvingNonce candidateNonce = TPraos.csProtocol chainDepState
1344+
let ShelleyAPI.PrtclState _ evolvingNonce candidateNonce = TPraos.csProtocol chainDepState
13461345

13471346
when (evolvingNonce == candidateNonce)
13481347
$ Left LeaderErrCandidateNonceStillEvolving

0 commit comments

Comments
 (0)