Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTxO-HD targeting main #1011

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
13 changes: 13 additions & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,19 @@ jobs:
with:
use-sodium-vrf: true # default is true

- name: Linux install lmdb
if: matrix.sys.os == 'ubuntu-latest'
run: sudo apt install liblmdb-dev

- name: Mac install lmdb
if: matrix.sys.os == 'macos-latest'
run: brew install lmdb

- name: Windows install lmdb
if: matrix.sys.os == 'windows-latest'
shell: 'C:/msys64/usr/bin/bash.exe -e {0}'
run: /usr/bin/pacman --noconfirm -S mingw-w64-x86_64-lmdb

- uses: actions/checkout@v4

- name: Cabal update
Expand Down
72 changes: 69 additions & 3 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ repository cardano-haskell-packages
-- See CONTRIBUTING for information about these, including some Nix commands
-- you need to run if you change them
index-state:
, hackage.haskell.org 2024-12-23T00:00:00Z
, cardano-haskell-packages 2024-12-20T15:52:56Z
, hackage.haskell.org 2024-12-31T10:16:13Z
, cardano-haskell-packages 2025-01-08T16:35:32Z

packages:
cardano-cli
Expand All @@ -32,11 +32,11 @@ package bitvec
flags: -simd

extra-packages: Cabal

if os(windows)
constraints: time ^>=1.14
allow-newer: *:time

constraints: any.text source
-- Depending on C++ for just so slightly faster utf8 parsing is a bit annoying
-- especially as it brings in all kinds of complications for GHC.
package text
Expand All @@ -60,3 +60,69 @@ write-ghc-environment-files: always
-- IMPORTANT
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.

-- UTxO-HD for 10.2
source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-consensus.git
tag: 54ac1b2f5bd15f3f0f70e9f4a9ebf3e34792dcf2
--sha256: sha256-PdzKg4PA6DnzhRVUF2kiBfvf8S+ekXmws73XDXSZdnY=
subdir:
ouroboros-consensus
ouroboros-consensus-cardano
ouroboros-consensus-diffusion
ouroboros-consensus-protocol
sop-extras
strict-sop-core

-- mempack support
source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-base.git
tag: fb9b71f3bc33f8de673c6427736f09bf7972e81f
subdir:
cardano-crypto-class
--sha256: sha256-ExQ497FDYlmQyZaXOTddU+KraAUHnTAqPiyt055v0+M=

-- mempack support
source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-ledger
tag: c50d89688d9f30ea2dbd01afb19dbcaaf03e3da7
--sha256: sha256-3OVXLYCKSN4HPd3nsObK2mG8mB28AX46vuMqs+Jn3kw=
subdir:
eras/allegra/impl
eras/alonzo/impl
eras/alonzo/test-suite
eras/babbage/impl
eras/babbage/test-suite
eras/conway/impl
eras/conway/test-suite
eras/mary/impl
eras/shelley/impl
eras/shelley/test-suite
eras/shelley-ma/test-suite
libs/cardano-ledger-api
libs/cardano-ledger-core
libs/cardano-ledger-binary
libs/cardano-protocol-tpraos
libs/non-integral
libs/small-steps
libs/cardano-data
libs/set-algebra
libs/vector-map
eras/byron/chain/executable-spec
eras/byron/ledger/executable-spec
eras/byron/ledger/impl
eras/byron/ledger/impl/test
eras/byron/crypto
eras/byron/crypto/test

-- UTxO-HD for 10.2
source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-api.git
tag: e3b7712d80fe5721bccf5dccb89e626de12ae419
--sha256: sha256-Z2/qzlS4JfAtdSOc/V0r3wfbfOq6YWAobgmKKzlesdM=
subdir:
cardano-api
2 changes: 1 addition & 1 deletion cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ library
cardano-crypto-wrapper ^>=1.5.1,
cardano-data >=1.1,
cardano-git-rev ^>=0.2.2,
cardano-ping ^>=0.5,
cardano-ping ^>=0.7,
cardano-prelude,
cardano-slotting ^>=0.2.0.0,
cardano-strict-containers ^>=0.1,
Expand Down
4 changes: 2 additions & 2 deletions cardano-cli/src/Cardano/CLI/EraBased/Options/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2907,12 +2907,12 @@ pEpochBoundRetirement =
]
]

pNumberOfPools :: Parser Natural
pNumberOfPools :: Parser Word16
pNumberOfPools =
Opt.option integralReader $
mconcat
[ Opt.long "number-of-pools"
, Opt.metavar "NATURAL"
, Opt.metavar "WORD16"
, Opt.help "Desired number of pools."
]

Expand Down
4 changes: 2 additions & 2 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/Genesis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ updateOutputTemplate

