-
Notifications
You must be signed in to change notification settings - Fork 1
Fill boc serialization page #524
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
base: main
Are you sure you want to change the base?
Conversation
Thanks for the updates to the BoC serialization docs and examples. I found several clarity and consistency issues in tvm/serialization/boc.mdx that need fixes before merge. Findings (19)High (3)[HIGH] Conflicting reuse of symbol
|
tvm/serialization/boc.mdx
Outdated
import { beginCell, serializeBoc } from "@ton/core"; | ||
// serializeBoc has two arguments: | ||
// root: Cell. A root cell of a given tree of cells | ||
// opt: { idx: boolean, crc32: boolean }. Two flags indicating whether indexes and CRC32C will be included in serialization | ||
|
||
const innerCell = beginCell().storeUint(456, 16).endCell(); | ||
|
||
const rootCell = beginCell().storeUint(0, 64).storeRef(innerCell).endCell(); | ||
|
||
const serialized_boc = serializeBoc(rootCell, { idx: false, crc32: false }); | ||
|
||
const serialized_boc_with_indexes_and_crc32 = serializeBoc(rootCell, { idx: true, crc32: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Anton Trunov <anton.a.trunov@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The serialization specification is correct.
However, the article reads too terse and compressed—similar to Nikolai Durov’s original PDFs—which is not ideal for documentation.
The cell serialization duplicates “/tvm/serialization/cells”; it might be better to keep it in one place and link from the other.
The topic “What are multiroot BoC for?” is not covered.
There are no examples of deserialization, and serialization with hex output.
I would recommend balancing the dry text with visuals and examples, as was done in the old documentation.
+1 to @pyAndr3w I'd recommend to show the full serialization procedure on some example, i.e. with numbers and values. |
The mentioned topic I shortly mentioned in Intro: bag of cells could be a forest, so, as I know, It is just convenient to send a serialization of more than one tree of cells in some situations. If you know more clear reason to use them, please, let me know. Yes, it is good idea and I just put a link to cell serialization. I also port the example of manual serialization from old docs and add code examples related mentioned issues. |
To be honest, I did not see such an option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Karkarmath ping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want to move this from TVM to Foundations
@verytactical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want to have this described formally, in TL-B and/or C-like structures, both outer boc structure and cell serialization. It is hard to understand informal structure as in tblkch.pdf.
To fix the formatting issues:
npx remark -o --silent --silently-ignore tvm/serialization/boc.mdx |
To fix the formatting issues:
npx remark -o --silent --silently-ignore tvm/serialization/boc.mdx |
…ntlify-ton-docs into fill-Boc-serialization-page
To fix the formatting issues:
npx remark -o --silent --silently-ignore tvm/serialization/boc.mdx |
To fix the formatting issues:
npx remark -o --silent --silently-ignore tvm/serialization/boc.mdx |
Thanks for the updates to the BoC documentation. A few high‑priority style‑guide corrections are needed to ensure anchors, callouts, and references render and resolve correctly. Findings (4)High (4)[HIGH] Use
|
Closes #229