Reading through the specification draft. Three things I could not resolve from the document, all in the Contracts section. Apologies if any of these are shorthand rather than gaps.
1. Merge path binding (§1.4.4)
The other three Storm Eye paths each assert jet::current_script_hash() == get_script_hash_for_storage(merkle_root), which binds the witness-supplied root to the UTXO actually being spent. §1.4.4 computes expected_current_script_hash but never compares it against jet::current_script_hash(). Its loop checks jet::input_script_hash(i) for i in 0..utxos_to_merge, and I do not see anything asserting that jet::current_index() falls inside that range, which §1.4.3 handles with assert(jet::current_index() == 0).
If both are absent, what stops a spender from supplying a root of their own construction, satisfying checks 1 through 5 with inputs they control, and spending an unrelated Storm Eye UTXO sitting at a higher input index? Is the binding assertion implied here?
For reference, examples/last_will.simf in SimplicityHL binds its covenant the same way §1.4.1 through §1.4.3 do, comparing jet::current_script_hash() against the output script hash so the constraint applies to the UTXO actually being spent.
2. Timelock spending path
Part IV §2 describes a three year timelock, renew-storm-utxos to push it forward, and recovery of the UTXOs by third parties if it lapses. §1.4 enumerates four spending paths and none is timelocked. Is that path omitted from the draft, and what is its spending condition? If it is unconditional after expiry, anyone inheriting those UTXOs also inherits the asset ID users are told to obtain from trusted sources in §1.1.
3. Issuance transaction size (Part VI §1.1)
MAX_TX_SIZE_IN_WEIGHT is set to 4,000,000, described as the maximum Liquid transaction size. In Elements that value is MAX_BLOCK_WEIGHT (src/consensus/consensus.h); the per transaction relay limit is MAX_STANDARD_TX_WEIGHT at 400,000 (src/policy/policy.h), enforced in IsStandardTx. calculate_max_issuance_round_tx_size() returns 666,666, which would exceed the standard relay limit. Should that constant be 400,000?
Reading through the specification draft. Three things I could not resolve from the document, all in the Contracts section. Apologies if any of these are shorthand rather than gaps.
1. Merge path binding (§1.4.4)
The other three Storm Eye paths each assert
jet::current_script_hash() == get_script_hash_for_storage(merkle_root), which binds the witness-supplied root to the UTXO actually being spent. §1.4.4 computesexpected_current_script_hashbut never compares it againstjet::current_script_hash(). Its loop checksjet::input_script_hash(i)fori in 0..utxos_to_merge, and I do not see anything asserting thatjet::current_index()falls inside that range, which §1.4.3 handles withassert(jet::current_index() == 0).If both are absent, what stops a spender from supplying a root of their own construction, satisfying checks 1 through 5 with inputs they control, and spending an unrelated Storm Eye UTXO sitting at a higher input index? Is the binding assertion implied here?
For reference,
examples/last_will.simfin SimplicityHL binds its covenant the same way §1.4.1 through §1.4.3 do, comparingjet::current_script_hash()against the output script hash so the constraint applies to the UTXO actually being spent.2. Timelock spending path
Part IV §2 describes a three year timelock,
renew-storm-utxosto push it forward, and recovery of the UTXOs by third parties if it lapses. §1.4 enumerates four spending paths and none is timelocked. Is that path omitted from the draft, and what is its spending condition? If it is unconditional after expiry, anyone inheriting those UTXOs also inherits the asset ID users are told to obtain from trusted sources in §1.1.3. Issuance transaction size (Part VI §1.1)
MAX_TX_SIZE_IN_WEIGHTis set to 4,000,000, described as the maximum Liquid transaction size. In Elements that value isMAX_BLOCK_WEIGHT(src/consensus/consensus.h); the per transaction relay limit isMAX_STANDARD_TX_WEIGHTat 400,000 (src/policy/policy.h), enforced inIsStandardTx.calculate_max_issuance_round_tx_size()returns 666,666, which would exceed the standard relay limit. Should that constant be 400,000?