[WIP] Local Ledger Implementation in TypeScript#2541
Draft
Conversation
Comment on lines
-274
to
+277
| return emptyHashWithPrefix('CodaReceiptEmpty'); | ||
| // OCaml uses legacy poseidon: Random_oracle.Legacy.(salt "CodaReceiptEmpty" |> digest) | ||
| // returns a different value than Poseidon w/ emptyHashWithPrefix | ||
| // Using the correct legacy value to match OCaml's Receipt.Chain_hash.empty | ||
| return Field('4836908137238259756355130884394587673375183996506461139740622663058947052555'); |
Contributor
There was a problem hiding this comment.
FYI, we have legacy poseidon implemented in o1js, so you can use that instead of a hard-coded value
Contributor
Author
There was a problem hiding this comment.
Thanks Gregor, will give it a try
This file contains hidden or 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
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
Implements a TypeScript local ledger for testing zkApps, replacing the existing OCaml implementation when running with the local blockchain
Attempt to resolve #2378
Blocking Issue
The following parity test fails due to a mismatch in
receiptChainHashvalues between the OCaml and TypeScript implementations:local-ledger-parity.test.ts, "should apply simple nonce increment transaction identically"OCaml: 14085731157301269295156321426508462010218801998705391518505779678237624663296
TypeScript: 28899291169992443053148564175730552295359313139162430887426314586130777313107
Attempts
Reproduction Steps
We expect all assertions to pass but
receiptChainHashcomparison fails