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

Request for Indexer Output version #76

Open
vataops opened this issue Aug 21, 2024 · 0 comments
Open

Request for Indexer Output version #76

vataops opened this issue Aug 21, 2024 · 0 comments

Comments

@vataops
Copy link

vataops commented Aug 21, 2024

I've configured the indexer based on the latest commit from the ton indexer repository. However, when making requests to the toncenter.com API v3, the output differs from what I expected.

The output from toncenter looks like this:

curl --location 'https://toncenter.com/api/v3/blocks?workchain=-1&limit=1&offset=0&sort=desc'
{
  "blocks": [
    {
      "workchain": -1,
      "shard": "8000000000000000",
      "seqno": 39835027,
      "root_hash": "jCs0btP0ENvfL9r9E1Ts/b+9wi9CjbHyKXJ80xUkrMg=",
      "file_hash": "bJl9DwywBvLKLieMZipogFL3ob+LXRrU4sXCFr3AwSo=",
      "global_id": -239,
      "version": 0,
      "after_merge": false,
      "before_split": false,
      "after_split": false,
      "want_merge": true,
      "want_split": false,
      "key_block": false,
      "vert_seqno_incr": false,
      "flags": 1,
      "gen_utime": "1724212353",
      "start_lt": "48598466000000",
      "end_lt": "48598466000004",
      "validator_list_hash_short": -722980899,
      "gen_catchain_seqno": 598488,
      "min_ref_mc_seqno": 39835021,
      "prev_key_block_seqno": 39833094,
      "vert_seqno": 1,
      "master_ref_seqno": 0,
      "rand_seed": "kwLX4gdbBcv81bfCNmVze9W5MNQ17qSxmKXnuW74ZzQ=",
      "created_by": "X6hBZ+P1yPxp/g5QRPVbYq974YXeXAo1uixAUROC85s=",
      "tx_count": 3,
      "masterchain_block_ref": {
        "workchain": -1,
        "shard": "8000000000000000",
        "seqno": 39835027
      },
      "prev_blocks": [
        {
          "workchain": -1,
          "shard": "8000000000000000",
          "seqno": 39835026
        }
      ]
    }
  ]
}

As you can see, the "blocks" section is at the top and includes prev_block.

curl -X 'GET' 'http://{{ ip }}:8081/blocks?workchain=-1&limit=1&offset=0&sort=desc' -H 'accept: application/json'

However, the indexer I set up produces a different output for the same request:

[
  {
    "workchain": -1,
    "shard": "8000000000000000",
    "seqno": 39835033,
    "root_hash": "6C10174A36573CEC0F6168A0DA8D0A23542585CF3814ED50BF64B5A50AB0EFD6",
    "file_hash": "5FB9785F39C1B01C40D07B74B7D4AC80FD3225EB58EEDC06DB85820CFF32AD17",
    "global_id": -239,
    "version": 0,
    "after_merge": false,
    "before_split": false,
    "after_split": false,
    "want_split": false,
    "key_block": false,
    "vert_seqno_incr": false,
    "flags": 1,
    "gen_utime": "1724212370",
    "start_lt": "48598472000000",
    "end_lt": "48598472000004",
    "validator_list_hash_short": -722980899,
    "gen_catchain_seqno": 598488,
    "min_ref_mc_seqno": 39835030,
    "prev_key_block_seqno": 39833094,
    "vert_seqno": 1,
    "master_ref_seqno": 0,
    "rand_seed": "BCE02176CEBF70E13539695A5EBAB23CE8B18DA7EE8DDB8B17B72CFD828521C6",
    "created_by": "0682303117C86DFEEFE2DA41B49957E81F981AB348262CEDE96961875D18F354",
    "tx_count": 3,
    "masterchain_block_ref": null
  }
]

I want my indexer to match the toncenter output. Can you help me identify which version corresponds to that toncenter output? The latest released version, v0.4.2, has a different Docker Compose configuration from what I’m using.

Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant