Skip to content

Commit 7c73dba

Browse files
authored
fix: return cancun (#160)
## Summary by Sourcery Add support for the Cancun fork time to the Besu genesis configuration and ensure related bootstrap tests include the new field. New Features: - Include a cancunTime field in the Besu genesis configuration with a default value. - Extend bootstrap-related test fixtures to account for the new cancunTime configuration value. <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Restores the cancunTime field in Besu genesis configs so Cancun fork activation is included in generated artifacts. Updates bootstrap tests to cover cancunTime. - **Bug Fixes** - Added cancunTime to BesuGenesisConfig and the default values returned by BesuGenesisService. - Updated bootstrap genesis prompt and selective artifacts tests to include cancunTime in sample payloads. <sup>Written for commit d311ba4. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
1 parent ab93208 commit 7c73dba

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/cli/commands/bootstrap/bootstrap.genesis-prompts.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const createServiceStub = () => {
5757
berlinBlock: 0,
5858
londonBlock: 0,
5959
shanghaiTime: 0,
60+
cancunTime: 0,
6061
zeroBaseFee: true,
6162
},
6263
nonce: "0x0",

src/cli/commands/bootstrap/bootstrap.selective-artifacts.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const createSamplePayload = (filter: ArtifactFilter): OutputPayload => ({
4949
berlinBlock: 0,
5050
muirGlacierBlock: 0,
5151
shanghaiTime: 0,
52+
cancunTime: 0,
5253
zeroBaseFee: false,
5354
qbft: {
5455
blockperiodseconds: 5,

src/genesis/besu-genesis.service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ type BesuGenesisConfig = {
3636
readonly berlinBlock: number;
3737
readonly londonBlock: number;
3838
readonly shanghaiTime: number;
39+
readonly cancunTime: number;
3940
readonly zeroBaseFee: boolean;
4041
readonly contractSizeLimit?: number;
4142
readonly evmStackSize?: number;
@@ -117,6 +118,7 @@ export class BesuGenesisService {
117118
berlinBlock: 0,
118119
londonBlock: 0,
119120
shanghaiTime: 0,
121+
cancunTime: 0,
120122
zeroBaseFee: (config.gasPrice ?? 0) === 0,
121123
contractSizeLimit: config.contractSizeLimit,
122124
evmStackSize: config.evmStackSize,

0 commit comments

Comments
 (0)