-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run benchmarks on raw VM #2
base: performance
Are you sure you want to change the base?
Conversation
src/SimpleChain.ts
Outdated
|
||
async sendTransaction (signedTransaction: HexData): Promise<Hash> { | ||
const hash = await this.vm.addPendingTransaction(signedTransaction) | ||
if (this.options.autoMining) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of things like this could be stripped, since you don't even have mine block in the provider.
Of course doing this is probably not worth the effort.
src/vm/getReceiptsAndResponses.ts
Outdated
// eslint-disable-next-line | ||
import { RunTxResult } from '@nomiclabs/ethereumjs-vm/dist/runTx' | ||
|
||
export function getReceiptsAndResponses (block: Block, transactions: Transaction[], results: RunTxResult[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably get rid of this, unless we send transactions from ethers directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not calling this function might have a performance impact, because it does a lot of buffer stringifying.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I don't send any transactions from ethers, so I think it's safe to remove it.
* remove autoMining option
This PR is not fully finished yet. The code sufficient to run all of the transactions and calls used in benchmarks against raw VM can be found in
src
andtest
directories. The existing benchmarks are yet to be adjusted to make use of that code.In order to install dependencies:
in separate terminal window:
btw don't try running benchmarks because they don't work at the moment (
start
,start:dirty
andbenchmark
scripts)