Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
75b4e8b
V7 update to master 1 (#2593)
acolytec3 Mar 20, 2023
63be503
First pass - most util changes
acolytec3 Mar 2, 2023
0f35c2f
Fix most account stuff
acolytec3 Mar 2, 2023
37a1820
Fix account test
acolytec3 Mar 3, 2023
80a23e8
Many byte fixes
acolytec3 Mar 3, 2023
e122daa
util: fix constants tests
acolytec3 Mar 3, 2023
735fcb6
remaining fixes
acolytec3 Mar 3, 2023
c67f079
Turn off ci jobs
acolytec3 Mar 3, 2023
94f4d71
monorepo: bigIntToUnpaddedBuffer -> bigIntToUnpaddedBytes
gabrocheleau Mar 5, 2023
816d956
util: update description of bytes exporT
gabrocheleau Mar 5, 2023
0b1e650
util: remove unused import
gabrocheleau Mar 5, 2023
375d032
common: use bytesToHex helper instead of toString('hex')
gabrocheleau Mar 5, 2023
03118c0
trie: refactor non-test files to Uint8Array
gabrocheleau Mar 5, 2023
8c96c6d
util: add binary string utils
gabrocheleau Mar 5, 2023
66eafa5
util: remove extra Uint8Array.from
gabrocheleau Mar 5, 2023
b605e44
util: remove arrToBufArray util
gabrocheleau Mar 5, 2023
1578e44
trie: adjust tests and fix outstanding issues
gabrocheleau Mar 6, 2023
726f9a2
util: remove binarystring utils and add compareBytes and randomBytes …
gabrocheleau Mar 6, 2023
aaf69f0
common: refactor common with Uint8Array
gabrocheleau Mar 6, 2023
556a5a5
util: accept 0x-prefixed and non-prefixed hex strings in toBytes
gabrocheleau Mar 6, 2023
7e207d1
tx: refactor Buffer -> Uint8Array
gabrocheleau Mar 6, 2023
09abad8
tx: remove unused import
gabrocheleau Mar 6, 2023
e173ed9
util: revert toBytes update
gabrocheleau Mar 6, 2023
6ce69ad
block: refactor Buffer -> uint8array
gabrocheleau Mar 6, 2023
731d369
block: adjust import
gabrocheleau Mar 6, 2023
0dd7a5b
trie: refactor remaining buffer instances
gabrocheleau Mar 8, 2023
7ee110e
move devp2p to uint8Array
acolytec3 Mar 7, 2023
7ef3ddc
statemanager: refactor buffer -> uint8array
gabrocheleau Mar 8, 2023
85d6213
util: simplify zeros
acolytec3 Mar 8, 2023
d4c1ef8
util: add concatBytesUnsafe
acolytec3 Mar 8, 2023
29bcb68
ethash: partial migration
acolytec3 Mar 8, 2023
6bd1aef
ethash: update examples
acolytec3 Mar 8, 2023
7c05bb6
ethash: wip fixes
acolytec3 Mar 9, 2023
817245f
ethash: more WIP
acolytec3 Mar 9, 2023
e733ad5
ethash: ensure fnv input is read from mix, not mixView
jochem-brouwer Mar 9, 2023
fb01eb5
blockchain: migrate to uint8array
acolytec3 Mar 9, 2023
02221ad
ethash: renable all tests
acolytec3 Mar 9, 2023
122cd69
ethash: fix bytesReverse
acolytec3 Mar 9, 2023
915ee29
Fix miner tests
acolytec3 Mar 9, 2023
34fc0ba
many hexToBytes moves
acolytec3 Mar 9, 2023
264425c
most of evm/vm moves
acolytec3 Mar 10, 2023
ff915e1
evm: Fix all tests
acolytec3 Mar 10, 2023
eb29f0b
vm: more fixes
acolytec3 Mar 10, 2023
429988e
More fixes
acolytec3 Mar 11, 2023
3f60a1a
vm: fix receipts encoding
acolytec3 Mar 11, 2023
293e741
vm: fix tester
acolytec3 Mar 11, 2023
b9c69d5
client: refactor buffer to uint8array
gabrocheleau Mar 11, 2023
50288fd
client: additional uint8 adjustments
gabrocheleau Mar 11, 2023
31a4bbb
client: fix most tests
gabrocheleau Mar 13, 2023
a529561
fix remaining client unit tests
acolytec3 Mar 13, 2023
a93ebcd
reactivate most CI
acolytec3 Mar 13, 2023
ae0e933
client: fix les test/protocol
acolytec3 Mar 13, 2023
5e36b25
turn client CI on
acolytec3 Mar 13, 2023
a6e04d4
util: fix name typo
acolytec3 Mar 13, 2023
f369283
lint
acolytec3 Mar 13, 2023
523ece3
Fix withdrawals
acolytec3 Mar 13, 2023
5a995be
remove buffarraytoarr
acolytec3 Mar 13, 2023
87249b6
Remove bufArrtoArr references
acolytec3 Mar 13, 2023
5176d41
Lint
acolytec3 Mar 13, 2023
8532dff
fix examples
acolytec3 Mar 13, 2023
de03bb3
Fix difficulty test
acolytec3 Mar 13, 2023
7c794cf
lint
acolytec3 Mar 14, 2023
5905c64
block: update randomBytes import
acolytec3 Mar 15, 2023
9f8b13f
replace randombytes import
acolytec3 Mar 15, 2023
f881400
client: fix sim test util
acolytec3 Mar 15, 2023
91879e6
vm: fix example
acolytec3 Mar 15, 2023
e906878
devp2p: update snappy typing and fix tests
acolytec3 Mar 15, 2023
56c2123
Fix tests
acolytec3 Mar 15, 2023
60f3974
Remove additional buffer references
acolytec3 Mar 15, 2023
d6bf2a6
rustbn fixes
acolytec3 Mar 16, 2023
5a33359
add 0x prefix to precompile address
acolytec3 Mar 16, 2023
603b7ed
Remove `node-ip` dependency and buffer references in devp2p
acolytec3 Mar 16, 2023
7c0700d
Switch slice to subarray
acolytec3 Mar 20, 2023
78f514c
evm: fix blake2f
jochem-brouwer Mar 20, 2023
beab716
Merge fixes
acolytec3 Mar 20, 2023
5c80a8c
more merge commit fixes
acolytec3 Mar 20, 2023
6c7ce68
more test fixes
acolytec3 Mar 20, 2023
54439f7
Address all the feedback
acolytec3 Mar 23, 2023
b2038a2
fix dns test
acolytec3 Mar 23, 2023
f00c834
Update packages/util/src/bytes.ts
acolytec3 Mar 24, 2023
5ef4ee7
Fix return type for baToJSON
acolytec3 Mar 24, 2023
20920e0
util: instantiate hexByByte array
jochem-brouwer Mar 26, 2023
90019e8
Remove baToJson
acolytec3 Mar 27, 2023
3f7fc75
rebase fixes
acolytec3 Mar 27, 2023
0c8308b
Fix event typing
acolytec3 Mar 27, 2023
1df3a55
Revert outdated initcode changes
acolytec3 Mar 27, 2023
6e1a80b
lint
acolytec3 Mar 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions packages/tx/src/eip1559Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
import { keccak256 } from 'ethereum-cryptography/keccak'

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

import type {
AccessList,
Expand Down Expand Up @@ -195,11 +195,6 @@ 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)
}
Comment thread
jochem-brouwer marked this conversation as resolved.
Outdated

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

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

