-
Notifications
You must be signed in to change notification settings - Fork 228
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
docs: add documents for the data structure of Cell/Script/Transaction/Block #309
docs: add documents for the data structure of Cell/Script/Transaction/Block #309
Conversation
Docs/add data structure
… into docs/add-data-structure
Co-Authored-By: Mine77 <haichaozhu77@gmail.com>
| `binary` | Bytes | **ELF formatted binary that contains an RISC-V based script.** This part of data is loaded into an CKB-VM instance when they are specified upon the transaction verification. | | ||
| `reference` | Bytes | **The `type hash` of the script that is referred by this script.** It is possible to refer the script in another cell on-chain as the binary code in this script, instead of entering the binary directly into the script. **Notice:** This is part only works when the `binary` field is empty. | | ||
| `args` | [Bytes] | **An array of arguments as the script input.** The arguments here are imported into the CKB-VM instance as input arguments for the scripts. This part is NOT used when calculating the hash of the script. | | ||
| `signed_args` | [Bytes] | **An array of arguments that belongs to the script for improving code reuse rate**. Please refer [this document](https://github.com/Mine77/ckb-demo-ruby-sdk/blob/docs/update-docs/docs/how-to-write-contracts.md#script-model) for more explanation about this field. | |
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.
This sounds weird to me(improving code reuse
part), but I don't have a good suggestion, any thoughts @doitian ?
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.
If it is weird, I would suggest just delete that part until we have a better understanding and a brief description available.
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.
I think it's ok to leave it this way.
At least it's just weird to you, not causing confusions.
It indeed is increasing the code reuse rate.
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.
uncles_hash description
2580: chore: upgrade deps r=zhangsoledad,quake a=driftluo futures: ``` # 0.3.12 - 2021-01-15 * Fixed `Unpin` impl of `future::{MaybeDone, TryMaybeDone}` where trait bounds were accidentally added in 0.3.9. (#2317) # 0.3.11 - 2021-01-14 * Fixed heap buffer overflow in `AsyncReadExt::{read_to_end, read_to_string}` (#2314) # 0.3.10 - 2021-01-13 * Fixed type-inference in `sink::unfold` by specifying more of its types (breaking change -- see #2311) # 0.3.9 - 2021-01-08 * Significantly improved compile time when `async-await` crate feature is disabled (#2273) * Added `stream::repeat_with` (#2279) * Added `StreamExt::unzip` (#2263) * Added `sink::unfold` (#2268) * Added `SinkExt::feed` (#2155) * Implemented `FusedFuture` for `oneshot::Receiver` (#2300) * Implemented `Clone` for `sink::With` (#2290) * Re-exported `MapOkOrElse`, `MapInto`, `OkInto`, `TryFlatten`, `WriteAllVectored` (#2275) ``` tentacle: ``` # Bug Fix - Port futures-rs fix on channel(#308) - Don't use loop on yamux(#307) - Fix yamux close(#309) ``` Co-authored-by: driftluo <driftluo@foxmail.com>
#308
This document explains "What does each field mean?"
As for "Who is responsible to fill them?" and "How to generate them?" , I think it's more appropriate to document them it in another place, which I'm also working on in progress.
preview