Skip to content

feat: update spv lib to support signet #29

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

Merged
merged 6 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion checksums.txt
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions contracts/ckb-bitcoin-spv-type-lock/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ckb-bitcoin-spv-type-lock"
version = "0.1.0"
version = "0.2.0"
authors = ["Boyu Yang <[email protected]>"]
edition = "2021"
license = "MIT"
Expand All @@ -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"]
13 changes: 13 additions & 0 deletions contracts/ckb-bitcoin-spv-type-lock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Loading