Need help to Block Endpoint

Hello,

I’m trying to confirm if mine rosetta-api implementation is good.
when i’m running the rosetta-cli i’m getting:

loaded configuration file: rosetta-cli-conf/mainnet/config.json
badger 2022/03/12 08:36:50 INFO: All 0 tables opened in 0s
2022/03/12 08:36:50 Loading previously seen accounts (this could take a while)...
Initialized reconciler with 0 previously seen accounts
2022/03/12 08:36:50 check:data status server running on port 9090
2022/03/12 08:36:50 Syncing 0-730955
Related Operations key is not implemented. This is fine as long as there is a distinction between sends and receives and no multiple outputs
2022/03/12 08:36:50 error {"code":0,"message":".response.block.transactions[0].operations[0].operation_identifier.index should be \u003e= 0","retriable":false} assertion failed: Error.Message does not match message from /network/options: expected Endpoint not implemented actual .response.block.transactions[0].operations[0].operation_identifier.index should be >= 0
2022/03/12 08:36:50 check:data status server shutting down
[MEMORY] Heap: 1105.098335MB Stack: 0.531250MB System: 1259.757118MB GCs: 6


Error: unable to fetch block 3: request failed: /block {"index":3} {Code:0 Message:.response.block.transactions[0].operations[0].operation_identifier.index should be >= 0 Description:<nil> Retriable:false Details:map[]}: unable to sync to 730955: unable to sync to 730955

+--------------------+--------------------------------+------------+
|  CHECK:DATA TESTS  |          DESCRIPTION           |   STATUS   |
+--------------------+--------------------------------+------------+
| Request/Response   | Rosetta implementation         | FAILED     |
|                    | serviced all requests          |            |
+--------------------+--------------------------------+------------+
| Response Assertion | All responses are correctly    | PASSED     |
|                    | formatted                      |            |
+--------------------+--------------------------------+------------+
| Block Syncing      | Blocks are connected into a    | FAILED     |
|                    | single canonical chain         |            |
+--------------------+--------------------------------+------------+
| Balance Tracking   | Account balances did not go    | PASSED     |
|                    | negative                       |            |
+--------------------+--------------------------------+------------+
| Reconciliation     | No balance discrepencies were  | NOT TESTED |
|                    | found between computed and     |            |
|                    | live balances                  |            |
+--------------------+--------------------------------+------------+

+--------------------------+--------------------------------+-----------+
|     CHECK:DATA STATS     |          DESCRIPTION           |   VALUE   |
+--------------------------+--------------------------------+-----------+
| Blocks                   | # of blocks synced             |         1 |
+--------------------------+--------------------------------+-----------+
| Orphans                  | # of blocks orphaned           |         0 |
+--------------------------+--------------------------------+-----------+
| Transactions             | # of transaction processed     |         1 |
+--------------------------+--------------------------------+-----------+
| Operations               | # of operations processed      |         1 |
+--------------------------+--------------------------------+-----------+
| Accounts                 | # of accounts seen             |         0 |
+--------------------------+--------------------------------+-----------+
| Active Reconciliations   | # of reconciliations performed |         0 |
|                          | after seeing an account in a   |           |
|                          | block                          |           |
+--------------------------+--------------------------------+-----------+
| Inactive Reconciliations | # of reconciliations performed |         0 |
|                          | on randomly selected accounts  |           |
+--------------------------+--------------------------------+-----------+
| Exempt Reconciliations   | # of reconciliation failures   |         0 |
|                          | considered exempt              |           |
+--------------------------+--------------------------------+-----------+
| Failed Reconciliations   | # of reconciliation failures   |         0 |
+--------------------------+--------------------------------+-----------+
| Skipped Reconciliations  | # of reconciliations skipped   |         0 |
+--------------------------+--------------------------------+-----------+
| Reconciliation Coverage  | % of accounts that have been   | 0.000000% |
|                          | reconciled                     |           |
+--------------------------+--------------------------------+-----------+

badger 2022/03/12 08:36:51 INFO: Storing value log head: {Fid:0 Len:29 Offset:1210}
Error: unable to fetch block 3: request failed: /block {"index":3} {Code:0 Message:.response.block.transactions[0].operations[0].operation_identifier.index should be >= 0 Description:<nil> Retriable:false Details:map[]}: unable to sync to 730955: unable to sync to 730955
Usage:
  rosetta-cli check:data [flags]

Flags:
      --asserter-configuration-file string   Check that /network/options matches contents of file at this path
  -h, --help                                 help for check:data

Global Flags:
      --block-profile string        Save the pprof block profile in the specified file
      --configuration-file string   Configuration file that provides connection and test settings.
                                    If you would like to generate a starter configuration file (populated
                                    with the defaults), run rosetta-cli configuration:create.

                                    Any fields not populated in the configuration file will be populated with
                                    default values.
      --cpu-profile string          Save the pprof cpu profile in the specified file
      --mem-profile string          Save the pprof mem profile in the specified file

Command Failed: unable to fetch block 3: request failed: /block {"index":3} {Code:0 Message:.response.block.transactions[0].operations[0].operation_identifier.index should be >= 0 Description:<nil> Retriable:false Details:map[]}: unable to sync to 730955: unable to sync to 730955
root@db-rosetta:~/rosetta-euno# rosetta-cli check:data --configuration-file rosetta-cli-conf/mainnet/config.json
loaded configuration file: rosetta-cli-conf/mainnet/config.json
badger 2022/03/12 08:39:28 INFO: All 1 tables opened in 1ms
badger 2022/03/12 08:39:28 INFO: Replaying file id: 0 at offset: 1239
badger 2022/03/12 08:39:28 INFO: Replay took: 3.241µs
2022/03/12 08:39:28 Loading previously seen accounts (this could take a while)...
Initialized reconciler with 0 previously seen accounts
2022/03/12 08:39:28 Added &{Index:0 Hash:0000009ea234b1ab29f0172e4d85884a45c0c638192c9c0f781bda67908d56dd} to cache
2022/03/12 08:39:28 check:data status server running on port 9090
2022/03/12 08:39:28 Syncing 1-730958
2022/03/12 08:39:28 error {"code":0,"message":".response.block.transactions[0].operations[0].operation_identifier.index should be \u003e= 0","retriable":false} assertion failed: Error.Message does not match message from /network/options: expected Endpoint not implemented actual .response.block.transactions[0].operations[0].operation_identifier.index should be >= 0
2022/03/12 08:39:28 check:data status server shutting down
[MEMORY] Heap: 1105.105965MB Stack: 0.500000MB System: 1259.507118MB GCs: 6
badger 2022/03/12 08:39:29 INFO: [Compactor: 0] Running compaction: {level:0 score:1 dropPrefixes:[]} for level: 0
badger 2022/03/12 08:39:29 INFO: LOG Compact 0->1, del 1 tables, add 1 tables, took 12.643525ms
badger 2022/03/12 08:39:29 INFO: [Compactor: 0] Compaction for level: 0 DONE


Error: unable to fetch block 1: request failed: /block {"index":1} {Code:0 Message:.response.block.transactions[0].operations[0].operation_identifier.index should be >= 0 Description:<nil> Retriable:false Details:map[]}: unable to sync to 730958: unable to sync to 730958

+--------------------+--------------------------------+------------+
|  CHECK:DATA TESTS  |          DESCRIPTION           |   STATUS   |
+--------------------+--------------------------------+------------+
| Request/Response   | Rosetta implementation         | FAILED     |
|                    | serviced all requests          |            |
+--------------------+--------------------------------+------------+
| Response Assertion | All responses are correctly    | PASSED     |
|                    | formatted                      |            |
+--------------------+--------------------------------+------------+
| Block Syncing      | Blocks are connected into a    | FAILED     |
|                    | single canonical chain         |            |
+--------------------+--------------------------------+------------+
| Balance Tracking   | Account balances did not go    | PASSED     |
|                    | negative                       |            |
+--------------------+--------------------------------+------------+
| Reconciliation     | No balance discrepencies were  | NOT TESTED |
|                    | found between computed and     |            |
|                    | live balances                  |            |
+--------------------+--------------------------------+------------+

+--------------------------+--------------------------------+-----------+
|     CHECK:DATA STATS     |          DESCRIPTION           |   VALUE   |
+--------------------------+--------------------------------+-----------+
| Blocks                   | # of blocks synced             |         1 |
+--------------------------+--------------------------------+-----------+
| Orphans                  | # of blocks orphaned           |         0 |
+--------------------------+--------------------------------+-----------+
| Transactions             | # of transaction processed     |         1 |
+--------------------------+--------------------------------+-----------+
| Operations               | # of operations processed      |         1 |
+--------------------------+--------------------------------+-----------+
| Accounts                 | # of accounts seen             |         0 |
+--------------------------+--------------------------------+-----------+
| Active Reconciliations   | # of reconciliations performed |         0 |
|                          | after seeing an account in a   |           |
|                          | block                          |           |
+--------------------------+--------------------------------+-----------+
| Inactive Reconciliations | # of reconciliations performed |         0 |
|                          | on randomly selected accounts  |           |
+--------------------------+--------------------------------+-----------+
| Exempt Reconciliations   | # of reconciliation failures   |         0 |
|                          | considered exempt              |           |
+--------------------------+--------------------------------+-----------+
| Failed Reconciliations   | # of reconciliation failures   |         0 |
+--------------------------+--------------------------------+-----------+
| Skipped Reconciliations  | # of reconciliations skipped   |         0 |
+--------------------------+--------------------------------+-----------+
| Reconciliation Coverage  | % of accounts that have been   | 0.000000% |
|                          | reconciled                     |           |
+--------------------------+--------------------------------+-----------+

Error: unable to fetch block 1: request failed: /block {"index":1} {Code:0 Message:.response.block.transactions[0].operations[0].operation_identifier.index should be >= 0 Description:<nil> Retriable:false Details:map[]}: unable to sync to 730958: unable to sync to 730958
Usage:
  rosetta-cli check:data [flags]

Flags:
      --asserter-configuration-file string   Check that /network/options matches contents of file at this path
  -h, --help                                 help for check:data

Global Flags:
      --block-profile string        Save the pprof block profile in the specified file
      --configuration-file string   Configuration file that provides connection and test settings.
                                    If you would like to generate a starter configuration file (populated
                                    with the defaults), run rosetta-cli configuration:create.

                                    Any fields not populated in the configuration file will be populated with
                                    default values.
      --cpu-profile string          Save the pprof cpu profile in the specified file
      --mem-profile string          Save the pprof mem profile in the specified file

Command Failed: unable to fetch block 1: request failed: /block {"index":1} {Code:0 Message:.response.block.transactions[0].operations[0].operation_identifier.index should be >= 0 Description:<nil> Retriable:false Details:map[]}: unable to sync to 730958: unable to sync to 730958
root@db-rosetta:~/rosetta-euno# rm -rf cli-data/
root@db-rosetta:~/rosetta-euno# rosetta-cli check:data --configuration-file rosetta-cli-conf/mainnet/config.json
loaded configuration file: rosetta-cli-conf/mainnet/config.json
badger 2022/03/12 08:39:39 INFO: All 0 tables opened in 0s
2022/03/12 08:39:39 Loading previously seen accounts (this could take a while)...
Initialized reconciler with 0 previously seen accounts
2022/03/12 08:39:39 check:data status server running on port 9090
2022/03/12 08:39:39 Syncing 0-730958
Related Operations key is not implemented. This is fine as long as there is a distinction between sends and receives and no multiple outputs
2022/03/12 08:39:39 error {"code":0,"message":".response.block.transactions[0].operations[0].operation_identifier.index should be \u003e= 0","retriable":false} assertion failed: Error.Message does not match message from /network/options: expected Endpoint not implemented actual .response.block.transactions[0].operations[0].operation_identifier.index should be >= 0
2022/03/12 08:39:39 check:data status server shutting down
[MEMORY] Heap: 1105.098480MB Stack: 0.500000MB System: 1259.757118MB GCs: 6


Error: unable to fetch block 2: request failed: /block {"index":2} {Code:0 Message:.response.block.transactions[0].operations[0].operation_identifier.index should be >= 0 Description:<nil> Retriable:false Details:map[]}: unable to sync to 730958: unable to sync to 730958

+--------------------+--------------------------------+------------+
|  CHECK:DATA TESTS  |          DESCRIPTION           |   STATUS   |
+--------------------+--------------------------------+------------+
| Request/Response   | Rosetta implementation         | FAILED     |
|                    | serviced all requests          |            |
+--------------------+--------------------------------+------------+
| Response Assertion | All responses are correctly    | PASSED     |
|                    | formatted                      |            |
+--------------------+--------------------------------+------------+
| Block Syncing      | Blocks are connected into a    | FAILED     |
|                    | single canonical chain         |            |
+--------------------+--------------------------------+------------+
| Balance Tracking   | Account balances did not go    | PASSED     |
|                    | negative                       |            |
+--------------------+--------------------------------+------------+
| Reconciliation     | No balance discrepencies were  | NOT TESTED |
|                    | found between computed and     |            |
|                    | live balances                  |            |
+--------------------+--------------------------------+------------+

+--------------------------+--------------------------------+-----------+
|     CHECK:DATA STATS     |          DESCRIPTION           |   VALUE   |
+--------------------------+--------------------------------+-----------+
| Blocks                   | # of blocks synced             |         1 |
+--------------------------+--------------------------------+-----------+
| Orphans                  | # of blocks orphaned           |         0 |
+--------------------------+--------------------------------+-----------+
| Transactions             | # of transaction processed     |         1 |
+--------------------------+--------------------------------+-----------+
| Operations               | # of operations processed      |         1 |
+--------------------------+--------------------------------+-----------+
| Accounts                 | # of accounts seen             |         0 |
+--------------------------+--------------------------------+-----------+
| Active Reconciliations   | # of reconciliations performed |         0 |
|                          | after seeing an account in a   |           |
|                          | block                          |           |
+--------------------------+--------------------------------+-----------+
| Inactive Reconciliations | # of reconciliations performed |         0 |
|                          | on randomly selected accounts  |           |
+--------------------------+--------------------------------+-----------+
| Exempt Reconciliations   | # of reconciliation failures   |         0 |
|                          | considered exempt              |           |
+--------------------------+--------------------------------+-----------+
| Failed Reconciliations   | # of reconciliation failures   |         0 |
+--------------------------+--------------------------------+-----------+
| Skipped Reconciliations  | # of reconciliations skipped   |         0 |
+--------------------------+--------------------------------+-----------+
| Reconciliation Coverage  | % of accounts that have been   | 0.000000% |
|                          | reconciled                     |           |
+--------------------------+--------------------------------+-----------+

badger 2022/03/12 08:39:40 INFO: Storing value log head: {Fid:0 Len:29 Offset:1210}
Error: unable to fetch block 2: request failed: /block {"index":2} {Code:0 Message:.response.block.transactions[0].operations[0].operation_identifier.index should be >= 0 Description:<nil> Retriable:false Details:map[]}: unable to sync to 730958: unable to sync to 730958
Usage:
  rosetta-cli check:data [flags]

Flags:
      --asserter-configuration-file string   Check that /network/options matches contents of file at this path
  -h, --help                                 help for check:data

Global Flags:
      --block-profile string        Save the pprof block profile in the specified file
      --configuration-file string   Configuration file that provides connection and test settings.
                                    If you would like to generate a starter configuration file (populated
                                    with the defaults), run rosetta-cli configuration:create.

                                    Any fields not populated in the configuration file will be populated with
                                    default values.
      --cpu-profile string          Save the pprof cpu profile in the specified file
      --mem-profile string          Save the pprof mem profile in the specified file

