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

Update 0022-transaction-structure.md #421

Closed
wants to merge 1 commit into from

Conversation

linnnsss
Copy link
Contributor

Add Appendix B and C containing tables of syscalls and constants.

add Appendix B and C containing syscalls and constants.
@linnnsss linnnsss requested review from a team and doitian as code owners July 10, 2023 07:35
@doitian
Copy link
Member

doitian commented Jul 12, 2023

I would suggest creating a new RFC for these contents, since they are not relevant to RFC22. See the Process in the README about how to create a new RFC.

It's better to add bidirectional links as well.

  • List links to history syscalls versions in the index, including RFC9, RFC34, RFC50, where 50 is still under review in [0050] VM Syscalls 3 #418
  • Add link to the index in RFC9, RFC34, and RFC50.

@@ -402,3 +402,78 @@ Cell data hash is just `ckbhash(data)`.

Script hash is `ckbhash(molecule_encode(script))` where `molecule_encode` turns the script structure into a block of binary via molecule. See the definition `Script` in the [schema file](https://github.com/nervosnetwork/ckb/blob/a6733e6af5bb0da7e34fb99ddf98b03054fa9d4a/util/types/schemas/blockchain.mol#L28-L32).

## Appendix B: Syscalls

| VM Ver. | Syscall ID | C Function Name | Description | Return Value | Partial Loading[^2] | 1st Arg | 2nd Arg | 3rd Arg | 4th Arg | 5th Arg | 6th Arg | C Example |
Copy link
Member

@doitian doitian Jul 12, 2023

Choose a reason for hiding this comment

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

There are too many columns, making the viewing experience on GitHub really bad.

My suggestion is removing most columns and adding links to their detailed documentations.

| VM Ver. | Syscall ID | C Function Name | Description |
| --- | --- | --- | --- |
| 1 | 93 | [ckb_exit][] | terminate execution with the specified return code |

[ckb_exit]: https://github.com/nervosnetwork/rfcs/blob/master/rfcs/0009-vm-syscalls/0009-vm-syscalls.md#exit

which gives us:

VM Ver. Syscall ID C Function Name Description
1 93 ckb_exit terminate execution with the specified return code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Drafting new RFC based on the comments. One question, is the new RFC solely about vm syscalls? Or, Appendix C: Constants will still be included?

@doitian doitian closed this Nov 9, 2023
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.

2 participants