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

docs: add documents for the data structure of Cell/Script/Transaction/Block #309

Merged
merged 13 commits into from
Mar 11, 2019

Conversation

Mine77
Copy link
Contributor

@Mine77 Mine77 commented Mar 5, 2019

#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

@quake quake requested a review from a team March 5, 2019 12:15
docs/data-structures.md Outdated Show resolved Hide resolved
docs/data-structures.md Outdated Show resolved Hide resolved
@doitian doitian self-assigned this Mar 5, 2019
@Mine77 Mine77 changed the title add documents for the data structure of Cell/Script/Transaction/Block docs: add documents for the data structure of Cell/Script/Transaction/Block Mar 6, 2019
docs/data-structures.md Outdated Show resolved Hide resolved
docs/data-structures.md Outdated Show resolved Hide resolved
docs/data-structures.md Outdated Show resolved Hide resolved
docs/data-structures.md Outdated Show resolved Hide resolved
docs/data-structures.md Outdated Show resolved Hide resolved
docs/data-structures.md Outdated Show resolved Hide resolved
docs/data-structures.md Outdated Show resolved Hide resolved
docs/data-structures.md Outdated Show resolved Hide resolved
doitian and others added 4 commits March 7, 2019 11:29
docs/data-structures.md Show resolved Hide resolved
docs/data-structures.md Outdated Show resolved Hide resolved
docs/data-structures.md Outdated Show resolved Hide resolved
docs/data-structures.md Outdated Show resolved Hide resolved
docs/data-structures.md Outdated Show resolved Hide resolved
docs/data-structures.md Outdated Show resolved Hide resolved
docs/data-structures.md Show resolved Hide resolved
docs/data-structures.md Show resolved Hide resolved
docs/data-structures.md Outdated Show resolved Hide resolved
docs/data-structures.md Show resolved Hide resolved
| `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. |
Copy link
Collaborator

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 ?

Copy link
Member

@doitian doitian Mar 8, 2019

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.

Copy link
Contributor Author

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.

docs/data-structures.md Outdated Show resolved Hide resolved
Copy link
Member

@zhangsoledad zhangsoledad left a comment

Choose a reason for hiding this comment

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

uncles_hash description

@zhangsoledad zhangsoledad merged commit 2548118 into nervosnetwork:master Mar 11, 2019
@Mine77 Mine77 deleted the docs/add-data-structure branch March 11, 2019 12:06
bors bot added a commit that referenced this pull request Feb 23, 2021
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>
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.

6 participants