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

Add ConvertRawTxId, use it for comparing OneEraGenTxIds #1017

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

amesgen
Copy link
Member

@amesgen amesgen commented Mar 25, 2024

Closes #1009

@amesgen amesgen self-assigned this Mar 25, 2024
@amesgen amesgen requested a review from a team as a code owner March 25, 2024 11:44
Comment on lines +166 to +170
instance ConvertRawTxId (GenTx ByronBlock) where
toRawTxIdHash (ByronTxId i) = CC.abstractHashToShort i
toRawTxIdHash (ByronDlgId i) = CC.abstractHashToShort i
toRawTxIdHash (ByronUpdateProposalId i) = CC.abstractHashToShort i
toRawTxIdHash (ByronUpdateVoteId i) = CC.abstractHashToShort i
Copy link
Member Author

Choose a reason for hiding this comment

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

This instance assumes that it is not possible for two different constructors to contain the same hash. This seems reasonable, as the payload of these different kinds of transactions are completely different. However, to be extra safe, we could eg prepend a tag byte.

Copy link
Member Author

Choose a reason for hiding this comment

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

This seems fine, especially as Byron transactions aren't being newly submitted anymore.

Copy link
Contributor

@jasagredo jasagredo left a comment

Choose a reason for hiding this comment

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

Rest looks good

@amesgen amesgen force-pushed the amesgen/compare-txid-on-raw-hash branch from 883bdb7 to 539c525 Compare March 25, 2024 12:06
@amesgen amesgen force-pushed the amesgen/compare-txid-on-raw-hash branch from 539c525 to 7ba2a82 Compare March 25, 2024 13:29
@amesgen amesgen added this pull request to the merge queue Mar 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 27, 2024
@amesgen amesgen added this pull request to the merge queue Mar 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 27, 2024
@amesgen amesgen added this pull request to the merge queue Mar 27, 2024
Merged via the queue into main with commit 8c485b2 Mar 27, 2024
15 checks passed
@amesgen amesgen deleted the amesgen/compare-txid-on-raw-hash branch March 27, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[BUG] - Inconsistency between MsgHasTx / MsgNextTx in the LocalTxMonitor
2 participants