docs icon indicating copy to clipboard operation
docs copied to clipboard

feature/add-tvm-opcodes-list

Open MrSufferer opened this issue 2 years ago • 6 comments

What is this PR?

Origin: https://github.com/everscale-org/bounties/issues/32 This PR contains a workflow code pipeline for the list of all TVM opcodes.

Changes

Including:

  • A folder at src/arch/ that contains markdown generation logic, also can be rendered at the docs website
  • CSV file: contain the aggregated information from instructions.csv, tvm.tex(or initial TVM paper), and Everscale Extended Instructions, with an additional column that represented tvm_assembler.
  • GitHub workflow file that auto writes the .md after there are push changes to the CSV

Progress

The opcodes collecting job is done. Also fixed the missing description of some opcodes.

Problems:

  • Still haven't tested the gas calculation of some new opcodes.
  • Still haven't figured out the tvm_asm of some complex opcodes. We may need to discuss this more.

Question?

  • What is the layout visual of the expanded column I should handle? I've implemented a single column

MrSufferer avatar May 31 '23 15:05 MrSufferer

@everscale-org/docs :rocket: preview https://everscale-org.github.io/preview/PR-342/arch/opcodes/tvm_instructions

ilyar avatar Jun 01 '23 23:06 ilyar

@ilyar Hello, I've added the collapsed column.

MrSufferer avatar Jun 02 '23 13:06 MrSufferer

:rocket: update preview https://everscale-org.github.io/preview/PR-342/arch/opcodes/tvm_instructions

ilyar avatar Jun 03 '23 00:06 ilyar

@gadillacer

  • the page lacks general rules of how the gas is calculated.
  • I see some empty lines in the generated table
  • I see that the rightmost column is mostly empty. and for some opcodes, it duplicates the content from the desc column. (screenshot attached)
image

To describe the general rules of gas calculation, you can get some insight from the original specification by Telegram: https://ton.org/tvm.pdf Appendix A, section 1:

image

Also it would be nice if you double-check if the implementation keeps these rules. If not, please outline the differences as well.

qwadratic avatar Jun 03 '23 23:06 qwadratic

@ilyar seems like I misunderstood something from the beginning.

@qwadratic

  • The data from the expanded column is just an example.

MrSufferer avatar Jun 04 '23 07:06 MrSufferer

@ilyar I've updated a bit according to your requests. Check pls.

Hope you can provide me next step to do after that.

MrSufferer avatar Jul 03 '23 13:07 MrSufferer