Skip to content

Commit 4fcc3fc

Browse files
committed
Restore 0.23 release gate closure
1 parent 7b9ebcd commit 4fcc3fc

5 files changed

Lines changed: 47 additions & 17 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
## Unreleased
44

5+
- Restore the 0.23 release gate after the Python-to-Rust tooling migration by
6+
checking the semantic `requires_all_bundled_examples_strict_original_ckb`
7+
and emitted `source_provenance` CKB boundaries plus the Rust-backed NovaSeal
8+
acceptance summary instead of retired temporary-directory, helper, and shell
9+
field names, and refresh the NovaSeal external TCB review template to the
10+
current Rust-migrated verifier source-tree hash. CKB transaction-recipe
11+
replay now tops up fresh devnet funding when a fixture has no disposable
12+
change output and its replacement input cannot fund every typed output.
13+
Rebuild the website WASM bundle with the witness-placement-v2 compiler so the
14+
playground and native release artifacts expose the same ABI.
515
- Add the explicit `cellscript-witnessargs-input-type-v2` placement ABI for
616
parameterized CKB entries. Generated wrappers now resolve witnesses relative
717
to the active script group, decode the `CSARGv1` payload from

‎crates/cellscript-tools/src/ckb_acceptance_live.rs‎

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ use serde_json::{json, Map, Value};
88

99
use crate::ckb_acceptance::{self, ArtifactRecord, CompileEvidence};
1010
use crate::ckb_devnet::{
11-
always_success_dep, decode_hex, deploy_code, out_point, resolve_ckb_bin, sha256_hex, CkbDevnet, ALWAYS_SUCCESS_CODE_HASH,
11+
always_success_dep, decode_hex, deploy_code, funding_cells, out_point, resolve_ckb_bin, sha256_hex, CkbDevnet,
12+
ALWAYS_SUCCESS_CODE_HASH,
1213
};
1314
use crate::production_evidence::{ACTION_RUNS, EXPECTED_END_TO_END_STATEFUL_SCENARIOS, EXPECTED_EXAMPLES, LOCKS};
1415

@@ -183,7 +184,7 @@ impl Replayer<'_> {
183184
Ok(tx)
184185
}
185186

186-
fn balance_change_capacity(&self, tx: &mut Value) -> Result<()> {
187+
fn balance_change_capacity(&mut self, tx: &mut Value) -> Result<()> {
187188
let mut input_capacity = 0_u64;
188189
for input in tx["inputs"].as_array().context("transaction inputs missing")? {
189190
let live = self.devnet.rpc("get_live_cell", vec![input["previous_output"].clone(), json!(false)])?;
@@ -210,16 +211,35 @@ impl Replayer<'_> {
210211
&& output["type"].is_null()
211212
&& data.as_str().is_some_and(|value| value == "0x")
212213
})
213-
.map(|(index, _)| index)
214-
.context("rebound transaction is under-capacity and has no adjustable change output")?;
215-
let old_change = parse_hex_u64(&outputs[candidate]["capacity"])?;
216-
let fixed = output_capacity - old_change;
217-
let new_change = input_capacity.checked_sub(fixed).context("rebound transaction inputs cannot fund fixed outputs")?;
214+
.map(|(index, _)| index);
218215
const ALWAYS_SUCCESS_EMPTY_OCCUPIED: u64 = 4_100_000_000;
219-
if new_change < ALWAYS_SUCCESS_EMPTY_OCCUPIED {
220-
bail!("rebound change output would be under occupied capacity: {new_change}");
216+
if let Some(candidate) = candidate {
217+
let old_change = parse_hex_u64(&outputs[candidate]["capacity"])?;
218+
let fixed = output_capacity - old_change;
219+
if let Some(new_change) = input_capacity.checked_sub(fixed)
220+
&& new_change >= ALWAYS_SUCCESS_EMPTY_OCCUPIED
221+
{
222+
tx["outputs"][candidate]["capacity"] = json!(format!("0x{new_change:x}"));
223+
return Ok(());
224+
}
225+
}
226+
227+
// Some recipe transactions intentionally have no disposable change
228+
// output: every output is a typed scenario cell. A replacement
229+
// cellbase input can be smaller than the original fixture input, so
230+
// add fresh always-success funding instead of mutating scenario state.
231+
let deficit = output_capacity - input_capacity;
232+
let funding = self.devnet.collect_spendable(deficit)?;
233+
let inputs = tx["inputs"].as_array_mut().context("transaction inputs missing")?;
234+
for cell in funding_cells(&funding) {
235+
inputs.push(json!({
236+
"previous_output": out_point(
237+
cell["tx_hash"].as_str().context("funding transaction hash missing")?,
238+
cell["index"].as_u64().context("funding output index missing")?,
239+
),
240+
"since": "0x0",
241+
}));
221242
}
222-
tx["outputs"][candidate]["capacity"] = json!(format!("0x{new_change:x}"));
223243
Ok(())
224244
}
225245
}

‎scripts/cellscript_gate.sh‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,14 @@ check_ckb_acceptance_boundaries() {
211211
local required=(
212212
'scripts/ckb_cellscript_acceptance.sh::Usage: scripts/ckb_cellscript_acceptance.sh'
213213
'scripts/ckb_cellscript_acceptance.sh::ckb-acceptance'
214-
'crates/cellscript-tools/src/ckb_acceptance.rs::strict-original-ckb'
214+
'crates/cellscript-tools/src/ckb_acceptance.rs::requires_all_bundled_examples_strict_original_ckb'
215215
'crates/cellscript-tools/src/ckb_acceptance.rs::bundled_examples_exact_order'
216216
'crates/cellscript-tools/src/ckb_acceptance.rs::language_examples_exact_order'
217217
'crates/cellscript-tools/src/ckb_acceptance.rs::strict_original_ckb_compile_policy_fail_closed'
218218
'crates/cellscript-tools/src/ckb_acceptance.rs::strict_original_ckb_compile_unexpected_failures'
219219
'crates/cellscript-tools/src/ckb_acceptance.rs::SOURCE_PROVENANCE_SCHEMA'
220220
'crates/cellscript-tools/src/ckb_acceptance.rs::BUILD_REPORT_SCHEMA'
221-
'crates/cellscript-tools/src/ckb_acceptance.rs::tracked_source_sha256'
221+
'crates/cellscript-tools/src/ckb_acceptance.rs::"source_provenance":source_provenance(root)?'
222222
'crates/cellscript-tools/src/ckb_acceptance_live.rs::ckb_acceptance_pin.json'
223223
'crates/cellscript-tools/src/ckb_acceptance_live.rs::cellscript-ckb-runtime-provenance-v0.22'
224224
'crates/cellscript-tools/src/ckb_acceptance_live.rs::fresh-dedicated-cargo-target'
@@ -267,9 +267,9 @@ check_novaseal_acceptance_boundaries() {
267267
'crates/cellscript-tools/src/ckb_devnet.rs::invalid_paths'
268268
'crates/cellscript-tools/src/external_handoff.rs::source tree path must not be a symlink'
269269
'crates/cellscript-tools/src/verifier_pinning.rs::is a symlink inside the NovaSeal'
270-
'scripts/novaseal_devnet_stateful_acceptance.sh::acceptance_blocker_count'
271-
'scripts/novaseal_devnet_stateful_acceptance.sh::local_blocker_count'
272-
'scripts/novaseal_devnet_stateful_acceptance.sh::blocker_count'
270+
'scripts/novaseal_devnet_stateful_acceptance.sh::novaseal-acceptance-summary'
271+
'scripts/novaseal_devnet_stateful_acceptance.sh::local_blockers acceptance_blockers blockers external_endpoint_status'
272+
'scripts/novaseal_devnet_stateful_acceptance.sh::$acceptance_blockers" == "1"'
273273
'scripts/novaseal_devnet_stateful_acceptance.sh::acceptance_blockers=%s'
274274
'scripts/novaseal_devnet_stateful_acceptance.sh::external_endpoint_status=%s'
275275
'scripts/novaseal_devnet_stateful_acceptance.sh::certifier_status=%s'

‎website‎

0 commit comments

Comments
 (0)