Skip to content

Commit 593f810

Browse files
alexghrLHerskind
andauthored
fix: pass along coinbase (#13560)
Let's see if this passes tests Fix #13643 Co-authored-by: Lasse Herskind <[email protected]>
1 parent 366d980 commit 593f810

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

noir-projects/noir-protocol-circuits/crates/rollup-lib/src/block_root/components/block_root_rollup_output_composer.nr

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,10 @@ impl BlockRootRollupOutputComposer {
121121
};
122122

123123
let mut fees = [FeeRecipient::empty(); AZTEC_MAX_EPOCH_DURATION];
124-
if accumulated_fees != 0 {
125-
fees[0] = FeeRecipient {
126-
recipient: constants.global_variables.coinbase,
127-
value: accumulated_fees,
128-
};
129-
}
124+
fees[0] = FeeRecipient {
125+
recipient: constants.global_variables.coinbase,
126+
value: accumulated_fees,
127+
};
130128

131129
let mut blob_public_inputs = [BlockBlobPublicInputs::empty(); AZTEC_MAX_EPOCH_DURATION];
132130
blob_public_inputs[0] = block_blob_public_inputs;

noir-projects/noir-protocol-circuits/crates/rollup-lib/src/block_root/empty_block_root_rollup_inputs.nr

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,17 @@ impl EmptyBlockRootRollupInputs {
5252

5353
mod tests {
5454
use crate::{
55-
abis::block_root_or_block_merge_public_inputs::BlockRootOrBlockMergePublicInputs,
55+
abis::block_root_or_block_merge_public_inputs::{
56+
BlockRootOrBlockMergePublicInputs, FeeRecipient,
57+
},
5658
block_root::empty_block_root_rollup_inputs::{
5759
EMPTY_EFFECT_BLOB_CHALLENGE_Z, EMPTY_EFFECT_BLOB_COMMITMENT, EMPTY_EFFECT_BLOBS_HASH,
5860
EmptyBlockRootRollupInputs,
5961
},
6062
tests::rollup_fixture_builder::RollupFixtureBuilder,
6163
};
6264
use std::hash::poseidon2::Poseidon2;
63-
use types::{abis::sponge_blob::SpongeBlob, tests::utils::assert_array_eq};
65+
use types::{abis::sponge_blob::SpongeBlob, address::EthAddress, tests::utils::assert_array_eq};
6466

6567
pub struct TestBuilder {
6668
pub inputs: RollupFixtureBuilder,
@@ -93,7 +95,10 @@ mod tests {
9395
assert(output.previous_block_hash != output.end_block_hash);
9496
assert_eq(output.start_global_variables, output.end_global_variables);
9597
assert_eq(output.out_hash, 0);
96-
assert_array_eq(output.fees, []);
98+
assert_array_eq(
99+
output.fees,
100+
[FeeRecipient { recipient: builder.inputs.global_variables.coinbase, value: 0 }],
101+
);
97102

98103
// The below values are generated from block_building_helper.test.ts.
99104
let expected_empty_effect_blobs_hash =
@@ -130,6 +135,7 @@ mod tests {
130135
unconstrained fn correct_empty_block_root_rollup_output_for_padding() {
131136
let mut builder = TestBuilder::new();
132137
builder.is_padding = true;
138+
builder.inputs.global_variables.coinbase = EthAddress::from_field(0);
133139

134140
let output = builder.execute();
135141

0 commit comments

Comments
 (0)