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] TicTacToe example generates extra curly brackets in output #2229

Closed
pekasus opened this issue Jan 6, 2023 · 7 comments · Fixed by AleoNet/snarkVM#1318
Closed

[Bug] TicTacToe example generates extra curly brackets in output #2229

pekasus opened this issue Jan 6, 2023 · 7 comments · Fixed by AleoNet/snarkVM#1318
Labels
bug Something isn't working

Comments

@pekasus
Copy link

pekasus commented Jan 6, 2023

🐛 Bug Report

The output generated from leo run new and leo run make_move includes an extra closing bracket after row 1 and row 2 structs. These have to be deleted when inputting the board into the next leo run make_move.

Steps to Reproduce

Run leo run new inside TicTacToe example.

Code snippet to reproduce

{
  r1: {
    c1: 0u8,
    c2: 0u8,
    c3: 0u8
  }
},
  r2: {
    c1: 0u8,
    c2: 0u8,
    c3: 0u8
  }
},
  r3: {
    c1: 0u8,
    c2: 0u8,
    c3: 0u8
  }
}

Stack trace & error message

Error [ECLI0377014]: Failed to parse the `aleo run` command.
SnarkVM Error: error: Invalid value "{\n  r1: {\n    c1: 0u8,\n    c2: 0u8,\n    c3: 0u8\n  }\n},\n  r2: {\n    c1: 0u8,\n    c2: 0u8,\n    c3: 0u8\n  }\n},\n  r3: {\n    c1: 0u8,\n    c2: 0u8,\n    c3: 0u8\n  }\n}" for '<INPUTS>...': Failed to parse string. Found invalid character in: ",
  r2: {
    c1: 0u8,
    c2: 0u8,
    c3: 0u8
  }
},
  r3: {
    c1: 0u8,
    c2: 0u8,
    c3: 0u8
  }
}"

Expected Behavior

Generate output that can be copied and pasted as input in next round.

Your Environment

  • Leo 1.62
  • Rust 1.66.0
  • MacOS 12.6
@collinc97
Copy link
Collaborator

This is a bug at the snarkVM level.
This issue will be closed after a new version of snarkVM is released and merged into Leo.

@collinc97
Copy link
Collaborator

This was closed prematurely.

@collinc97 collinc97 reopened this Jan 10, 2023
@arosboro
Copy link
Contributor

Looks like this was merged in a related PR by @collinc97 @pekasus can you confirm by re-trying the example after building again and checking his PR out.

@collinc97
Copy link
Collaborator

Looks like this was merged in a related PR by @collinc97 @pekasus can you confirm by re-trying the example after building again and checking his PR out.

Actually that PR only fixes the snarkVM side of this bug. The Leo one still exists. It will be fixed once a new snarkVM version is released and pulled into Leo. After that, I will close this.

@arosboro
Copy link
Contributor

@collinc97 I understand, @pekasus it means we need to wait until https://github.com/AleoHQ/snarkVM/pull/1318 which is included in a release tag for snarkVM and the Cargo.toml of the leo repository is updated to the same tag.

@arosboro
Copy link
Contributor

@collinc97 I am doing a demo of the tic tac toe, e.g. how to write from scratch Friday 2022-01-20 11am EST to 12pm. @pekasus will be assisting. Either way we will refer to this issue regarding having to remove redundant curly brackets while running the example.

@d0cd
Copy link
Collaborator

d0cd commented Feb 21, 2023

The fix is included in the newest Leo release.

@d0cd d0cd closed this as completed Feb 21, 2023
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.

4 participants