import type {
AccessList,
Expand Down Expand Up @@ -175,10 +175,6 @@ 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: 1 addition & 6 deletions packages/tx/src/eip4844Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
BlobTransactionType,
SignedBlobTransactionType,
} from './types'
import { AccessLists, blobTxToNetworkWrapperDataFormat, checkMaxInitCodeSize } from './util'
import { AccessLists, blobTxToNetworkWrapperDataFormat } from './util'
import { computeVersionedHash } from './utils/blobHelpers'

import type {
Expand Down Expand Up @@ -146,11 +146,6 @@ 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
5 changes: 0 additions & 5 deletions packages/tx/src/legacyTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,6 @@ 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
12 changes: 6 additions & 6 deletions packages/tx/test/eip3860.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const addressZero = Address.zero()

tape('[EIP3860 tests]', function (t) {
t.test('Should instantiate create txs with MAX_INITCODE_SIZE', (st) => {
const data = Buffer.alloc(Number(maxInitCodeSize))
const data = new Uint8Array(Number(maxInitCodeSize))
for (const txType of txTypes) {
try {
TransactionFactory.fromTxData({ data, type: txType }, { common })
Expand All @@ -29,7 +29,7 @@ tape('[EIP3860 tests]', function (t) {
})

t.test('Should instantiate txs with MAX_INITCODE_SIZE data', (st) => {
const data = Buffer.alloc(Number(maxInitCodeSize))
const data = new Uint8Array(Number(maxInitCodeSize))
for (const txType of txTypes) {
try {
TransactionFactory.fromTxData({ data, type: txType, to: addressZero }, { common })
Expand All @@ -42,7 +42,7 @@ tape('[EIP3860 tests]', function (t) {
})

t.test('Should not instantiate create txs with MAX_INITCODE_SIZE+1 data', (st) => {
const data = Buffer.alloc(Number(maxInitCodeSize) + 1)
const data = new Uint8Array(Number(maxInitCodeSize) + 1)
for (const txType of txTypes) {
try {
TransactionFactory.fromTxData({ data, type: txType }, { common })
Expand All @@ -55,7 +55,7 @@ tape('[EIP3860 tests]', function (t) {
})

t.test('Should instantiate txs with MAX_INITCODE_SIZE+1 data', (st) => {
const data = Buffer.alloc(Number(maxInitCodeSize) + 1)
const data = new Uint8Array(Number(maxInitCodeSize) + 1)
for (const txType of txTypes) {
try {
TransactionFactory.fromTxData({ data, type: txType, to: addressZero }, { common })
Expand All @@ -70,7 +70,7 @@ tape('[EIP3860 tests]', function (t) {
tape(
'Should allow txs with MAX_INITCODE_SIZE+1 data if allowUnlimitedInitCodeSize is active',
(st) => {
const data = Buffer.alloc(Number(maxInitCodeSize) + 1)
const data = new Uint8Array(Number(maxInitCodeSize) + 1)
for (const txType of txTypes) {
try {
TransactionFactory.fromTxData(
Expand All @@ -87,7 +87,7 @@ tape('[EIP3860 tests]', function (t) {
)

tape('Should charge initcode analysis gas is allowUnlimitedInitCodeSize is active', (st) => {
const data = Buffer.alloc(Number(maxInitCodeSize))
const data = new Uint8Array(Number(maxInitCodeSize))
for (const txType of txTypes) {
const eip3860ActiveTx = TransactionFactory.fromTxData(
{ data, type: txType },
Expand Down