-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
3,365 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
[submodule "third-party/ckb-c-stdlib"] | ||
path = third-party/ckb-c-stdlib | ||
url = https://github.com/nervosnetwork/ckb-c-stdlib.git | ||
# [submodule "third-party/secp256k1"] | ||
# path = third-party/secp256k1 | ||
# url = https://github.com/nervosnetwork/secp256k1 | ||
# branch = master | ||
[submodule "third-party/sparse-merkle-tree"] | ||
path = third-party/sparse-merkle-tree | ||
url = https://github.com/nervosnetwork/sparse-merkle-tree.git | ||
branch = master | ||
# [submodule "third-party/mbedtls"] | ||
# path = third-party/mbedtls | ||
# url = https://github.com/nervosnetwork/mbedtls.git | ||
# [submodule "third-party/ckb-c-stdlib-20210413"] | ||
# path = third-party/ckb-c-stdlib-20210413 | ||
# url = https://github.com/nervosnetwork/ckb-c-stdlib.git | ||
# [submodule "third-party/secp256k1-20210801"] | ||
# path = third-party/secp256k1-20210801 | ||
# url = https://github.com/nervosnetwork/secp256k1.git | ||
# branch = schnorr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule sparse-merkle-tree
added at
5739f3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
/* Basic Types */ | ||
|
||
array Uint32 [byte; 4]; | ||
array Uint64 [byte; 8]; | ||
array Uint128 [byte; 16]; | ||
array Byte32 [byte; 32]; | ||
array Uint256 [byte; 32]; | ||
|
||
vector Bytes <byte>; | ||
option BytesOpt (Bytes); | ||
|
||
vector BytesVec <Bytes>; | ||
vector Byte32Vec <Byte32>; | ||
|
||
/* Types for Chain */ | ||
|
||
option ScriptOpt (Script); | ||
|
||
array ProposalShortId [byte; 10]; | ||
|
||
vector UncleBlockVec <UncleBlock>; | ||
vector TransactionVec <Transaction>; | ||
vector ProposalShortIdVec <ProposalShortId>; | ||
vector CellDepVec <CellDep>; | ||
vector CellInputVec <CellInput>; | ||
vector CellOutputVec <CellOutput>; | ||
|
||
table Script { | ||
code_hash: Byte32, | ||
hash_type: byte, | ||
args: Bytes, | ||
} | ||
|
||
struct OutPoint { | ||
tx_hash: Byte32, | ||
index: Uint32, | ||
} | ||
|
||
struct CellInput { | ||
since: Uint64, | ||
previous_output: OutPoint, | ||
} | ||
|
||
table CellOutput { | ||
capacity: Uint64, | ||
lock: Script, | ||
type_: ScriptOpt, | ||
} | ||
|
||
struct CellDep { | ||
out_point: OutPoint, | ||
dep_type: byte, | ||
} | ||
|
||
table RawTransaction { | ||
version: Uint32, | ||
cell_deps: CellDepVec, | ||
header_deps: Byte32Vec, | ||
inputs: CellInputVec, | ||
outputs: CellOutputVec, | ||
outputs_data: BytesVec, | ||
} | ||
|
||
table Transaction { | ||
raw: RawTransaction, | ||
witnesses: BytesVec, | ||
} | ||
|
||
struct RawHeader { | ||
version: Uint32, | ||
compact_target: Uint32, | ||
timestamp: Uint64, | ||
number: Uint64, | ||
epoch: Uint64, | ||
parent_hash: Byte32, | ||
transactions_root: Byte32, | ||
proposals_hash: Byte32, | ||
uncles_hash: Byte32, | ||
dao: Byte32, | ||
} | ||
|
||
struct Header { | ||
raw: RawHeader, | ||
nonce: Uint128, | ||
} | ||
|
||
table UncleBlock { | ||
header: Header, | ||
proposals: ProposalShortIdVec, | ||
} | ||
|
||
table Block { | ||
header: Header, | ||
uncles: UncleBlockVec, | ||
transactions: TransactionVec, | ||
proposals: ProposalShortIdVec, | ||
} | ||
|
||
table CellbaseWitness { | ||
lock: Script, | ||
message: Bytes, | ||
} | ||
|
||
table WitnessArgs { | ||
lock: BytesOpt, // Lock args | ||
input_type: BytesOpt, // Type args for input | ||
output_type: BytesOpt, // Type args for output | ||
} |
Oops, something went wrong.