Skip to content

Commit

Permalink
client: remove initialVerkleStateRoot cli param
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrocheleau committed May 17, 2024
1 parent c95499c commit aaa6b64
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 15 deletions.
6 changes: 0 additions & 6 deletions packages/client/bin/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,12 +449,6 @@ const args: ClientOpts = yargs
boolean: true,
hidden: true,
})
.option('initialVerkleStateRoot', {
describe:
'Provides an initial stateRoot to start the StatelessVerkleStateManager. This is required to bootstrap verkle witness proof verification, since they depend on the stateRoot of the parent block',
string: true,
coerce: (initialVerkleStateRoot: PrefixedHexString) => hexToBytes(initialVerkleStateRoot),
})
.option('useJsCrypto', {
describe: 'Use pure Javascript cryptography functions',
boolean: true,
Expand Down
3 changes: 0 additions & 3 deletions packages/client/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ export interface ConfigOptions {
statelessVerkle?: boolean
startExecution?: boolean
ignoreStatelessInvalidExecs?: boolean
initialVerkleStateRoot?: Uint8Array

/**
* Enables Prometheus Metrics that can be collected for monitoring client health
Expand Down Expand Up @@ -452,7 +451,6 @@ export class Config {
public readonly statelessVerkle: boolean
public readonly startExecution: boolean
public readonly ignoreStatelessInvalidExecs: boolean
public readonly initialVerkleStateRoot: Uint8Array

public synchronized: boolean
public lastsyncronized?: boolean
Expand Down Expand Up @@ -546,7 +544,6 @@ export class Config {
this.ignoreStatelessInvalidExecs = options.ignoreStatelessInvalidExecs ?? false

this.metrics = options.prometheusMetrics
this.initialVerkleStateRoot = options.initialVerkleStateRoot ?? new Uint8Array()

// Start it off as synchronized if this is configured to mine or as single node
this.synchronized = this.isSingleNode ?? this.mine
Expand Down
4 changes: 1 addition & 3 deletions packages/client/src/execution/vmexecution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,7 @@ export class VMExecution extends Execution {
return
}
this.config.logger.info(`Setting up verkleVM`)
const stateManager = await StatelessVerkleStateManager.create({
initialStateRoot: this.config.initialVerkleStateRoot,
})
const stateManager = await StatelessVerkleStateManager.create()
this.verkleVM = await VM.create({
common: this.config.execCommon,
blockchain: this.chain.blockchain,
Expand Down
3 changes: 0 additions & 3 deletions packages/statemanager/src/statelessVerkleStateManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ export interface StatelessVerkleStateManagerOpts {
codeCacheOpts?: CacheOptions
accesses?: AccessWitness
verkleCrypto?: VerkleCrypto
initialStateRoot?: Uint8Array
}

const PUSH_OFFSET = 95
Expand Down Expand Up @@ -232,8 +231,6 @@ export class StatelessVerkleStateManager implements EVMStateManagerInterface {
})
}

this._cachedStateRoot = opts.initialStateRoot

this.keccakFunction = opts.common?.customCrypto.keccak256 ?? keccak256

if (opts.verkleCrypto === undefined) {
Expand Down

0 comments on commit aaa6b64

Please sign in to comment.