Skip to content

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

Description

@laciferin2024

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions