-
Notifications
You must be signed in to change notification settings - Fork 16
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
Do not allow submitting transactions older than current node era #350
Conversation
316191c
to
94f722c
Compare
data NodeEraMismatchError = forall era nodeEra value. | ||
Show value => | ||
NodeEraMismatchError | ||
{ originalValue :: !value |
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.
What's the purpose of this value?
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 think we don't need the originalValue
field. It's probably enough to say the node is in an unexpected era and what era that is.
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.
The field is so that if we have some value that is in the wrong era for example TxOut era
then we can print out a useful error message to say what it was that was in the wrong era. @Jimbo4350 is right that we don't need it because we now outright reject circumstances where eras don't match rather than before when we were more lenient and additional context was helpful.
The field has been removed.
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.
One minor comment. Happy to approve after.
data NodeEraMismatchError = forall era nodeEra value. | ||
Show value => | ||
NodeEraMismatchError | ||
{ originalValue :: !value |
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 think we don't need the originalValue
field. It's probably enough to say the node is in an unexpected era and what era that is.
667b925
to
71cc451
Compare
71cc451
to
2d12621
Compare
Changelog
Context
Submitting transactions older that the current node era is unsafe.
This PR also removes all uses of
EraCast
fromcardano-api
.Checklist
See Running tests for more details
.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