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

bug: inconsistency in fetch data in app chain and sender key inconsistency #33

Open
laciferin2024 opened this issue Nov 2, 2024 · 0 comments

Comments

@laciferin2024
Copy link

Reproducer

https://github.com/metafountain/minafountain/blob/180c234b842b81616b6be7f615cb4f65f1b32ee6/packages/chain/test/runtime/modules/Sudoku.test.ts#L31

Problem 1

   sudokuhash 5203023443619947566598935774299257484820907076578288190630264768973183112337

      at checkStatus (test/runtime/modules/Sudoku.test.ts:64:13)

  console.log
    status: is Solved= false

      at checkStatus (test/runtime/modules/Sudoku.test.ts:66:13)

  console.log
    failed as expected

      at Object.<anonymous> (test/runtime/modules/Sudoku.test.ts:84:15)

  console.log
    sudokuhash 0

      at checkStatus (test/runtime/modules/Sudoku.test.ts:64:13)

  console.log
    status: is Solved= false

      at checkStatus (test/runtime/modules/Sudoku.test.ts:66:13)

  console.log
    sudokuhash 0

      at checkStatus (test/runtime/modules/Sudoku.test.ts:64:13)

Log makes no sense, despite any updates the sudoku hash changes to 0 after failed submission

Problem 2

transaction.sender not matching the sender key

 console.log
    solved by: B62qrmXvDwk7PGeKUbdmBtVsGrBqeq3sjKTP37yKFkxzXi8guiKmn9c

From smart contract based on: this.transaction.sender.value

The sender key set in test suite is B62qqMrK2WzXvzDtSD5Lz8rgHRy6FoPpFB2dSMUjF9mzLZeMydobAKD

Ref

https://protokit.dev/docs/advanced/protocol#working-with-custom-state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant