-
Notifications
You must be signed in to change notification settings - Fork 721
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
Backport #5050 & #5132 to release/1.35
#5151
Closed
KtorZ
wants to merge
1,417
commits into
IntersectMBO:release/1.35
from
CardanoSolutions:cip-0094-on-chain-spo-polls
Closed
Backport #5050 & #5132 to release/1.35
#5151
KtorZ
wants to merge
1,417
commits into
IntersectMBO:release/1.35
from
CardanoSolutions:cip-0094-on-chain-spo-polls
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…raight-line-code-for-tx-commands Straight line code for tx commands
…grade-to-cabal-3.10.1.0 Upgrade to cabal-3.10.1.0
…ics-mapping Backward compatibility for Prometheus metrics names
…rdano-ping New cardano-cli ping command.
- makeByronTransactionBody guards against overflows in the transaction indices, but makeShelleyTransactionBody does not. - Add appropriate guards to makeShelleyTransactionBody.
I revised a bunch of things in CHaP and the constraints are not needed any more.
Split it into node-to-node and node-to-client. This is needed so that the log contains information whether the version numbers (now encoded as numbers) are node-to-node or node-to-client version.
Fixes input-output-hk/ouroboros-network#3691
The warning is not needed as of ouroboros-network#3859.
P2P is now an early release: we encourage to enable it on at most one of the relays (if one has more than one relay). We don't advise yet to use it on BP nodes.
…etwork-version-repr Use JSON instances for NodeToNodeVersion & NodeToClientVersion
…constraints Bump CHaP and remove most constraints from the cabal file
…-genesis workbench: Distribute genesis using an intermediate storage service
nix: switch to ghc 9.2.7
…le-type-2 File type to track the content and direction of files
…w-mkExecConfig-function New mkExecConfig function
…date-hackage.nix Update hackage.nix
And also, remove the poll witnesses altogether from metadata. Since we'll now only rely on cold key signing, we can rely on the existing witness mechanism of transactions (combined with the 'required extra signatories' field). This slightly adjust the 'verifyPollAnswer' function to now work directly from a transaction and return the actual signatories. Consumers can then verify whether signatories meet their expected criteria.
As well as finalize the metadata extraction logic on the API's side. This is mostly the same thing as before, but it now takes a signed transaction file for verification instead of a standalone metadata. ``` ❯ cardano-cli governance verify-poll --poll-file polls/basic.json --tx-file verify/valid Found valid poll answer, signed by: [ "f8db28823f8ebd01a2d9e24efb2f0d18e387665770274513e370b5d5" ] ``` ``` ❯ cardano-cli -- governance verify-poll --poll-file polls/basic.json --tx-file verify/none Command failed: governance verify-poll Error: No answer found in the provided transaction's metadata. ``` ``` ❯ cardano-cli -- governance verify-poll --poll-file polls/basic.json --tx-file verify/malformed Command failed: governance verify-poll Error: Malformed metadata; couldn't deserialise answer: An error occured while decoding GovernancePollAnswer.2. Error: missing mandatory field ``` ``` ❯ cardano-cli -- governance verify-poll --poll-file polls/basic.json --tx-file verify/invalid Command failed: governance verify-poll Error: Invalid answer (42) not part of the poll. Accepted answers: 0 → yes 1 → no ``` ``` ❯ cardano-cli -- governance verify-poll --poll-file polls/basic.json --tx-file verify/mismatch Command failed: governance verify-poll Error: Answer's poll doesn't match provided poll (hash mismatch). ```
- [x] Cover new error cases for 'verify' - [x] Create full-blown test transactions for 'verify' - [x] Slightly re-organised and re-structure data folder - [x] Remove now-unnecessary old files ``` ❯ tree cardano-cli/test/data/golden/shelley/governance . ├── answer │ └── basic.json ├── cold.sk ├── cold.vk ├── create │ ├── basic.json │ └── long-text.json ├── polls │ ├── basic.json │ └── long-text.json └── verify ├── invalid ├── malformed ├── mismatch ├── none └── valid ```
KtorZ
requested review from
a team,
deepfire,
mgmeier,
fmaste,
jutaro,
cleverca22,
dcoutts,
Jimbo4350,
erikd,
newhoggy,
JaredCorduan and
CarlosLopezDeLara
as code owners
April 25, 2023 09:28
KtorZ
changed the title
Cip 0094 on chain spo polls
Backport #5050 & #5132 to Apr 25, 2023
release/1.35
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #5150 (cc @newhoggy)
Checklist
See Runnings tests for more details
CHANGELOG.md
for affected package.cabal
files are updatedhlint
. See.github/workflows/check-hlint.yml
to get thehlint
versionstylish-haskell
. See.github/workflows/stylish-haskell.yml
to get thestylish-haskell
versionghc-8.10.7
andghc-9.2.7
Note on CI
If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.