Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions yarn-project/aztec/src/cli/cmds/start_node.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getInitialTestAccounts } from '@aztec/accounts/testing';
import { type AztecNodeConfig, aztecNodeConfigMappings, getConfigEnvVars } from '@aztec/aztec-node';
import { Fr } from '@aztec/aztec.js';
import { EthAddress, Fr } from '@aztec/aztec.js';
import { getSponsoredFPCAddress } from '@aztec/cli/cli-utils';
import { NULL_KEY } from '@aztec/ethereum';
import { NULL_KEY, getAddressFromPrivateKey } from '@aztec/ethereum';
import type { NamespacedApiHandlers } from '@aztec/foundation/json-rpc/server';
import type { LogFn } from '@aztec/foundation/log';
import { AztecNodeAdminApiSchema, AztecNodeApiSchema, type PXE } from '@aztec/stdlib/interfaces/client';
Expand Down Expand Up @@ -140,6 +140,7 @@ export async function startNode(
}
}
nodeConfig.publisherPrivateKey = sequencerConfig.publisherPrivateKey;
nodeConfig.coinbase ??= EthAddress.fromString(getAddressFromPrivateKey(nodeConfig.publisherPrivateKey));
}

if (nodeConfig.p2pEnabled) {
Expand Down
4 changes: 4 additions & 0 deletions yarn-project/sequencer-client/src/sequencer/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ export class SequencerMetrics {
});
}

public setCoinbase(coinbase: EthAddress) {
this.coinbase = coinbase;
}

public start() {
this.meter.addBatchObservableCallback(this.observe, [this.rewards]);
}
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/sequencer-client/src/sequencer/sequencer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class Sequencer {
this.metrics = new SequencerMetrics(
telemetry,
() => this.state,
this._coinbase,
this.config.coinbase ?? this.publisher.getSenderAddress(),
this.publisher.getRollupContract(),
'Sequencer',
);
Expand Down Expand Up @@ -154,6 +154,7 @@ export class Sequencer {
}
if (config.coinbase) {
this._coinbase = config.coinbase;
this.metrics.setCoinbase(this._coinbase);
}
if (config.feeRecipient) {
this._feeRecipient = config.feeRecipient;
Expand Down