diff --git a/Cargo.lock b/Cargo.lock index 6d46aab..7d2b124 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -233,7 +233,7 @@ checksum = "8b3b72a38c9920a29990df12002c4d069a147c8782f0c211f8a01b2df8f42bfd" [[package]] name = "ckb-bitcoin-spv-prover" version = "0.1.0" -source = "git+https://github.com/ckb-cell/ckb-bitcoin-spv?rev=a13477b#a13477bd12840fc2cd3e606ceea18d52f9c78e9a" +source = "git+https://github.com/ckb-cell/ckb-bitcoin-spv?rev=bfc71d7#bfc71d7daf17e96f34e8e287f45254e512383330" dependencies = [ "bitcoin", "ckb-bitcoin-spv-verifier", @@ -243,7 +243,7 @@ dependencies = [ [[package]] name = "ckb-bitcoin-spv-type-lock" -version = "0.1.0" +version = "0.2.0" dependencies = [ "ckb-bitcoin-spv-verifier", "ckb-hash", @@ -253,7 +253,7 @@ dependencies = [ [[package]] name = "ckb-bitcoin-spv-verifier" version = "0.1.0" -source = "git+https://github.com/ckb-cell/ckb-bitcoin-spv?rev=a13477b#a13477bd12840fc2cd3e606ceea18d52f9c78e9a" +source = "git+https://github.com/ckb-cell/ckb-bitcoin-spv?rev=bfc71d7#bfc71d7daf17e96f34e8e287f45254e512383330" dependencies = [ "bitcoin", "bitcoin_hashes", diff --git a/checksums.txt b/checksums.txt index 2183e1a..3d25bfd 100644 --- a/checksums.txt +++ b/checksums.txt @@ -1,2 +1,2 @@ 6bbea4820329050e1fc65f9c15cab5948b824c73aa3430d7d92b793c53ca66b6 build/release/can-update-without-ownership-lock -037b7d66cbe8fcea2d13a3da6693e2fc14d6510a075dce20ebb7289647077a5e build/release/ckb-bitcoin-spv-type-lock +eaa9e3aeb1205e611078a819e960c33f4934ea49029aab3445a241955e696ee1 build/release/ckb-bitcoin-spv-type-lock diff --git a/contracts/ckb-bitcoin-spv-type-lock/Cargo.toml b/contracts/ckb-bitcoin-spv-type-lock/Cargo.toml index 4266a1a..7bd11d6 100644 --- a/contracts/ckb-bitcoin-spv-type-lock/Cargo.toml +++ b/contracts/ckb-bitcoin-spv-type-lock/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ckb-bitcoin-spv-type-lock" -version = "0.1.0" +version = "0.2.0" authors = ["Boyu Yang "] edition = "2021" license = "MIT" @@ -15,6 +15,6 @@ ckb-hash = { version = "0.112.1", default-features = false, features = ["ckb-con [dependencies.ckb-bitcoin-spv-verifier] version = "0.1.0" git = "https://github.com/ckb-cell/ckb-bitcoin-spv" -rev = "a13477b" +rev = "bfc71d7" default-features = false -features = ["no-std"] +features = ["no-std"] \ No newline at end of file diff --git a/contracts/ckb-bitcoin-spv-type-lock/README.md b/contracts/ckb-bitcoin-spv-type-lock/README.md index 6c304d7..3fe4a44 100644 --- a/contracts/ckb-bitcoin-spv-type-lock/README.md +++ b/contracts/ckb-bitcoin-spv-type-lock/README.md @@ -45,6 +45,17 @@ A Bitcoin SPV instance contains two types of cells: **SPV info cell** and **SPV - tip client cell id ``` +- Flags + + [Flags](https://github.com/ckb-cell/ckb-bitcoin-spv/blob/bfc71d7daf17e96f34e8e287f45254e512383330/verifier/schemas/types.mol#L58) is the last part of `args` and takes up one byte. The highest two bits + are used to indicate different btc chain types. The supported chain types are: + + - Mainnet + - Testnet + - Signet + + see [BTC chain type] for details. + ### Operations There are 4 kinds of operations in the Bitcoin SPV type script: @@ -239,3 +250,5 @@ To verify a transaction using the Bitcoin SPV Client cell, follow these steps: [Section "Code Locating"]: https://github.com/nervosnetwork/rfcs/blob/v2020.01.15/rfcs/0022-transaction-structure/0022-transaction-structure.md#code-locating [CKB RFC 0032]: https://github.com/nervosnetwork/rfcs/blob/dff5235616e5c7aec706326494dce1c54163c4be/rfcs/0032-ckb-vm-version-selection/0032-ckb-vm-version-selection.md#specification [CKB RFC 0051]: https://github.com/nervosnetwork/rfcs/blob/dff5235616e5c7aec706326494dce1c54163c4be/rfcs/0051-ckb2023/0051-ckb2023.md#ckb-vm-v2 + +[btc chain type]: https://github.com/ckb-cell/ckb-bitcoin-spv/blob/bfc71d7daf17e96f34e8e287f45254e512383330/verifier/src/constants.rs#L3 \ No newline at end of file diff --git a/tests/Cargo.toml b/tests/Cargo.toml index a3c3a95..fd4959a 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -17,9 +17,9 @@ walkdir = "2.4" [dev-dependencies.ckb-bitcoin-spv-prover] version = "0.1.0" git = "https://github.com/ckb-cell/ckb-bitcoin-spv" -rev = "a13477b" +rev = "bfc71d7" [dev-dependencies.ckb-bitcoin-spv-verifier] version = "0.1.0" git = "https://github.com/ckb-cell/ckb-bitcoin-spv" -rev = "a13477b" +rev = "bfc71d7"