Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Back to post

Revisions 7

10 months ago
Jeremy
384 × 5 Administrator
How to query old blocks on TON? Do I need archive node for this?
How to query old blocks on TON? Do I need archive node for this?
The default configuration for ton full node (https://github.com/ton-blockchain/ton/blob/master/validator/validator.h#L95) is to save state for 1 hour. Block related data is saved for 1 week. Both are moved to archive dir after this period. Archive dir is deleted after 1 year. This configuration can be changed and archive nodes for example will deploy their nodes with much bigger values so users can query state at anytime in history. In order to query an old state (more than 1 hour ago) **you will need to use an archive node**. Using the [TON APIv4](https://github.com/ton-foundation/ton-api-v4), you can query `GET /block/<seqno>/<address>/run/<method>/<args?>` which can be used with `method=get_wallet_data` to query jetton balance. In [Toncenter](https://toncenter.com/api/v2/) for example, it is not possible to query a method from old states. However, you can use `getTransactions` with `archival=true` to get all transactions and calculate the exact amount on each state. Transactions in non archive (default) nodes will be stored for 1 week.
THe default configuration for ton full node (https://github.com/ton-blockchain/ton/blob/master/validator/validator.h#L95) is to save state for 1 hour. Block related data is saved for 1 week. Both are moved to archive dir after this period. Archive dir is deleted after 1 year. This configuration can be changed and archive nodes for example will deploy their nodes with much bigger values so users can query state at anytime in history. In order to query an old state (more than 1 hour ago) **you will need to use an archive node**. Using the [TON APIv4](https://github.com/ton-foundation/ton-api-v4), you can query `GET /block/<seqno>/<address>/run/<method>/<args?>` which can be used with `method=get_wallet_data` to query jetton balance. In [Toncenter](https://toncenter.com/api/v2/) for example, it is not possible to query a method from old states. However, you can use `getTransactions` with `archival=true` to get all transactions and calculate the exact amount on each state. Transactions in non archive (default) nodes will be stored for 1 week.
10 months ago
How to query old blocks on TON? Do I need archive node for this?
How to query old blocks on TON? Do I need archive node for this?
THe default configuration for ton full node (https://github.com/ton-blockchain/ton/blob/master/validator/validator.h#L95) is to save state for 1 hour. Block related data is saved for 1 week. Both are moved to archive dir after this period. Archive dir is deleted after 1 year. This configuration can be changed and archive nodes for example will deploy their nodes with much bigger values so users can query state at anytime in history. In order to query an old state (more than 1 hour ago) **you will need to use an archive node**. Using the [TON APIv4](https://github.com/ton-foundation/ton-api-v4), you can query `GET /block/<seqno>/<address>/run/<method>/<args?>` which can be used with `method=get_wallet_data` to query jetton balance. In [Toncenter](https://toncenter.com/api/v2/) for example, it is not possible to query a method from old states. However, you can use `getTransactions` with `archival=true` to get all transactions and calculate the exact amount on each state. Transactions in non archive (default) nodes will be stored for 1 week.
Default configuration for ton full node (https://github.com/ton-blockchain/ton/blob/master/validator/validator.h#L95) is to save state for 1 hour, block related data is saved for 1 week and both are moved to archive dir after this period. Archive dir is deleted after 1 year. This configuration can be changed and archive nodes for example will deploy their nodes with much bigger values so users can query state at anytime in history. In order to query an old state (more than 1 hour ago) you will need to use an archive node. https://github.com/ton-foundation/ton-api-v4 expose `GET /block/<seqno>/<address>/run/<method>/<args?>` which can be used with method=get_wallet_data to query jetton balance. In Toncenter for example (https://toncenter.com/api/v2/) it is not possible to query method in old states. However, you can use getTransactions with arcihval=true to get all transactions and calculate the exact amount on each state. Transactions in non archive (default) nodes will be stored for 1 week.
one year ago
How to query old blocks on TON? Do I need archive node for this?
How to query old blocks on TON? Do I need archive node for this?
Default configuration for ton full node (https://github.com/ton-blockchain/ton/blob/master/validator/validator.h#L95) is to save state for 1 hour, block related data is saved for 1 week and both are moved to archive dir after this period. Archive dir is deleted after 1 year. This configuration can be changed and archive nodes for example will deploy their nodes with much bigger values so users can query state at anytime in history. In order to query an old state (more than 1 hour ago) you will need to use an archive node. https://github.com/ton-foundation/ton-api-v4 expose `GET /block/<seqno>/<address>/run/<method>/<args?>` which can be used with method=get_wallet_data to query jetton balance. In Toncenter for example (https://toncenter.com/api/v2/) it is not possible to query method in old states. However, you can use getTransactions with arcihval=true to get all transactions and calculate the exact amount on each state. Transactions in non archive (default) nodes will be stored for 1 week.
Default configuration for ton full node (https://github.com/ton-blockchain/ton/blob/master/validator/validator.h#L95) is to save state for 1 hour, block related data is saved for 1 week and both are moved to archive dir after this period. Archive dir is deleted after 1 year. This configuration can be changed and archive nodes for example will deploy their nodes with much bigger values so users can query state at anytime in history. In order to query an old state (more than 1 hour ago) you will need to use an archive node. https://github.com/ton-foundation/ton-api-v4 expose `GET /block/<seqno>/<address>/run/<method>/<args?>` which can be used with method=get_wallet_data to query jetton balance. In Toncenter for example (https://toncenter.com/api/v2/) it is not possible to query method in very old states. However, you can use getTransactions with arcihval=true to get all transactions and calculate the exact amount on each state. Transactions in non archive (default) nodes will be stored for 1 week.
one year ago
Tal Kol
340 × 3 Administrator
How to query old blocks on TON? Do I need archive node for this?
How to query old blocks on TON? Do I need archive node for this?
Default configuration for ton full node (https://github.com/ton-blockchain/ton/blob/master/validator/validator.h#L95) is to save state for 1 hour, block related data is saved for 1 week and both are moved to archive dir after this period. Archive dir is deleted after 1 year. This configuration can be changed and archive nodes for example will deploy their nodes with much bigger values so users can query state at anytime in history. In order to query an old state (more than 1 hour ago) you will need to use an archive node. https://github.com/ton-foundation/ton-api-v4 expose `GET /block/<seqno>/<address>/run/<method>/<args?>` which can be used with method=get_wallet_data to query jetton balance. In Toncenter for example (https://toncenter.com/api/v2/) it is not possible to query method in very old states. However, you can use getTransactions with arcihval=true to get all transactions and calculate the exact amount on each state. Transactions in non archive (default) nodes will be stored for 1 week.
The default configuration for a TON full node ([see source code](https://github.com/ton-blockchain/ton/blob/d11580dfb3b81ea5d00775502737d59c155adfb2/validator/validator.h#L95)) is to save state for 1 hour and block related data for 1 week. Both are moved to the archive dir after this period. Archive dir is deleted after 1 year. This configuration can be changed and archive nodes for example will deploy their nodes with much larger configuration values so users can query state at any time in history. In order to query an old state (more than 1 hour ago) you will need to use an archive node. ### TonHub API v4 https://github.com/ton-foundation/ton-api-v4 ``` GET /block/<seqno>/<address>/run/<method>/<args?> ``` This API can be used with method = `get_wallet_data` to query jetton balance from an old block. It seems that the TonHub endpoint currently supports archive calls but this is not documented as a guaranteed feature. ### TonCenter HTTP API https://toncenter.com/api/v2/ I didn't see in TonCenter API a way to use archive node so it is not probably possible to query very old state. However, you can query the list of transactions which are stored for 1 week to calculate the exact amount on each state update during the last week and work back the solution.
one year ago
Tal Kol
340 × 3 Administrator
How to query old blocks on TON? Do I need archive node for this?
How to query old blocks on TON? Do I need archive node for this?
The default configuration for a TON full node ([see source code](https://github.com/ton-blockchain/ton/blob/d11580dfb3b81ea5d00775502737d59c155adfb2/validator/validator.h#L95)) is to save state for 1 hour and block related data for 1 week. Both are moved to the archive dir after this period. Archive dir is deleted after 1 year. This configuration can be changed and archive nodes for example will deploy their nodes with much larger configuration values so users can query state at any time in history. In order to query an old state (more than 1 hour ago) you will need to use an archive node. ### TonHub API v4 https://github.com/ton-foundation/ton-api-v4 ``` GET /block/<seqno>/<address>/run/<method>/<args?> ``` This API can be used with method = `get_wallet_data` to query jetton balance from an old block. It seems that the TonHub endpoint currently supports archive calls but this is not documented as a guaranteed feature. ### TonCenter HTTP API https://toncenter.com/api/v2/ I didn't see in TonCenter API a way to use archive node so it is not probably possible to query very old state. However, you can query the list of transactions which are stored for 1 week to calculate the exact amount on each state update during the last week and work back the solution.
The default configuration for a TON full node (https://github.com/ton-blockchain/ton/blob/master/validator/validator.h#L95) is to save state for 1 hour and block related data for 1 week. Both are moved to the archive dir after this period. Archive dir is deleted after 1 year. This configuration can be changed and archive nodes for example will deploy their nodes with much larger configuration values so users can query state at any time in history. In order to query an old state (more than 1 hour ago) you will need to use an archive node. https://github.com/ton-foundation/ton-api-v4 exposes `GET /block/<seqno>/<address>/run/<method>/<args?>` which can be used with method=get_wallet_data to query jetton balance. Toncenter for example (https://toncenter.com/api/v2/) does not use archive node so it is not possible to query very old state. However, you can use transactions which are stored for 1 week to calculate the exact amount on each state for the last week.
one year ago
How to query old blocks on TON? Do I need archive node for this?
How to query old blocks on TON? Do I need archive node for this?
The default configuration for a TON full node (https://github.com/ton-blockchain/ton/blob/master/validator/validator.h#L95) is to save state for 1 hour and block related data for 1 week. Both are moved to the archive dir after this period. Archive dir is deleted after 1 year. This configuration can be changed and archive nodes for example will deploy their nodes with much larger configuration values so users can query state at any time in history. In order to query an old state (more than 1 hour ago) you will need to use an archive node. https://github.com/ton-foundation/ton-api-v4 exposes `GET /block/<seqno>/<address>/run/<method>/<args?>` which can be used with method=get_wallet_data to query jetton balance. Toncenter for example (https://toncenter.com/api/v2/) does not use archive node so it is not possible to query very old state. However, you can use transactions which are stored for 1 week to calculate the exact amount on each state for the last week.
Default configuration for ton full node (https://github.com/ton-blockchain/ton/blob/master/validator/validator.h#L95) is to save state for 1 hour, block related data is saved for 1 week and both are moved to archive dir after this period. Archive dir is deleted after 1 year. This configuration can be changed and archive nodes for example will deploy their nodes with much bigger values so users can query state at anytime in history. In order to query an old state (more than 1 hour ago) you will need to use an archive node. https://github.com/ton-foundation/ton-api-v4 expose `GET /block/<seqno>/<address>/run/<method>/<args?>` which can be used with method=get_wallet_data to query jetton balance. Toncenter for example (https://toncenter.com/api/v2/) does not use archive node so it is not possible to query very old state. However, you can use transactions which are stored for 1 week to calculate the exact amount on each state for the last week.
one year ago
Original
How to query old blocks on TON? Do I need archive node for this?

Default configuration for ton full node (https://github.com/ton-blockchain/ton/blob/master/validator/validator.h#L95) is to save state for 1 hour, block related data is saved for 1 week and both are moved to archive dir after this period. Archive dir is deleted after 1 year. This configuration can be changed and archive nodes for example will deploy their nodes with much bigger values so users can query state at anytime in history. In order to query an old state (more than 1 hour ago) you will need to use an archive node. https://github.com/ton-foundation/ton-api-v4 expose `GET /block/<seqno>/<address>/run/<method>/<args?>` which can be used with method=get_wallet_data to query jetton balance. Toncenter for example (https://toncenter.com/api/v2/) does not use archive node so it is not possible to query very old state. However, you can use transactions which are stored for 1 week to calculate the exact amount on each state for the last week.