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

Update to new validation APIs from dependencies #184

Merged
merged 1 commit into from
Oct 30, 2023
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
25 changes: 9 additions & 16 deletions Cargo.lock

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

12 changes: 10 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ amplify = "~4.5.0"
strict_encoding = "~2.6.1"
strict_types = "~1.6.3"
aluvm = { version = "~0.10.6", features = ["std"] }
commit_verify = { version = "~0.10.6", features = ["rand", "derive"] }
single_use_seals = "~0.10.1"
commit_verify = { version = "~0.11.0-beta.1", features = ["rand", "derive"] }
single_use_seals = "~0.11.0-beta.1"
bp-core = { version = "~0.10.11" }
secp256k1-zkp = { version = "0.9.2", features = ["rand", "rand-std", "global-context"] }
baid58 = "~0.4.4"
Expand Down Expand Up @@ -59,3 +59,11 @@ wasm-bindgen-test = "0.3"

[package.metadata.docs.rs]
features = [ "all" ]

[patch.crates-io]
commit_verify = { git = "https://github.com/LNP-BP/client_side_validation", branch = "v0.11" }
single_use_seals = { git = "https://github.com/LNP-BP/client_side_validation", branch = "v0.11" }
bp-consensus = { git = "https://github.com/BP-WG/bp-core", branch = "v0.11" }
bp-dbc = { git = "https://github.com/BP-WG/bp-core", branch = "v0.11" }
bp-seals = { git = "https://github.com/BP-WG/bp-core", branch = "v0.11" }
bp-core = { git = "https://github.com/BP-WG/bp-core", branch = "v0.11" }
2 changes: 0 additions & 2 deletions src/validation/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,6 @@ pub enum Failure {
/// transition {0} doesn't close seal with the witness transaction {1}.
/// Details: {2}
SealInvalid(OpId, Txid, seals::txout::VerifyError),
/// transition {0} is not committed in the witness transaction {1}.
AnchorNotCommitted(OpId, Txid),
/// transition {0} is not properly anchored to the witness transaction {1}.
/// Details: {2}
AnchorInvalid(OpId, Txid, anchor::VerifyError),
Expand Down
6 changes: 0 additions & 6 deletions src/validation/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,6 @@ impl<'consignment, 'resolver, C: ConsignmentApi, R: ResolveTx>

// [VALIDATION]: Checking anchor deterministic bitcoin commitment
match anchor.verify(self.contract_id, message, &witness.tx) {
Ok(false) => {
// The operation is not committed to bitcoin transaction graph!
// Ultimate failure. But continuing to detect the rest (after reporting it).
self.status
.add_failure(Failure::AnchorNotCommitted(opid, txid));
}
Err(err) => {
// The operation is not committed to bitcoin transaction graph!
// Ultimate failure. But continuing to detect the rest (after reporting it).
Expand Down
Loading