Skip to content

feat(foundations): add Tact block proof validation guide#2001

Draft
delovoyhomie wants to merge 1 commit intomainfrom
Merkle-proofs
Draft

feat(foundations): add Tact block proof validation guide#2001
delovoyhomie wants to merge 1 commit intomainfrom
Merkle-proofs

Conversation

@delovoyhomie
Copy link
Copy Markdown
Contributor

@delovoyhomie delovoyhomie commented Mar 23, 2026

Closes #1839

@mintlify
Copy link
Copy Markdown

mintlify bot commented Mar 23, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mintlify-ton-docs 🟢 Ready View Preview Mar 23, 2026, 11:52 AM

@delovoyhomie
Copy link
Copy Markdown
Contributor Author

/review

## Trade-offs and assumptions

- Basechain only. `getShardRootHash` always reads `shardHashes.get(0)`.
- Recent masterchain blocks only. `PREVMCBLOCKS` exposes only the last 16 masterchain blocks.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually you can use PREVMCBKLOCKS_100, that will give more space


## Trade-offs and assumptions

- Basechain only. `getShardRootHash` always reads `shardHashes.get(0)`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but can be easily done for masterchain


- Basechain only. `getShardRootHash` always reads `shardHashes.get(0)`.
- Recent masterchain blocks only. `PREVMCBLOCKS` exposes only the last 16 masterchain blocks.
- `ShardStateUnsplit` only. The code does not handle split shard states.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, it needs to be researched, I've never seen other type there. There is the chance, that the structure is always ShardStateUnsplit

- Basechain only. `getShardRootHash` always reads `shardHashes.get(0)`.
- Recent masterchain blocks only. `PREVMCBLOCKS` exposes only the last 16 masterchain blocks.
- `ShardStateUnsplit` only. The code does not handle split shard states.
- Active accounts only. `parseStateFromShardAccount` assumes `AccountActive`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, but may be fixed. In any case, why one would need to proof inactive account?

- Recent masterchain blocks only. `PREVMCBLOCKS` exposes only the last 16 masterchain blocks.
- `ShardStateUnsplit` only. The code does not handle split shard states.
- Active accounts only. `parseStateFromShardAccount` assumes `AccountActive`.
- No `StateInit` library support. The parser reads only `code` and `data`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid point, can be fixed actually by correct StateInit parsing

Copy link
Copy Markdown
Collaborator

@novusnota novusnota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, but:

  1. Page should be named block-proof-validation.mdx, without a specific language prefix.
  2. Let's switch from Tact to Tolk. We're currently trying to make the whole documentation use a single smart contract programming language. See #1966 and #1999.

There was an experimental rewrite of the same DEX in Tolk. Please, take a look at that and convert the Tact code on this page into Tolk.

This is related to #1442, where the same change is needed.

@novusnota novusnota marked this pull request as draft March 24, 2026 21:08
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

Successfully merging this pull request may close these issues.

[Foundations > Merkle proofs] Add guide of how the proof validation logic works.

3 participants