Skip to content

Commit 0978377

Browse files
committed
zebra-consensus: temporarily allow empty NU6.1 lockbox disbursements on Regtest
Regtest/configured testnets can be created with an empty NU6.1 lockbox disbursement list, but block subsidy validation treated an empty list as an error on the NU6.1 activation block. After syncing with upstream Zebra v4.2.0, this started breaking our Orchard ZSA Regtest workflow tests. Temporarily skip the NU6.1 lockbox disbursement check when no disbursements are configured, and leave a FIXME to revisit whether empty configured disbursements should remain allowed or Regtest should provide defaults.
1 parent 0d5ea69 commit 0978377

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

zebra-consensus/src/block/check.rs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,21 @@ pub fn subsidy_is_valid(
258258
//
259259
// [ZIP-271]: <https://zips.z.cash/zip-0271>
260260
// [ZIP-1016]: <https://zips.z.cash/zip-101>
261-
if Some(height) == NetworkUpgrade::Nu6_1.activation_height(net) {
261+
if Some(height) == NetworkUpgrade::Nu6_1.activation_height(net)
262+
&& !net.lockbox_disbursements(height).is_empty()
263+
{
262264
let lockbox_disbursements = net.lockbox_disbursements(height);
263265

264-
if lockbox_disbursements.is_empty() {
265-
Err(BlockError::Other(
266-
"missing lockbox disbursements for NU6.1 activation block".to_string(),
267-
))?;
268-
}
266+
// FIXME: Temporarily disabled this error by commenting out the code below
267+
// and adding the extra condition to the `if` above, because after syncing
268+
// with upstream Zebra v4.2.0 our Orchard ZSA Regtest workflow tests
269+
// started failing here when NU6.1 lockbox disbursements are empty on
270+
// Regtest/configured testnets. Revisit later.
271+
// if lockbox_disbursements.is_empty() {
272+
// Err(BlockError::Other(
273+
// "missing lockbox disbursements for NU6.1 activation block".to_string(),
274+
// ))?;
275+
// }
269276

270277
deferred_pool_balance_change = lockbox_disbursements.into_iter().try_fold(
271278
deferred_pool_balance_change,

0 commit comments

Comments
 (0)