Command Failed: unable to fetch block 2: request failed: /block {"index":2} {Code:0 Message:.response.block.transactions[0].operations[0].operation_identifier.index should be >= 0 Description:<nil> Retriable:false Details:map[]}: unable to sync to 730958: unable to sync to 730958

In postman the result of a block looks like:
Can someone help me to find the problem…

JSON request from postman is:

{
    "block": {
        "block_identifier": {
            "index": 3,
            "hash": "00000068c015cfd17deafbc93268aaed9b1eab9724366d737131c6f78a8edc13"
        },
        "parent_block_identifier": {
            "index": 3,
            "hash": "00000068c015cfd17deafbc93268aaed9b1eab9724366d737131c6f78a8edc13"
        },
        "timestamp": 1647074698679,
        "transactions": [
            {
                "transaction_identifier": {
                    "hash": "8fbfb7146e411ce84c5546b40817b17a859048e5153b1a763c38967e4db4d0da"
                },
                "operations": [
                    {
                        "operation_identifier": {
                            "index": 0
                        },
                        "type": "Coinbase",
                        "status": "SUCCESS"
                    }
                ]
            }
        ]
    }
}

/network/options

{
    "version": {
        "rosetta_version": "1.4.10",
        "node_version": "2.0.2"
    },
    "allow": {
        "operation_statuses": [
            {
                "status": "SUCCESS",
                "successful": true
            },
            {
                "status": "SKIPPED",
                "successful": false
            }
        ],
        "operation_types": [
            "Transfer",
            "Coinbase"
        ],
        "errors": [
            {
                "code": 0,
                "message": "Endpoint not implemented",
                "retriable": false
            },
            {
                "code": 1,
                "message": "Endpoint unavailable offline",
                "retriable": false
            },
            {
                "code": 2,
                "message": "Eunod is not ready",
                "retriable": true
            },
            {
                "code": 3,
                "message": "Eunod error",
                "retriable": false
            },
            {
                "code": 4,
                "message": "Block not found",
                "retriable": false
            },
            {
                "code": 5,
                "message": "Unable to derive address",
                "retriable": false
            },
            {
                "code": 6,
                "message": "Unable to parse intent",
                "retriable": true
            },
            {
                "code": 7,
                "message": "Unable to parse intermediate result",
                "retriable": false
            },
            {
                "code": 8,
                "message": "Missing ScriptPubKeys",
                "retriable": false
            },
            {
                "code": 9,
                "message": "Coin is invalid",
                "retriable": false
            },
            {
                "code": 10,
                "message": "Unable to decode address",
                "retriable": false
            },
            {
                "code": 11,
                "message": "Unable to decode ScriptPubKey",
                "retriable": false
            },
            {
                "code": 12,
                "message": "Unable to calculate signature hash",
                "retriable": false
            },
            {
                "code": 13,
                "message": "Script type is not supported",
                "retriable": false
            },
            {
                "code": 14,
                "message": "Unable to compute PK script",
                "retriable": false
            },
            {
                "code": 15,
                "message": "Unable to get coins",
                "retriable": false
            },
            {
                "code": 16,
                "message": "Transaction not found",
                "retriable": false
            },
            {
                "code": 17,
                "message": "Could not get suggested fee rate",
                "retriable": false
            },
            {
                "code": 18,
                "message": "Unable to get balance",
                "retriable": false
            },
            {
                "code": 19,
                "message": "Invalid request format",
                "retriable": false
            }
        ],
        "call_methods": [],
        "balance_exemptions": [],
        "historical_balance_lookup": false,
        "mempool_coins": false
    }
}

problem has been solved.

Hi! What solution did you find to solve the problem?

Hello @rosiex98 ,

I have got the Rosetta-Bitcoin version worked for PIVX fork. With that all test is passed.

1 Like