From 04c239f4ccd9f42c2bcbe5605ca4c629489cf506 Mon Sep 17 00:00:00 2001 From: David Murdoch <187813+davidmurdoch@users.noreply.github.com> Date: Fri, 30 Jun 2023 14:00:27 -0400 Subject: [PATCH] fix: ensure clique-signer for poa networks --- src/chains/ethereum/block/src/runtime-block.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/chains/ethereum/block/src/runtime-block.ts b/src/chains/ethereum/block/src/runtime-block.ts index 07a7770081..afd28e2dc1 100644 --- a/src/chains/ethereum/block/src/runtime-block.ts +++ b/src/chains/ethereum/block/src/runtime-block.ts @@ -96,6 +96,7 @@ export class RuntimeBlock { prevRandao: Buffer; baseFeePerGas?: bigint; // added in london withdrawalsRoot?: Buffer; // added in shanghai + cliqueSigner: () => Address; }; constructor( @@ -113,10 +114,9 @@ export class RuntimeBlock { withdrawalsRoot?: Buffer ) { this._common = common; - const coinbaseBuffer = coinbase.toBuffer(); this.header = { parentHash: parentHash.toBuffer(), - coinbase: new Address(coinbaseBuffer), + coinbase: coinbase, number: number.toBigInt(), difficulty: difficulty.toBigInt(), totalDifficulty: Quantity.toBuffer( @@ -128,7 +128,9 @@ export class RuntimeBlock { baseFeePerGas, mixHash, prevRandao: mixHash, - withdrawalsRoot + withdrawalsRoot, + // fixes https://github.com/trufflesuite/ganache/issues/4359 + cliqueSigner: () => coinbase }; }