-
Notifications
You must be signed in to change notification settings - Fork 23
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
Change a representation of witnesses in transaction's certificates to an ordered map where a certificate is the key #734
base: master
Are you sure you want to change the base?
Conversation
9b2bcb4
to
090aa57
Compare
… an ordered map where a certificate is the key
090aa57
to
53c3b35
Compare
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.
Confirm we aren't reintroducing a bug and I'll be happy to approve.
, Either | ||
(TxBodyErrorAutoBalance era) | ||
( BuildTxWith | ||
BuildTx |
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.
This makes my eyes bleed (I know it's not your fault).
(Certificate era) | ||
( BuildTxWith | ||
build | ||
(Maybe (StakeCredential, Witness WitCtxStake era)) |
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.
I would seek confirmation that #456 is not an issue with this change. I suspect this needs to be a list still.
@@ -142,6 +142,8 @@ data Certificate era where | |||
|
|||
deriving instance Eq (Certificate era) | |||
|
|||
deriving instance Ord (Certificate era) |
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.
I would add a ord_distributive
test for Certificate
just to be safe.
Changelog
Context
This PR changes representation of transaction certificates' witnesses from a list of with stake credentials to a map.
The issue is that there's a relationship
Certificate *--1 StakeCredential
which makes the assigning of witnesses impossible in the cases where we have more than one certificate with the same stake credential. This then breaks witnesses indexing.See related PRs:
Checklist