Skip to content

Commit

Permalink
Merge pull request #184 from RGB-WG/fix/validation-script
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky authored Oct 30, 2023
2 parents de8f0e6 + 86d3b9b commit 1a7fbe4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 26 deletions.
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

0 comments on commit 1a7fbe4

Please sign in to comment.