MinaFoundation / mina

Not the official repo. See https://github.com/MinaProtocol/mina
https://github.com/MinaProtocol/mina
Apache License 2.0
1 stars 0 forks source link

Investigate the errors in the simplified Rosetta integration script #100

Closed Sventimir closed 1 year ago

Sventimir commented 1 year ago

There's a PR from O(1) Labds, which aims at simplifying the Rosetta integration test, because at the moment it takes a lot of time and has functional dependency on o1js, which we'd rather to avoid. Unfortunately, the script fails at the moment. We need to investigate, why this happens and fix it.

Sventimir commented 1 year ago

Rosetta-cli seems to be doing something strange here. Some excerpts from logs:

========================= ROSETTA CLI: CHECK:SPEC ===========================
loaded configuration file: /tmp/rosetta-cli-config/config.json
[...]
2023-10-17 09:59:30 UTC [Warn] Error response: $error
        error: {
  "code": 9,
  "message": "Block not found",
  "description":
    "We couldn't find the block in the archive node, specified by parent block of: (no height or hash given). Ask a friend for the missing data.",
  "retriable": true,
  "details": {
    "body": [ "Block_missing", "parent block of: (no height or hash given)" ],
    "error":
      "We couldn't find the block in the archive node, specified by parent block of: (no height or hash given). Ask a friend for the missing data."
  }
}

Rosetta complains here about bad user input. Rosetta-cli seems to be constructing malformed requests for some reason…

2023-10-17 09:59:30 UTC [Warn] Error response: $error                                                                                                                                                      [682/1893]
        error: {
  "code": 1,
  "message": "SQL failure",
  "description": "We encountered a SQL failure.",
  "retriable": false,
  "details": {
    "body": [
      "Sql",
      "Cannot decode int from <postgres://pguser:_@127.0.0.1:5432/archive>: Invalid value \"f\"."
    ],
    "error":
      "Cannot decode int from <postgres://pguser:_@127.0.0.1:5432/archive>: Invalid value \"f\".",
    "extra": "Finding zkapp account updates within command"
  }
}
unable to fetch tip block: /block {} error {Code:1 Message:SQL failure Description:0xc0004d3320 Retriable:false Details:map[body:[Sql Cannot decode int from <postgres://pguser:_@127.0.0.1:5432/archive>: Invalid va
lue "f".] error:Cannot decode int from <postgres://pguser:_@127.0.0.1:5432/archive>: Invalid value "f". extra:Finding zkapp account updates within command]}: request failed

This one looks like a legitimate error in Rosetta, one where Rosetta expects an integer, but a boolean is found instead in the DB.

2023-10-17 09:59:30 UTC [Warn] Error response: $error
        error: {
  "code": 4,
  "message": "Network doesn't exist",
  "description": "The network doesn't exist.",
  "retriable": false,
  "details": {
    "body": [ "Network_doesn't_exist", ":", "mina:sandbox" ],
    "error":
      "You are requesting the status for the network :, but you are connected to the network mina:sandbox\n"
  }
}

This one is super strange. This error repeats itself multiple times. It says that the network has name mina:sandbox, but rosetta-cli expected : instead. Rosetta-cli has this name hard-coded in the configuration and I checked that it is given correctly, so it seems to be a problem in rosetta-cli rather than in Rosetta server.

Sventimir commented 1 year ago

Errors are fixed in https://github.com/MinaProtocol/mina/pull/14224.