-
Notifications
You must be signed in to change notification settings - Fork 217
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
Basic Alonzo support #2763
Basic Alonzo support #2763
Conversation
@@ -635,42 +683,49 @@ fromShelleyPParams eraInfo pp = W.ProtocolParameters | |||
-- convert it into a percentage. | |||
-- | |||
decentralizationLevelFromPParams | |||
:: SLAPI.PParams era | |||
:: HasField "_d" pparams SL.UnitInterval |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we were to use Cardano.Api
we wouldn't need to do all of this juggling. But looking into it, it seems a bit all-or-nothing — we can't start using it for a single query only. Unless we ask them to expose a bunch of internal stuff.
4312c80
to
660812f
Compare
cfda01c
to
a5389d6
Compare
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
d7c9db3
to
5108e25
Compare
bors try |
tryBuild failed: |
Not sure why there are Info-logs in the CI integration test output… 🤔 I don't see this locally. |
bors try |
tryBuild succeeded: |
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
12d003f
to
1ee610c
Compare
I made a ticket for the weeder failures: #2785. |
736d2cd
to
55ec2a6
Compare
bors try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. There is just an outstanding todo item hese:
rodney@tethys:~/iohk/cw/alonzo % ./scripts/todo-list.sh lib -t ADP-952
+++ TODO list
267 source files [****************] 100%
lib/shelley/src/Cardano/Wallet/Shelley/Transaction.hs
1273 We presumably need to provide the protocol params if our tx uses
scripts? [ADP-952]
@@ -1,7 +1,7 @@ | |||
# Taken from https://hydra.iohk.io/build/6782523/download/1/index.html | |||
# and not sanity-checked for appropriateness for when we turn on Alonzo | |||
# in our test cluster. | |||
adaPerUTxOWord: 0 | |||
adaPerUTxOWord: 34482 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the comment above still apply?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, forgot about it! Thanks, will remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
214bc4b Plutus script parameters probably need to be sanity checked at some point, so kept a comment about that.
let txConstraints = (view #constraints tl) pp | ||
liftIO $ toApiNetworkParameters np txConstraints (interpretQuery ti . toApiEpochInfo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not involve TransactionLayer here?
It seems a bit roundabout to call a transaction layer thing that just references the protocol parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems a bit roundabout to call a transaction layer thing that just references the protocol parameters.
I fully agree. But to convert the Alonzo adaPerUTxOWord
to our generic API minUTxOValue
, we do need to call the cardano-wallet
-specific (i.e not in -core
) function computeMinimumAdaQuantityInternal
…
Alternatives could be:
- Pass in using some different record/function than the TransactionLayer — but we already have this one
- Convert
MinUTxOValue
toCoin
already before storing it in theProtocolParameters
record — sounds like a horrible idea - Merge
cardano-wallet
andcardano-wallet-core
Aside from the merging the libraries, I don't see anything obvious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's ... unfortunate. I have opened PR #2787 to fix this.
6c40b62
to
214bc4b
Compare
tryBuild failed: |
- Set TestEnableDevelopmentNetworkProtocols - Tweak alonzo genesis - Fix SHELLEY_CREATE_MIGRATION_PLAN_04 to work in both Mary and Alonzo
Instead of just running on the latest era (Alonzo), this makes them also run on Mary.
Since we run tests on two different eras now, we want buildkite to upload artefacts from both eras. Hopefully this should do it.
9f1606a
to
bf46b04
Compare
bors r+ |
2763: Basic Alonzo support r=Anviking a=Anviking # Issue Number ADP-1025 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] Ensure the wallet can run in Alonzo - [x] Get all integration tests green - [x] Fix warnings - [x] Cleanup - <s>[ ]Test that addresses don't affect the min ada value</s> Existing integration tests should be enough - [x] <s>Does it still work on testnet? -> The ledger function in question cannot know the current network, so would be highly surprising if it didn't work on testnet </s> - [x] Update MinUTxOValue properties to generate both ShelleyMA and Alonzo cases - [ ] Go through everything from start to finish - [x] Run integration tests on both Mary and alonzo - [x] Check that the Mary era is actually picked up, and it's not just running Alonzo twice - <s>[ ] Using cardano-node 1.28.0 tag</s> -> #2778 - <s>[x] Cabal build also works</s> -> #2776 # Comments - [Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-2763) - [Cabal Nightly build](https://buildkite.com/input-output-hk/cardano-wallet-nightly/builds?branch=anviking%2FADP-952%2Falonzo) (use environment variable `step=cabal` when creating a new build) Co-authored-by: Johannes Lund <[email protected]> Co-authored-by: Rodney Lorrimar <[email protected]>
Build failed: |
c24bac0
to
83dab6f
Compare
Great. I will merge without bors because it was just a weeder false positive which failed. |
2791: Negotiate NodeToClientVersion for non-breaking mainnet support r=Anviking a=Anviking # Issue Number ADP-1025 # Background #2763 made the wallet demand NodeToClientV_9. With cardano-node 1.28.0, V_9 is only enabled if `TestEnableDevelopmentNetworkProtocols` is set in the node config. # Overview - [x] Make the wallet support both `V_8` and `V_9`. - [x] Ensure integration tests on Mary are run without `TestEnableDevelopmentNetworkProtocols: True` # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Johannes Lund <[email protected]>
2791: Negotiate NodeToClientVersion for non-breaking mainnet support r=Anviking a=Anviking # Issue Number ADP-1025 # Background #2763 made the wallet demand NodeToClientV_9. With cardano-node 1.28.0, V_9 is only enabled if `TestEnableDevelopmentNetworkProtocols` is set in the node config. # Overview - [x] Make the wallet support both `V_8` and `V_9`. - [x] Ensure integration tests on Mary are run without `TestEnableDevelopmentNetworkProtocols: True` # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Johannes Lund <[email protected]>
2791: Negotiate NodeToClientVersion for non-breaking mainnet support r=Anviking a=Anviking # Issue Number ADP-1025 # Background #2763 made the wallet demand NodeToClientV_9. With cardano-node 1.28.0, V_9 is only enabled if `TestEnableDevelopmentNetworkProtocols` is set in the node config. # Overview - [x] Make the wallet support both `V_8` and `V_9`. - [x] Ensure integration tests on Mary are run without `TestEnableDevelopmentNetworkProtocols: True` # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Johannes Lund <[email protected]>
2791: Negotiate NodeToClientVersion for non-breaking mainnet support r=Anviking a=Anviking # Issue Number ADP-1025 # Background #2763 made the wallet demand NodeToClientV_9. With cardano-node 1.28.0, V_9 is only enabled if `TestEnableDevelopmentNetworkProtocols` is set in the node config. # Overview - [x] Make the wallet support both `V_8` and `V_9`. - [x] Ensure integration tests on Mary are run without `TestEnableDevelopmentNetworkProtocols: True` # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Johannes Lund <[email protected]>
2791: Negotiate NodeToClientVersion for non-breaking mainnet support r=Anviking a=Anviking # Issue Number ADP-1025 # Background #2763 made the wallet demand NodeToClientV_9. With cardano-node 1.28.0, V_9 is only enabled if `TestEnableDevelopmentNetworkProtocols` is set in the node config. # Overview - [x] Make the wallet support both `V_8` and `V_9`. - [x] Ensure integration tests on Mary are run without `TestEnableDevelopmentNetworkProtocols: True` # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Johannes Lund <[email protected]>
Issue Number
ADP-1025
Overview
[ ]Test that addresses don't affect the min ada valueExisting integration tests should be enoughDoes it still work on testnet? -> The ledger function in question cannot know the current network, so would be highly surprising if it didn't work on testnet[ ] Using cardano-node 1.28.0 tag-> stack.yaml: Bump cardano-node to 1.28.0 tag #2778[x] Cabal build also works-> Fix cabal build #2776Comments
step=cabal
when creating a new build)