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

Tutorial 1 expected assert_equal output is incorrectly output as hexadecimal #865

Closed
barriebyron opened this issue Apr 24, 2023 · 1 comment · Fixed by #902
Closed

Tutorial 1 expected assert_equal output is incorrectly output as hexadecimal #865

barriebyron opened this issue Apr 24, 2023 · 1 comment · Fixed by #902
Labels
bug Something isn't working

Comments

@barriebyron
Copy link
Contributor

barriebyron commented Apr 24, 2023

Run Tutorial 1

on Mina zkApp CLI 0.6.4 and SnarkyJS 0.8.0.

For this step:

Now let's try adding a transaction that should fail - updating the state to 75. Now that num is in state 9, updating should only be possible with 81.

The expected output at this part of the tutorial for running:
npm run build && node build/src/main.js
is

SnarkyJS loaded
state after init: 3
state after txn1: 9
assert_equal: 75 != 81
state after txn2: 9
Shutting down

But... surprise! when I run the command, the output incorrectly includes hexadecimal values:

➜  01-hello-world git:(main) ✗ npm run build && node build/src/main.js

> 01-hello-world@0.1.0 build
> tsc

SnarkyJS loaded
state after init: 3
state after txn1: 9
Shutting down
➜  01-hello-world git:(main) ✗ npm run build && node build/src/main.js

> 01-hello-world@0.1.0 build
> tsc

SnarkyJS loaded
state after init: 3
state after txn1: 9
assert_equal: 0x000000000000000000000000000000000000000000000000000000000000004B != 0x0000000000000000000000000000000000000000000000000000000000000051
state after txn2: 9
Shutting down
➜  01-hello-world git:(main)
@barriebyron barriebyron added the bug Something isn't working label Apr 24, 2023
@barriebyron barriebyron changed the title Tutorial 1 expected output 75 is incorrectly output as hexadecimal Tutorial 1 expected assert_equal output is incorrectly output as hexadecimal Apr 24, 2023
@mitschabaude
Copy link
Member

heads up: this PR will change the output to

Field.assertEquals(): 75 != 81

do you agree that output is better @barriebyron?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants