Skip to content
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

Remove devnet6 trusted setup #3288

Merged
merged 3 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
2 changes: 1 addition & 1 deletion packages/block/test/eip4844block.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const isBrowser = new Function('try {return this===window;}catch(e){ return fals

if (isBrowser() === false) {
try {
initKZG(kzg, __dirname + '/../../client/src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../client/src/trustedSetups/official.txt')
} catch {
// no-op
}
Expand Down
2 changes: 1 addition & 1 deletion packages/block/test/from-beacon-payload.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import * as payload87475 from './testdata/payload-slot-87475.json'
import * as testnetVerkleKaustinen from './testdata/testnetVerkleKaustinen.json'

try {
initKZG(kzg, __dirname + '/../../client/src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../client/src/trustedSetups/official.txt')
} catch {
// no-op
}
Expand Down
2 changes: 1 addition & 1 deletion packages/client/devnets/4844-interop/tools/txGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import * as kzg from 'c-kzg'
import { randomBytes } from '@ethereumjs/util'
import { Client } from 'jayson/promise'

initKZG(kzg, __dirname + '/../../../src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../../src/trustedSetups/official.txt')

// CLI Args
const clientPort = parseInt(process.argv[2]) // EL client port number
Expand Down
4,163 changes: 0 additions & 4,163 deletions packages/client/src/trustedSetups/devnet6.txt

This file was deleted.

4 changes: 2 additions & 2 deletions packages/client/test/miner/pendingBlock.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ describe('[PendingBlock]', async () => {

it('construct blob bundles', async () => {
try {
initKZG(kzg, __dirname + '/../../src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../src/trustedSetups/official.txt')
} catch {
// no-op
}
Expand Down Expand Up @@ -438,7 +438,7 @@ describe('[PendingBlock]', async () => {
it('should exclude missingBlobTx', async () => {
const gethGenesis = require('../../../block/test/testdata/4844-hardfork.json')
try {
initKZG(kzg, __dirname + '/../../src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../src/trustedSetups/official.txt')
} catch {
//no-op
}
Expand Down
4 changes: 2 additions & 2 deletions packages/client/test/rpc/engine/getPayloadV3.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe(method, () => {
}

try {
initKZG(kzg, __dirname + '/../../../src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../../src/trustedSetups/official.txt')
} catch {
//no-op
}
Expand Down Expand Up @@ -119,7 +119,7 @@ describe(method, () => {
const { executionPayload, blobsBundle } = res.result
assert.equal(
executionPayload.blockHash,
'0xe8175305416ee94c996164162044338b4f4d93a8dc458b574ecad4ce84323fb5',
'0x8c71ad199a3dda94de6a1c31cc50a26b1f03a8a4924e9ea3fd7420c6411cac42',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with this change, however, how do we know this is correct?

'built expected block'
)
assert.equal(executionPayload.excessBlobGas, '0x0', 'correct execess blob gas')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const [blockData] = blocks
describe(`${method}: Cancun validations`, () => {
it('blobVersionedHashes', async () => {
try {
initKZG(kzg, __dirname + '/../../../src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../../src/trustedSetups/official.txt')
} catch {
// no-op
}
Expand Down
2 changes: 1 addition & 1 deletion packages/client/test/rpc/eth/getBlockByNumber.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { INVALID_PARAMS } from '../../../src/rpc/error-code.js'
import { createClient, createManager, dummy, getRpcClient, startRPC } from '../helpers.js'

try {
initKZG(kzg, __dirname + '/../../../src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../../src/trustedSetups/official.txt')
} catch {
// no-op
}
Expand Down
2 changes: 1 addition & 1 deletion packages/client/test/rpc/eth/getTransactionReceipt.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe(method, () => {
} else {
const gethGenesis = require('../../../../block/test/testdata/4844-hardfork.json')
try {
initKZG(kzg, __dirname + '/../../../src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../../src/trustedSetups/official.txt')
} catch {
// no-op
}
Expand Down
2 changes: 1 addition & 1 deletion packages/client/test/rpc/eth/sendRawTransaction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ describe(method, () => {
BlockHeader.prototype['_consensusFormatValidation'] = (): any => {}
const gethGenesis = require('../../../../block/test/testdata/4844-hardfork.json')
try {
initKZG(kzg, __dirname + '/../../../src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../../src/trustedSetups/official.txt')
} catch {
// no-op
}
Expand Down
36 changes: 16 additions & 20 deletions packages/evm/test/precompiles/0a-pointevaluation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Precompiles: point evaluation', () => {
if (isBrowser() === false) {
const genesisJSON = require('../../../client/test/testdata/geth-genesis/eip4844.json')
try {
initKZG(kzg, __dirname + '/../../../client/src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../../client/src/trustedSetups/official.txt')
} catch {
// no-op
}
Expand All @@ -41,28 +41,24 @@ describe('Precompiles: point evaluation', () => {
const pointEvaluation = getActivePrecompiles(common).get(addressStr)!

const testCase = {
Proof: hexToBytes(
'0x8ad6f539bc7280de6af4c95e7cef39bb6873f18c46ee5eb67299324ee7c6e6da71be2dbd5e2cbafbae4b2d60b40a808c'
commitment: hexToBytes(
'0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
),
Commitment: hexToBytes(
'0xabb6bcbe313530ce7779abdf633d5a3594a41fbad9a79f4a9b46b89c0cfe78f6a15948dec92c4404aedac8b5e7dd6059'
),
InputPoint: hexToBytes(
'0x0000000000000000000000000000000000000000000000000000000000002001'
),
ClaimedValue: hexToBytes(
'0x0f69060fb771fa559a9e842e1dd79dde8a107486e801707032d93b5965d0cd48'
z: hexToBytes('0x0000000000000000000000000000000000000000000000000000000000000002'),
y: hexToBytes('0x0000000000000000000000000000000000000000000000000000000000000000'),
proof: hexToBytes(
'0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
),
}
const versionedHash = computeVersionedHash(testCase.Commitment, 1)
const versionedHash = computeVersionedHash(testCase.commitment, 1)

const opts: PrecompileInput = {
data: concatBytes(
versionedHash,
testCase.InputPoint,
testCase.ClaimedValue,
testCase.Commitment,
testCase.Proof
testCase.z,
testCase.y,
testCase.commitment,
testCase.proof
),
gasLimit: 0xfffffffffn,
_EVM: evm,
Expand All @@ -79,10 +75,10 @@ describe('Precompiles: point evaluation', () => {
const optsWithInvalidCommitment: PrecompileInput = {
data: concatBytes(
concatBytes(Uint8Array.from([0]), versionedHash.slice(1)),
testCase.InputPoint,
testCase.ClaimedValue,
testCase.Commitment,
testCase.Proof
testCase.z,
testCase.y,
testCase.commitment,
testCase.proof
),
gasLimit: 0xfffffffffn,
_EVM: evm,
Expand Down
2 changes: 1 addition & 1 deletion packages/tx/examples/blobTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BlobEIP4844Transaction } from '@ethereumjs/tx'
import { bytesToHex, initKZG } from '@ethereumjs/util'
import * as kzg from 'c-kzg'

initKZG(kzg, __dirname + '/../../client/src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../client/src/trustedSetups/official.txt')

const common = new Common({
chain: Chain.Mainnet,
Expand Down
49 changes: 11 additions & 38 deletions packages/tx/test/eip4844.spec.ts

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions packages/tx/test/json/serialized4844tx.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/tx/tx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/vm/test/api/EIPs/eip-4844-blobs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('EIP4844 tests', () => {
it('should build a block correctly with blobs', async () => {
if (isBrowser() === false) {
try {
initKZG(kzg, __dirname + '/../../../../client/src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../../../client/src/trustedSetups/official.txt')
} catch {
// no-op
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vm/test/api/runTx.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ describe('EIP 4844 transaction tests', () => {

if (isBrowser() === false) {
try {
initKZG(kzg, __dirname + '/../../../client/src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../../client/src/trustedSetups/official.txt')
} catch {
// no-op
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vm/test/tester/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export function getCommon(network: string): Common {
}
}
try {
initKZG(kzg, __dirname + '/../../../client/src/trustedSetups/devnet6.txt')
initKZG(kzg, __dirname + '/../../../client/src/trustedSetups/official.txt')
} catch {
// no-op
}
Expand Down
Loading