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

[ADP-3378] Bump node to 8.12 #4657

Merged
merged 4 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ repository cardano-haskell-packages
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee

-- repeating the index-state for hackage to work around hackage.nix parsing limitation
index-state: 2024-06-04T00:00:00Z
index-state: 2024-06-29T00:00:00Z

index-state:
, hackage.haskell.org 2024-06-04T00:00:00Z
, cardano-haskell-packages 2024-05-29T10:15:00Z
, hackage.haskell.org 2024-06-29T00:00:00Z
, cardano-haskell-packages 2024-06-29T00:00:00Z

packages:
lib/address-derivation-discovery
Expand Down Expand Up @@ -117,8 +117,8 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-addresses
tag: 126964483d188c2362393d2a6eea8c65dfc43097
--sha256: 1w152imj28ap5dfdc8x9ly0cy7dn500v7k63vw11f70gvgg6x7my
tag: 2bca06deaa60e54a5322ac757387d744bf043367
--sha256: 1y1mzfly7jac40b9g4xc078rcm5zqhc3xxv77kwxi10yph1jwq7z
subdir: command-line
core

Expand Down Expand Up @@ -186,16 +186,15 @@ allow-newer:
, cardano-addresses-cli:mtl
, servant-openapi3:*
, cardano-ledger-alonzo-test:base, plutus-ledger-api
, cardano-crypto-class:vector
, plutus-core:cardano-crypto-class

, katip:Win32

constraints:
base == 4.18.2.0
base >= 4.18.2.0 && < 5
, bimap >= 0.4.0
, openapi3 >= 3.2.0
, libsystemd-journal >= 1.4.4
, systemd >= 2.3.0
, singletons-th < 3.3
-- dependency of systemd-2.3.0
, network >= 3.1.1.1
-- choose versions that work with base >= 4.12
Expand All @@ -211,14 +210,16 @@ constraints:

-- Cave: This version of `bech32`
-- does not work with optparse-applicative >= 0.18.1.0
, bech32 == 1.1.3
, bech32 >= 1.1.7

-- Cardano Node dependencies:
, any.io-classes ==1.4.1.0
, io-classes >= 1.4
, io-classes -asserts
, any.io-classes-mtl ==0.1.1.0
, optparse-applicative-fork >= 0.18.1
, ouroboros-network ^>= 0.16

, ouroboros-consensus-cardano ^>= 0.17
, ouroboros-network ^>= 0.16.1
, ouroboros-network-protocols ^>= 0.9

-- TH Name shadowing warnings need to be addressed when bumping to 2.13.3.5
, persistent ^>= 2.14.6.0
Expand Down Expand Up @@ -324,4 +325,4 @@ tests: False
-- -------------------------------------------------------------------------

package bitvec
flags: -simd
flags: -simd
81 changes: 30 additions & 51 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ integration-tests match:
'.#integration-exe' \
-c integration-exe -j 2 --match="{{match}}"

#start a shell with 8.11 in scope
node-811:
#start a shell with 8.12.1 in scope
node-8121:
nix shell \
--accept-flake-config \
'github:IntersectMBO/cardano-node?ref=8.11.0-sancho#cardano-node' \
'github:IntersectMBO/cardano-node?ref=8.11.0-sancho#cardano-cli'
'github:IntersectMBO/cardano-node?ref=8.12.1#cardano-node' \
'github:IntersectMBO/cardano-node?ref=8.12.1#cardano-cli'

# start a shell with 8.9.4 in scope
node-893:
Expand All @@ -162,8 +162,8 @@ conway-integration-tests-match match:
LOCAL_CLUSTER_CONFIGS=lib/local-cluster/test/data/cluster-configs-sanchonet \
LOCAL_CLUSTER_ERA=conway \
nix shell \
'github:IntersectMBO/cardano-node?ref=8.11.0-sancho#cardano-node' \
'github:IntersectMBO/cardano-node?ref=8.11.0-sancho#cardano-cli' \
'github:IntersectMBO/cardano-node?ref=8.12.1#cardano-node' \
'github:IntersectMBO/cardano-node?ref=8.12.1#cardano-cli' \
--accept-flake-config \
-c just integration-tests "{{match}}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ constructAddressFromIx role pTemplate dTemplate ix =
Nothing ->
createEnterpriseAddress pScript

-- | NOTE: The roles 'DRep', 'CCCold', 'CCHot' are not supported.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although, I think restricting the domain with a new type containing a subset of CA.Role should be fairly painless. May try...

replaceCosignersWithVerKeys
:: CA.Role
-> ScriptTemplate
Expand Down Expand Up @@ -180,10 +181,22 @@ replaceCosignersWithVerKeys role' (ScriptTemplate xpubs scriptTemplate) ix =
CA.UTxOExternal -> CA.Payment
CA.UTxOInternal -> CA.Payment
CA.Stake -> CA.Delegation
CA.DRep -> unsupportedRole
CA.CCCold -> unsupportedRole
CA.CCHot -> unsupportedRole
deriveMultisigPublicKey accXPub = case role' of
CA.UTxOExternal -> deriveAddressPublicKey accXPub role'
CA.UTxOInternal -> deriveAddressPublicKey accXPub role'
CA.Stake -> deriveDelegationPublicKey accXPub
CA.DRep -> unsupportedRole
CA.CCCold -> unsupportedRole
CA.CCHot -> unsupportedRole

unsupportedRole :: forall a. HasCallStack => a
unsupportedRole = error $ mconcat
[ "replaceCosignersWithVerKeys: unsupported role "
, show role'
]

-- | Convert 'NetworkDiscriminant type parameter to
-- 'Cardano.Address.NetworkTag'.
Expand Down
Loading
Loading