Skip to content

Commit

Permalink
V7 update to master 1 (#2593)
Browse files Browse the repository at this point in the history
* Added v7 release reference in main README table (#2562)

* common: Schedule shanghai on goerli (#2563)

* common: Schedule shanghai on goerli

* update timestamp

* util/tx: Shift ssz back to case dependency free ES2019 compatible version (#2564)

* util/tx: Shift ssz back to case dependency free ES2019 compatible version

* update package lock

* update karma ecma version

* VM: some optimization on the bnadd/bnmul precompiles to only copy over the necessary 128 bytes as input for the WASM call (#2568)

* EVM: Memory Fix & Other Optimizations (#2570)

* EVM: Rename evm debug logger to evm:evm (one for package, one for class), consistency, also, logger will otherwise be left out when run with evm:*

* VM: Rename message checkpoint to state checkpoint in debug message (there is a dedicated message checkpoint msg along msg logging)

* EVM: CALL/CREATE debug exit msg differentiation

* EVM: avoid buffer copy in memory read (performance)

* EVM: Rewrite runCall() checkpoint/revert conditional for readability/simplification

* EVM: Added EIP check for transient storage checkpointing

* EVM: Precompile Debug Logger Improvements (#2572)

* EVM: Added general precompile debug logger setup, first ECRECOVER exemplary debug logging

* EVM: Added remaining precompile debug loggers

* EVM: added error cases to BLS precompile debug log

* EVM: Added missing precompile return value debug logs

* Small fixes

* tx: ensure eip3860 txs can have more than max_initcode_size data if to field is non-empty (#2575)

* EVM: Avoid memory.read() Memory Copy (#2573)

* EVM: added avoidCopy parameter to memory.read() function, first test on CREATE opcode

* EVM: Add direct memory read to all calling opcodes

* EVM: Copy over memory on IDENTITY precompile

* EVM: remove length checks and return buffer 0-filling in Memory.read() (memory is uncoditionally being extended properly anyhow)

* Some optimizations

* blockchain: fix merge->clique transition (#2571)

* Client: ensure safe/finalized blocks are part of the canonical chain on forkchoiceUpdated (#2577)

* client/engine: ensure finalized/safe blocks are in canonical chain

* client: engine-api: fix finalized block check

* client/tests: fix forkchoice updated test

* client: add fcu tests to check if blocks are part of canonical chain

* client/engine: ensure payload has a valid timestamp forkchoiceUpdated (#2579)

* client/engine: ensure invalid blockhash response matches spec (#2583)

* client/engine: delete invalid skeleton blocks (#2584)

Co-authored-by: acolytec3 <17355484+acolytec3@users.noreply.github.com>

* Setup to dev/test snapsync with sim architecture (#2574)

* Setup to dev/test snapsync with sim architecture

* modfiy single-run to setup a lodestar<>geth node to snapsync from

* setup an ethereumjs inline client and get it to peer with geth

* cleanup setup a bit

* snapsync run spec

* get the snap testdev sim working

* finalize the test infra and update usage doc

* enhance coverage

* Use geth RPC to connect to ethJS

* refac wait for snap sync completion

---------

Co-authored-by: acolytec3 <17355484+acolytec3@users.noreply.github.com>

* client: Add safe and finalized blockoptions to the chain (#2585)

* client: Add safe and finalized blockoptions to the chain

* fix tests

* fix more tests

* fix remaining

* cleanup

* enhance coverage

* unset scheduled goerli timestamp based hfs colliding with test

* Client: Small Debug Helpers and CLI Improvements (#2586)

* Client: new constant MAX_TOLERATED_BLOCK_TIME for execution, added warning for slowly executed blocks

* Client -> Execution: NumBlocksPerIteration (default: 50) as an option

* Client: only restart RLPx server or log peer stats if max peers is set to be greater than 0

* Apply suggestions from code review

Co-authored-by: acolytec3 <17355484+acolytec3@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: acolytec3 <17355484+acolytec3@users.noreply.github.com>

* common: Schedule Shanghai on mainnet! (#2591)

* common: Schedule Shanghai on mainnet!

* clear hf timestamp for test

* VM: Diff-based Touched Accounts Checkpointing (#2581)

* VM: Switched to a more efficient diff-based way of touched account checkpointing

* VM: move accessed storage inefficient checkpointing problem to berlin, haha

* EVM: avoid memory copy in MLOAD opcode function

* Remove console.log() in EVM

* vmState: ensure touched accounts delete stack gets properly updated on commit

* vm/eei: save touched height

* vm/vmState: new possible fix for touched accounts

* vm/vmState: another attempt to fix touched accounts journaling

* vm: add journaling

* Check correct journal height on revert

---------

Co-authored-by: Jochem Brouwer <jochembrouwer96@gmail.com>
Co-authored-by: acolytec3 <17355484+acolytec3@users.noreply.github.com>

---------

Co-authored-by: Holger Drewes <Holger.Drewes@gmail.com>
Co-authored-by: g11tech <gajinder@g11.in>
Co-authored-by: Jochem Brouwer <jochembrouwer96@gmail.com>
  • Loading branch information
4 people committed Mar 27, 2023
1 parent e2ec03c commit 75b4e8b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 5 deletions.
5 changes: 2 additions & 3 deletions packages/client/lib/sync/snapsync.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DefaultStateManager } from '@ethereumjs/statemanager'
import { bytesToHex } from '@ethereumjs/util'

import { Event } from '../types'

Expand Down Expand Up @@ -123,9 +124,7 @@ export class SnapSynchronizer extends Synchronizer {
// eslint-disable-next-line eqeqeq
if (this.config.syncTargetHeight == null || this.config.syncTargetHeight < latest.number) {
this.config.syncTargetHeight = height
this.config.logger.info(
`New sync target height=${height} hash=${latest.hash().toString('hex')}`
)
this.config.logger.info(`New sync target height=${height} hash=${bytesToHex(latest.hash())}`)
}

// For convenient testing
Expand Down
5 changes: 5 additions & 0 deletions packages/tx/src/eip1559Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ export class FeeMarketEIP1559Transaction extends BaseTransaction<FeeMarketEIP155
this._validateYParity()
this._validateHighS()

const createContract = txData.to === undefined || txData.to === null
if (createContract && this.common.isActivatedEIP(3860)) {
checkMaxInitCodeSize(this.common, this.data.length)
}

const freeze = opts?.freeze ?? true
if (freeze) {
Object.freeze(this)
Expand Down
6 changes: 5 additions & 1 deletion packages/tx/src/eip2930Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { keccak256 } from 'ethereum-cryptography/keccak'

import { BaseTransaction } from './baseTransaction'
import { AccessLists } from './util'
import { AccessLists, checkMaxInitCodeSize } from './util'

import type {
AccessList,
Expand Down Expand Up @@ -169,6 +169,10 @@ export class AccessListEIP2930Transaction extends BaseTransaction<AccessListEIP2
this._validateYParity()
this._validateHighS()

const createContract = txData.to === undefined || txData.to === null
if (createContract && this.common.isActivatedEIP(3860)) {
checkMaxInitCodeSize(this.common, this.data.length)
}
const freeze = opts?.freeze ?? true
if (freeze) {
Object.freeze(this)
Expand Down
7 changes: 6 additions & 1 deletion packages/tx/src/eip4844Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
BlobTransactionType,
SignedBlobTransactionType,
} from './types'
import { AccessLists, blobTxToNetworkWrapperDataFormat } from './util'
import { AccessLists, blobTxToNetworkWrapperDataFormat, checkMaxInitCodeSize } from './util'
import { computeVersionedHash } from './utils/blobHelpers'

import type {
Expand Down Expand Up @@ -143,6 +143,11 @@ export class BlobEIP4844Transaction extends BaseTransaction<BlobEIP4844Transacti
this._validateYParity()
this._validateHighS()

const createContract = txData.to === undefined || txData.to === null
if (createContract && this.common.isActivatedEIP(3860)) {
checkMaxInitCodeSize(this.common, this.data.length)
}

for (const hash of this.versionedHashes) {
if (hash.length !== 32) {
const msg = this._errorMsg('versioned hash is invalid length')
Expand Down
6 changes: 6 additions & 0 deletions packages/tx/src/legacyTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { keccak256 } from 'ethereum-cryptography/keccak'

import { BaseTransaction } from './baseTransaction'
import { Capability } from './types'
import { checkMaxInitCodeSize } from './util'

import type { JsonTx, TxData, TxOptions, TxValuesArray } from './types'
import type { Common } from '@ethereumjs/common'
Expand Down Expand Up @@ -133,6 +134,11 @@ export class Transaction extends BaseTransaction<Transaction> {
}
}

const createContract = txData.to === undefined || txData.to === null
if (createContract && this.common.isActivatedEIP(3860)) {
checkMaxInitCodeSize(this.common, this.data.length)
}

const freeze = opts?.freeze ?? true
if (freeze) {
Object.freeze(this)
Expand Down

0 comments on commit 75b4e8b

Please sign in to comment.