Skip to content

Commit 037cdaf

Browse files
committed
fix: close NovaSeal local certification gaps
1 parent e054695 commit 037cdaf

2 files changed

Lines changed: 24 additions & 9 deletions

File tree

‎src/cli/novaseal_certification.rs‎

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3315,10 +3315,13 @@ fn validate_core_security_source(repo_root: &Path) -> Result<Value> {
33153315
.join("proposals/novaseal/v0-mvp-skeleton/fixtures/authority_rotation_without_explicit_action_reject.json")
33163316
.is_file(),
33173317
"state_action_binds_sig_pubkey_to_old_cell_authority": source.contains("require sig.pubkey == old_cell.btc_authority_hash.0"),
3318-
"lifecycle_binds_sig_pubkey_to_old_cell_authority": source.contains("assert(sig.pubkey == old_cell.btc_authority_hash.0"),
3318+
"lifecycle_binds_sig_pubkey_to_old_cell_authority": source.contains("require pubkey == old_cell.btc_authority_hash.0"),
33193319
"lock_binds_sig_pubkey_to_cell_authority_in_both_lock_surfaces": source.matches("require sig.pubkey == cell.btc_authority_hash.0").count() >= 2,
33203320
"core_nonce_increment_guarded": source.contains("require old_cell.nonce < U64_MAX")
3321-
&& source.contains("assert(old_cell.nonce < U64_MAX"),
3321+
&& source.contains("require ckb::cell_data_u64_le(source::input(0), 130) < U64_MAX")
3322+
&& source.contains(
3323+
"require ckb::cell_data_u64_le(source::output(0), 130) == ckb::cell_data_u64_le(source::input(0), 130) + 1",
3324+
),
33223325
});
33233326
Ok(json!({
33243327
"status": if object_values_all_true(Some(&checks)) { "passed" } else { "failed" },
@@ -4933,7 +4936,10 @@ fn validate_btc_tx_commitment_profile_package(repo_root: &Path) -> Result<Value>
49334936
),
49344937
(
49354938
"manifest_btc_public_verification_gap".to_string(),
4936-
Value::Bool(metadata_str("btc_public_verification") == Some("missing-spv-or-indexer-evidence")),
4939+
Value::Bool(
4940+
metadata_str("btc_public_verification")
4941+
== Some("live-devnet-tuple-bound; public/mainnet SPV-or-indexer attestation required for BTC-finality claims"),
4942+
),
49374943
),
49384944
(
49394945
"manifest_source_actions".to_string(),
@@ -4969,7 +4975,8 @@ fn validate_btc_tx_commitment_profile_package(repo_root: &Path) -> Result<Value>
49694975
(
49704976
"btc_public_verification_gap_explicit".to_string(),
49714977
Value::Bool(
4972-
coverage_by_id.get("btc_public_verification").and_then(Value::as_str) == Some("missing-spv-or-indexer-evidence"),
4978+
coverage_by_id.get("btc_public_verification").and_then(Value::as_str)
4979+
== Some("external-public-mainnet-spv-or-indexer-evidence-required"),
49734980
),
49744981
),
49754982
]);
@@ -5047,7 +5054,10 @@ fn validate_btc_utxo_seal_profile_package(repo_root: &Path) -> Result<Value> {
50475054
),
50485055
(
50495056
"manifest_btc_public_verification_gap".to_string(),
5050-
Value::Bool(metadata_str("btc_public_verification") == Some("missing-spv-or-indexer-evidence")),
5057+
Value::Bool(
5058+
metadata_str("btc_public_verification")
5059+
== Some("live-devnet-spend-tuple-bound; public/mainnet SPV-or-indexer attestation required for BTC-spend claims"),
5060+
),
50515061
),
50525062
(
50535063
"manifest_source_actions".to_string(),
@@ -5079,7 +5089,8 @@ fn validate_btc_utxo_seal_profile_package(repo_root: &Path) -> Result<Value> {
50795089
(
50805090
"btc_public_verification_gap_explicit".to_string(),
50815091
Value::Bool(
5082-
coverage_by_id.get("btc_public_verification").and_then(Value::as_str) == Some("missing-spv-or-indexer-evidence"),
5092+
coverage_by_id.get("btc_public_verification").and_then(Value::as_str)
5093+
== Some("external-public-mainnet-spv-or-indexer-evidence-required"),
50835094
),
50845095
),
50855096
]);
@@ -5157,7 +5168,10 @@ fn validate_dual_seal_profile_package(repo_root: &Path) -> Result<Value> {
51575168
),
51585169
(
51595170
"manifest_btc_public_verification_gap".to_string(),
5160-
Value::Bool(metadata_str("btc_public_verification") == Some("missing-spv-or-indexer-evidence")),
5171+
Value::Bool(
5172+
metadata_str("btc_public_verification")
5173+
== Some("live-devnet-closure-bound; public/mainnet SPV-or-indexer attestation required for BTC-finality claims"),
5174+
),
51615175
),
51625176
(
51635177
"manifest_ckb_finality_gap".to_string(),
@@ -5190,7 +5204,8 @@ fn validate_dual_seal_profile_package(repo_root: &Path) -> Result<Value> {
51905204
(
51915205
"btc_public_verification_gap_explicit".to_string(),
51925206
Value::Bool(
5193-
coverage_by_id.get("btc_public_verification").and_then(Value::as_str) == Some("missing-spv-or-indexer-evidence"),
5207+
coverage_by_id.get("btc_public_verification").and_then(Value::as_str)
5208+
== Some("external-public-mainnet-spv-or-indexer-evidence-required"),
51945209
),
51955210
),
51965211
(

0 commit comments

Comments
 (0)