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

Generate hash from arbitrary transaction id #12021

Merged
merged 7 commits into from
Oct 24, 2022

Conversation

psteckler
Copy link
Member

@psteckler psteckler commented Oct 22, 2022

For the CLI command advanced hash-transaction, allow arbitrary transaction IDs as input:

  • Base58Check-encoded signed commands from the current mainnet
  • Base64-encoded signed commands or zkApp commands

Most of the changes here relate to the first case. The Base58Check encoding relied on the Bin_prot serialization that had tags for all versioned types. So we needed to create Signed_command.Stable.V1.With_all_version_tags, which forced many changes.

In ppx_version, for %%versioned_binable Stable modules, added the ability to generate the With_all_versioned_tags module from Binable functors. Changed the functor used in Unsigned_extended.UInt32/64 to allow such generation.

Token_id.V1 had changed from compatible. Made that V2, and restored the original V1. The version linter failures here are due to using the new V2.

Wrote tests to decode and hash V1 and V2 signed commands, and a V1 zkApp command. For the V1 signed command, the hash produced and verified is the original hash from compatible.

Part of #11821.

@psteckler psteckler requested review from a team as code owners October 22, 2022 00:13
@psteckler psteckler added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label Oct 22, 2022
Copy link
Member

@mrmr1993 mrmr1993 left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Member

@bkase bkase left a comment

Choose a reason for hiding this comment

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

product ✅

@mrmr1993 mrmr1993 merged commit d6436be into develop Oct 24, 2022
@mrmr1993 mrmr1993 deleted the feature/txn-hash-arbitrary-txn-id branch October 24, 2022 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants