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

Negotiate NodeToClientVersion for non-breaking mainnet support #2791

Merged
merged 2 commits into from
Aug 2, 2021

Conversation

Anviking
Copy link
Member

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

  • Make the wallet support both V_8 and V_9.
  • Ensure integration tests on Mary are run without TestEnableDevelopmentNetworkProtocols: True

Comments

@Anviking Anviking self-assigned this Jul 31, 2021
Copy link
Contributor

@rvl rvl left a comment

Choose a reason for hiding this comment

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

Version negotiation - Excellent, thanks. 👍

It's only the codecs which need V_9, right? We don't make any queries yet that specifically require V_9? And I suppose that QueryIfCurrentAlonzo works under V_8 by never ever running the query.

@Anviking Anviking force-pushed the anviking/adp-1025/negotiate-version branch 2 times, most recently from 31fa627 to 5dba8cd Compare August 2, 2021 11:31
@Anviking
Copy link
Member Author

Anviking commented Aug 2, 2021

We don't make any queries yet that specifically require V_9? And I suppose that QueryIfCurrentAlonzo works under V_8

On Mary, nothing we do should require V_9. Even QueryAnytimeAlonzo works (double-checked manually, see commit message).

Frankly, I'm not sure exactly what needs V_9 on Alonzo. Only that:

  • NodeToClientV_9 has a comment enabled @CardanoNodeToClientVersion7@, i.e., Alonzo
  • When we start the integration tests in Alonzo, we get HardForkEncoderDisabledEra (SingleEraInfo {singleEraName = "Alonzo"}) in the node logs (seemingly caused by wallet requests)

So I'd suspect QueryIfCurrentAlonzo doesn't work with V_8.

@Anviking
Copy link
Member Author

Anviking commented Aug 2, 2021

bors r+

iohk-bors bot added a commit that referenced this pull request Aug 2, 2021
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]>
@Anviking Anviking force-pushed the anviking/adp-1025/negotiate-version branch from 5dba8cd to d99407b Compare August 2, 2021 14:18
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 2, 2021

Canceled.

@Anviking
Copy link
Member Author

Anviking commented Aug 2, 2021

bors r+

iohk-bors bot added a commit that referenced this pull request Aug 2, 2021
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]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 2, 2021

Build failed:

#expected (weeder)

@Anviking Anviking force-pushed the anviking/adp-1025/negotiate-version branch 2 times, most recently from 30360ad to 10c0573 Compare August 2, 2021 15:59
@Anviking
Copy link
Member Author

Anviking commented Aug 2, 2021

bors r+

iohk-bors bot added a commit that referenced this pull request Aug 2, 2021
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]>
@Anviking Anviking force-pushed the anviking/adp-1025/negotiate-version branch from 10c0573 to 1342308 Compare August 2, 2021 16:03
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 2, 2021

Canceled.

@Anviking
Copy link
Member Author

Anviking commented Aug 2, 2021

bors r+

iohk-bors bot added a commit that referenced this pull request Aug 2, 2021
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]>
1. Make Ouroboros applications not hard-code the version
2. Pass in both V_8 and V_9
3. Only parse the NetworkMagic from genesis, not the NodeToClientVersion.
  This seemed unused anyway.
Instead of always setting TestEnableDevelopmentNetworkProtocols in the
integration tests, with this commit we only set it if the era is Alonzo.

Because we run the integration tests on Mary in buildkite, this should
mean that the wallet now again works with mainnet nodes, without
TestEnableDevelopmentNetworkProtocols.

Haven't actually tested to connect against mainnet. But I did sanity
check that we got

    "eras": {
        "shelley": {
            "epoch_start_time": "2021-07-31T19:10:38Z",
            "epoch_number": 0
        },
        "mary": {
            "epoch_start_time": "2021-07-31T19:10:38Z",
            "epoch_number": 0
        },
        "byron": {
            "epoch_start_time": "2021-07-31T19:10:38Z",
            "epoch_number": 0
        },
        "allegra": {
            "epoch_start_time": "2021-07-31T19:10:38Z",
            "epoch_number": 0
        },
        "alonzo": null

from GET /network/parameters

when running `LOCAL_CLUSTER_ERA=mary NO_POOLS=1 NO_CLEANUP=1 local-cluster`

and that TestEnableDevelopmentNetworkProtocols was absent from the BFT
node's config.
@Anviking Anviking force-pushed the anviking/adp-1025/negotiate-version branch from 1342308 to 02f1c32 Compare August 2, 2021 16:09
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 2, 2021

Canceled.

@Anviking
Copy link
Member Author

Anviking commented Aug 2, 2021

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 2, 2021

Build succeeded:

@iohk-bors iohk-bors bot merged commit 06a37e2 into master Aug 2, 2021
@iohk-bors iohk-bors bot deleted the anviking/adp-1025/negotiate-version branch August 2, 2021 17:26
iohk-bors bot added a commit that referenced this pull request Aug 16, 2021
2796: Revert "Temporarily add TestEnableDevelopmentNetworkProtocols to e2e tests" r=piotr-iohk a=Anviking

ADP-1025

Reverts #2790

With #2791, it shouldn't be needed.

Co-authored-by: Johannes Lund <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants