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

Implement support for specifying node protocol in CLI (V2) #1435

Merged
merged 6 commits into from
Jul 10, 2020

Conversation

dcoutts
Copy link
Contributor

@dcoutts dcoutts commented Jul 10, 2020

This means that on the command line you can select if you're talking to a node
that is in Byron-only mode, Shelley-mode or the composite Cardano mode.

We have to handle the queries slightly differently in these cases.

@dcoutts dcoutts requested review from Jimbo4350 and intricate July 10, 2020 13:45
@dcoutts dcoutts force-pushed the dcoutts/api-typed-tx-submit branch from f2713d0 to 3158661 Compare July 10, 2020 13:47
@dcoutts
Copy link
Contributor Author

dcoutts commented Jul 10, 2020

So far this only converts one command, but it should show the pattern to follow. I'll do tx submission next.

This incorporates many of the changes from #1427 but based on updated APIs.

@intricate intricate force-pushed the dcoutts/api-typed-tx-submit branch 2 times, most recently from d1b0e43 to 1c15b9e Compare July 10, 2020 16:29
dcoutts and others added 6 commits July 10, 2020 12:31
Move it into the node where it is actually used.

Add a quick hack for the chairman, to be replaced by the new proper API
once that is ready.
Starting from an untyped Protocol info, make a LocalNodeConnectInfo
which enforces which types can be used with which protocol modes. This
will help to guide the CLI commands that interact with the node.

This isn't perfect yet, but it's a lot clearer about what is necessary
by tying the protocol mode to the block type, which in turn determines
the types of queries, query results etc.
For the next changes, it is very helpful to have the query errors
nested, since there are more of them.

Co-authored-by: Luke Nadur <[email protected]>
This means that on the command line you can select if you're talking to
a node that is in Byron-only mode, Shelley-mode or the composite Cardano
mode.

We have to handle the queries slightly differently in these cases.

Co-authored-by: Luke Nadur <[email protected]>
Generalise the tx submit cli command to take a protocol mode flag that
determines the mode we think the node is running in, and also generalise
it to read either Byron or Shelley transactions.

Then support submitting the appropriate combinations of Byron or
Shelley transactions, depending on the mode.
Co-authored-by: Luke Nadur <[email protected]>
Co-authored-by: Duncan Coutts <[email protected]>
@intricate intricate force-pushed the dcoutts/api-typed-tx-submit branch from 1c15b9e to 5d455c8 Compare July 10, 2020 16:32
Copy link
Contributor Author

@dcoutts dcoutts left a comment

Choose a reason for hiding this comment

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

LGTM

@intricate
Copy link
Contributor

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 10, 2020

@iohk-bors iohk-bors bot merged commit 1275e02 into master Jul 10, 2020
@iohk-bors iohk-bors bot deleted the dcoutts/api-typed-tx-submit branch July 10, 2020 17:36
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.

3 participants