shelleyDelKeys =
fromList
[ (gh, L.GenDelegPair gdh h)
[ (gh, L.GenDelegPair gdh $ L.toVRFVerKeyHash h)
| ( GenesisKeyHash gh
, (GenesisDelegateKeyHash gdh, VrfKeyHash h)
) <-
Expand Down Expand Up @@ -1142,7 +1142,7 @@ updateTemplate

shelleyDelKeys =
fromList
[ (gh, L.GenDelegPair gdh h)
[ (gh, L.GenDelegPair gdh $ L.toVRFVerKeyHash h)
| ( GenesisKeyHash gh
, (GenesisDelegateKeyHash gdh, VrfKeyHash h)
) <-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ updateOutputTemplate
L.Coin minUtxoVal = sgProtocolParams ^. L.ppMinUTxOValueL
shelleyDelKeys =
fromList
[ (gh, L.GenDelegPair gdh h)
[ (gh, L.GenDelegPair gdh $ L.toVRFVerKeyHash h)
| ( GenesisKeyHash gh
, (GenesisDelegateKeyHash gdh, VrfKeyHash h)
) <-
Expand Down
3 changes: 2 additions & 1 deletion cardano-cli/src/Cardano/CLI/Helpers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ validateCBOR :: CBORObject -> LB.ByteString -> Either HelpersError Text
validateCBOR cborObject bs =
case cborObject of
CBORBlockByron epochSlots -> do
void $ decodeCBOR bs (L.toPlainDecoder L.byronProtVer (Byron.decCBORABlockOrBoundary epochSlots))
void $
decodeCBOR bs (L.toPlainDecoder Nothing L.byronProtVer (Byron.decCBORABlockOrBoundary epochSlots))
Right "Valid Byron block."
CBORDelegationCertificateByron -> do
void $ decodeCBOR bs (L.fromCBOR :: L.Decoder s Byron.Certificate)
Expand Down
2 changes: 1 addition & 1 deletion cardano-cli/src/Cardano/CLI/Run/Debug/LogEpochState.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ runLogEpochStateCmd
Api.QuickValidation
(EpochNo maxBound)
()
( \(AnyNewEpochState sbe nes) _ _ -> do
( \(AnyNewEpochState sbe nes _) _ _ -> do
liftIO $
LBS.appendFile outputFilePath $
shelleyBasedEraConstraints sbe (Aeson.encode nes) <> "\n"
Expand Down
28 changes: 14 additions & 14 deletions cardano-cli/test/cardano-cli-golden/files/golden/help.cli
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ Usage: cardano-cli legacy governance create-update-proposal --out-file FILEPATH
[--pool-reg-deposit NATURAL]
[--min-pool-cost NATURAL]
[--pool-retirement-epoch-interval WORD32]
[--number-of-pools NATURAL]
[--number-of-pools WORD16]
[--pool-influence RATIONAL]
[--monetary-expansion RATIONAL]
[--treasury-expansion RATIONAL]
Expand Down Expand Up @@ -1276,7 +1276,7 @@ Usage: cardano-cli shelley governance action create-protocol-parameters-update -
[--key-reg-deposit-amt NATURAL]
[--pool-reg-deposit NATURAL]
[--pool-retirement-epoch-interval WORD32]
[--number-of-pools NATURAL]
[--number-of-pools WORD16]
[--pool-influence RATIONAL]
[--treasury-expansion RATIONAL]
[--monetary-expansion RATIONAL]
Expand Down Expand Up @@ -2327,7 +2327,7 @@ Usage: cardano-cli allegra governance action create-protocol-parameters-update -
[--key-reg-deposit-amt NATURAL]
[--pool-reg-deposit NATURAL]
[--pool-retirement-epoch-interval WORD32]
[--number-of-pools NATURAL]
[--number-of-pools WORD16]
[--pool-influence RATIONAL]
[--treasury-expansion RATIONAL]
[--monetary-expansion RATIONAL]
Expand Down Expand Up @@ -3376,7 +3376,7 @@ Usage: cardano-cli mary governance action create-protocol-parameters-update --ep
[--key-reg-deposit-amt NATURAL]
[--pool-reg-deposit NATURAL]
[--pool-retirement-epoch-interval WORD32]
[--number-of-pools NATURAL]
[--number-of-pools WORD16]
[--pool-influence RATIONAL]
[--treasury-expansion RATIONAL]
[--monetary-expansion RATIONAL]
Expand Down Expand Up @@ -4417,7 +4417,7 @@ Usage: cardano-cli alonzo governance action create-protocol-parameters-update --
[--key-reg-deposit-amt NATURAL]
[--pool-reg-deposit NATURAL]
[--pool-retirement-epoch-interval WORD32]
[--number-of-pools NATURAL]
[--number-of-pools WORD16]
[--pool-influence RATIONAL]
[--treasury-expansion RATIONAL]
[--monetary-expansion RATIONAL]
Expand Down Expand Up @@ -5498,7 +5498,7 @@ Usage: cardano-cli babbage governance action create-protocol-parameters-update -
[--key-reg-deposit-amt NATURAL]
[--pool-reg-deposit NATURAL]
[--pool-retirement-epoch-interval WORD32]
[--number-of-pools NATURAL]
[--number-of-pools WORD16]
[--pool-influence RATIONAL]
[--treasury-expansion RATIONAL]
[--monetary-expansion RATIONAL]
Expand Down Expand Up @@ -6912,7 +6912,7 @@ Usage: cardano-cli conway governance action create-protocol-parameters-update
[--key-reg-deposit-amt NATURAL]
[--pool-reg-deposit NATURAL]
[--pool-retirement-epoch-interval WORD32]
[--number-of-pools NATURAL]
[--number-of-pools WORD16]
[--pool-influence RATIONAL]
[--treasury-expansion RATIONAL]
[--monetary-expansion RATIONAL]
Expand Down Expand Up @@ -8933,7 +8933,7 @@ Usage: cardano-cli latest governance action create-protocol-parameters-update
[--key-reg-deposit-amt NATURAL]
[--pool-reg-deposit NATURAL]
[--pool-retirement-epoch-interval WORD32]
[--number-of-pools NATURAL]
[--number-of-pools WORD16]
[--pool-influence RATIONAL]
[--treasury-expansion RATIONAL]
[--monetary-expansion RATIONAL]
Expand Down Expand Up @@ -10825,7 +10825,7 @@ Usage: cardano-cli compatible shelley governance action create-protocol-paramete
[--key-reg-deposit-amt NATURAL]
[--pool-reg-deposit NATURAL]
[--pool-retirement-epoch-interval WORD32]
[--number-of-pools NATURAL]
[--number-of-pools WORD16]
[--pool-influence RATIONAL]
[--treasury-expansion RATIONAL]
[--monetary-expansion RATIONAL]
Expand Down Expand Up @@ -10939,7 +10939,7 @@ Usage: cardano-cli compatible allegra governance action create-protocol-paramete
[--key-reg-deposit-amt NATURAL]
[--pool-reg-deposit NATURAL]
[--pool-retirement-epoch-interval WORD32]
[--number-of-pools NATURAL]
[--number-of-pools WORD16]
[--pool-influence RATIONAL]
[--treasury-expansion RATIONAL]
[--monetary-expansion RATIONAL]
Expand Down Expand Up @@ -11053,7 +11053,7 @@ Usage: cardano-cli compatible mary governance action create-protocol-parameters-
[--key-reg-deposit-amt NATURAL]
[--pool-reg-deposit NATURAL]
[--pool-retirement-epoch-interval WORD32]
[--number-of-pools NATURAL]
[--number-of-pools WORD16]
[--pool-influence RATIONAL]
[--treasury-expansion RATIONAL]
[--monetary-expansion RATIONAL]
Expand Down Expand Up @@ -11175,7 +11175,7 @@ Usage: cardano-cli compatible alonzo governance action create-protocol-parameter
[--key-reg-deposit-amt NATURAL]
[--pool-reg-deposit NATURAL]
[--pool-retirement-epoch-interval WORD32]
[--number-of-pools NATURAL]
[--number-of-pools WORD16]
[--pool-influence RATIONAL]
[--treasury-expansion RATIONAL]
[--monetary-expansion RATIONAL]
Expand Down Expand Up @@ -11310,7 +11310,7 @@ Usage: cardano-cli compatible babbage governance action create-protocol-paramete
[--key-reg-deposit-amt NATURAL]
[--pool-reg-deposit NATURAL]
[--pool-retirement-epoch-interval WORD32]
[--number-of-pools NATURAL]
[--number-of-pools WORD16]
[--pool-influence RATIONAL]
[--treasury-expansion RATIONAL]
[--monetary-expansion RATIONAL]
Expand Down Expand Up @@ -11556,7 +11556,7 @@ Usage: cardano-cli compatible conway governance action create-protocol-parameter
[--key-reg-deposit-amt NATURAL]
[--pool-reg-deposit NATURAL]
[--pool-retirement-epoch-interval WORD32]
[--number-of-pools NATURAL]
[--number-of-pools WORD16]
[--pool-influence RATIONAL]
[--treasury-expansion RATIONAL]
[--monetary-expansion RATIONAL]
Expand Down
Loading
Loading