forked from ethereumjs/ethereumjs-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheip4844.spec.ts
660 lines (610 loc) · 20.4 KB
/
eip4844.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
import { Common, Hardfork } from '@ethereumjs/common'
import {
Address,
blobsToCommitments,
blobsToProofs,
bytesToHex,
commitmentsToVersionedHashes,
concatBytes,
ecsign,
equalsBytes,
getBlobs,
hexToBytes,
initKZG,
} from '@ethereumjs/util'
import { randomBytes } from 'crypto'
import { createKZG } from 'kzg-wasm'
import { assert, beforeAll, describe, it } from 'vitest'
import gethGenesis from '../../block/test/testdata/4844-hardfork.json'
import { BlobEIP4844Transaction, TransactionFactory } from '../src/index.js'
import blobTx from './json/serialized4844tx.json'
const pk = randomBytes(32)
describe('EIP4844 addSignature tests', () => {
let common: Common
beforeAll(async () => {
const kzg = await createKZG()
initKZG(kzg)
common = Common.fromGethGenesis(gethGenesis, {
chain: 'customChain',
hardfork: Hardfork.Cancun,
customCrypto: { kzg },
})
})
it('addSignature() -> correctly adds correct signature values', () => {
const privateKey = pk
const tx = BlobEIP4844Transaction.fromTxData(
{
to: Address.zero(),
blobVersionedHashes: [concatBytes(new Uint8Array([1]), randomBytes(31))],
},
{ common }
)
const signedTx = tx.sign(privateKey)
const addSignatureTx = tx.addSignature(signedTx.v!, signedTx.r!, signedTx.s!)
assert.deepEqual(signedTx.toJSON(), addSignatureTx.toJSON())
})
it('addSignature() -> correctly converts raw ecrecover values', () => {
const privKey = pk
const tx = BlobEIP4844Transaction.fromTxData(
{
to: Address.zero(),
blobVersionedHashes: [concatBytes(new Uint8Array([1]), randomBytes(31))],
},
{ common }
)
const msgHash = tx.getHashedMessageToSign()
const { v, r, s } = ecsign(msgHash, privKey)
const signedTx = tx.sign(privKey)
const addSignatureTx = tx.addSignature(v, r, s, true)
assert.deepEqual(signedTx.toJSON(), addSignatureTx.toJSON())
})
it('addSignature() -> throws when adding the wrong v value', () => {
const privKey = pk
const tx = BlobEIP4844Transaction.fromTxData(
{
to: Address.zero(),
blobVersionedHashes: [concatBytes(new Uint8Array([1]), randomBytes(31))],
},
{ common }
)
const msgHash = tx.getHashedMessageToSign()
const { v, r, s } = ecsign(msgHash, privKey)
assert.throws(() => {
// This will throw, since we now try to set either v=27 or v=28
tx.addSignature(v, r, s, false)
})
})
})
describe('EIP4844 constructor tests - valid scenarios', () => {
let common: Common
beforeAll(async () => {
const kzg = await createKZG()
initKZG(kzg)
common = Common.fromGethGenesis(gethGenesis, {
chain: 'customChain',
hardfork: Hardfork.Cancun,
customCrypto: { kzg },
})
})
it('should work', () => {
const txData = {
type: 0x03,
blobVersionedHashes: [concatBytes(new Uint8Array([1]), randomBytes(31))],
maxFeePerBlobGas: 1n,
to: Address.zero(),
}
const tx = BlobEIP4844Transaction.fromTxData(txData, { common })
assert.equal(tx.type, 3, 'successfully instantiated a blob transaction from txData')
const factoryTx = TransactionFactory.fromTxData(txData, { common })
assert.equal(factoryTx.type, 3, 'instantiated a blob transaction from the tx factory')
const serializedTx = tx.serialize()
assert.equal(serializedTx[0], 3, 'successfully serialized a blob tx')
const deserializedTx = BlobEIP4844Transaction.fromSerializedTx(serializedTx, { common })
assert.equal(deserializedTx.type, 3, 'deserialized a blob tx')
const signedTx = tx.sign(pk)
const sender = signedTx.getSenderAddress().toString()
const decodedTx = BlobEIP4844Transaction.fromSerializedTx(signedTx.serialize(), { common })
assert.equal(
decodedTx.getSenderAddress().toString(),
sender,
'signature and sender were deserialized correctly'
)
})
})
describe('fromTxData using from a json', () => {
let common: Common
beforeAll(async () => {
const kzg = await createKZG()
initKZG(kzg)
common = Common.fromGethGenesis(gethGenesis, {
chain: 'customChain',
hardfork: Hardfork.Cancun,
customCrypto: { kzg },
})
})
it('should work', () => {
const txData = {
type: '0x3',
nonce: '0x0',
gasPrice: null,
maxPriorityFeePerGas: '0x12a05f200',
maxFeePerGas: '0x12a05f200',
gasLimit: '0x33450',
value: '0xbc614e',
data: '0x',
v: '0x0',
r: '0x8a83833ec07806485a4ded33f24f5cea4b8d4d24dc8f357e6d446bcdae5e58a7',
s: '0x68a2ba422a50cf84c0b5fcbda32ee142196910c97198ffd99035d920c2b557f8',
to: '0xffb38a7a99e3e2335be83fc74b7faa19d5531243',
chainId: '0x28757b3',
accessList: null,
maxFeePerBlobGas: '0xb2d05e00',
blobVersionedHashes: ['0x01b0a4cdd5f55589f5c5b4d46c76704bb6ce95c0a8c09f77f197a57808dded28'],
}
const txMeta = {
hash: '0xe5e02be0667b6d31895d1b5a8b916a6761cbc9865225c6144a3e2c50936d173e',
serialized:
'0x03f89b84028757b38085012a05f20085012a05f2008303345094ffb38a7a99e3e2335be83fc74b7faa19d553124383bc614e80c084b2d05e00e1a001b0a4cdd5f55589f5c5b4d46c76704bb6ce95c0a8c09f77f197a57808dded2880a08a83833ec07806485a4ded33f24f5cea4b8d4d24dc8f357e6d446bcdae5e58a7a068a2ba422a50cf84c0b5fcbda32ee142196910c97198ffd99035d920c2b557f8',
}
const c = common.copy()
c['_chainParams'] = Object.assign({}, common['_chainParams'], {
chainId: Number(txData.chainId),
})
try {
const tx = BlobEIP4844Transaction.fromTxData(txData, { common: c })
assert.ok(true, 'Should be able to parse a json data and hash it')
assert.equal(typeof tx.maxFeePerBlobGas, 'bigint', 'should be able to parse correctly')
assert.equal(bytesToHex(tx.serialize()), txMeta.serialized, 'serialization should match')
// TODO: fix the hash
assert.equal(bytesToHex(tx.hash()), txMeta.hash, 'hash should match')
const jsonData = tx.toJSON()
// override few fields with equivalent values to have a match
assert.deepEqual(
{ ...txData, accessList: [] },
{ gasPrice: null, ...jsonData },
'toJSON should give correct json'
)
const fromSerializedTx = BlobEIP4844Transaction.fromSerializedTx(
hexToBytes(txMeta.serialized),
{ common: c }
)
assert.equal(
bytesToHex(fromSerializedTx.hash()),
txMeta.hash,
'fromSerializedTx hash should match'
)
} catch (e) {
assert.fail('failed to parse json data')
}
})
})
describe('EIP4844 constructor tests - invalid scenarios', () => {
let common: Common
beforeAll(async () => {
const kzg = await createKZG()
initKZG(kzg)
common = Common.fromGethGenesis(gethGenesis, {
chain: 'customChain',
hardfork: Hardfork.Cancun,
customCrypto: { kzg },
})
})
it('should work', () => {
const baseTxData = {
type: 0x03,
maxFeePerBlobGas: 1n,
to: Address.zero(),
}
const shortVersionHash = {
blobVersionedHashes: [concatBytes(new Uint8Array([3]), randomBytes(3))],
}
const invalidVersionHash = {
blobVersionedHashes: [concatBytes(new Uint8Array([3]), randomBytes(31))],
}
const tooManyBlobs = {
blobVersionedHashes: [
concatBytes(new Uint8Array([1]), randomBytes(31)),
concatBytes(new Uint8Array([1]), randomBytes(31)),
concatBytes(new Uint8Array([1]), randomBytes(31)),
],
}
try {
BlobEIP4844Transaction.fromTxData({ ...baseTxData, ...shortVersionHash }, { common })
} catch (err: any) {
assert.ok(
err.message.includes('versioned hash is invalid length'),
'throws on invalid versioned hash length'
)
}
try {
BlobEIP4844Transaction.fromTxData({ ...baseTxData, ...invalidVersionHash }, { common })
} catch (err: any) {
assert.ok(
err.message.includes('does not start with KZG commitment'),
'throws on invalid commitment version'
)
}
try {
BlobEIP4844Transaction.fromTxData({ ...baseTxData, ...tooManyBlobs }, { common })
} catch (err: any) {
assert.ok(
err.message.includes('tx can contain at most'),
'throws on too many versioned hashes'
)
}
})
})
describe('Network wrapper tests', () => {
let common: Common
beforeAll(async () => {
const kzg = await createKZG()
initKZG(kzg)
common = Common.fromGethGenesis(gethGenesis, {
chain: 'customChain',
hardfork: Hardfork.Cancun,
customCrypto: { kzg },
})
})
it('should work', async () => {
const blobs = getBlobs('hello world')
const commitments = blobsToCommitments(blobs)
const blobVersionedHashes = commitmentsToVersionedHashes(commitments)
const proofs = blobsToProofs(blobs, commitments)
const unsignedTx = BlobEIP4844Transaction.fromTxData(
{
blobVersionedHashes,
blobs,
kzgCommitments: commitments,
kzgProofs: proofs,
maxFeePerBlobGas: 100000000n,
gasLimit: 0xffffffn,
to: randomBytes(20),
},
{ common }
)
const signedTx = unsignedTx.sign(pk)
const sender = signedTx.getSenderAddress().toString()
const wrapper = signedTx.serializeNetworkWrapper()
const deserializedTx = BlobEIP4844Transaction.fromSerializedBlobTxNetworkWrapper(wrapper, {
common,
})
assert.equal(
deserializedTx.type,
0x03,
'successfully deserialized a blob transaction network wrapper'
)
assert.equal(deserializedTx.blobs?.length, blobs.length, 'contains the correct number of blobs')
assert.equal(
deserializedTx.getSenderAddress().toString(),
sender,
'decoded sender address correctly'
)
const minimalTx = BlobEIP4844Transaction.minimalFromNetworkWrapper(deserializedTx, { common })
assert.ok(minimalTx.blobs === undefined, 'minimal representation contains no blobs')
assert.ok(
equalsBytes(minimalTx.hash(), deserializedTx.hash()),
'has the same hash as the network wrapper version'
)
const simpleBlobTx = BlobEIP4844Transaction.fromTxData(
{
blobsData: ['hello world'],
maxFeePerBlobGas: 100000000n,
gasLimit: 0xffffffn,
to: randomBytes(20),
},
{ common }
)
assert.equal(
bytesToHex(unsignedTx.blobVersionedHashes[0]),
bytesToHex(simpleBlobTx.blobVersionedHashes[0]),
'tx versioned hash for simplified blob txData constructor matches fully specified versioned hashes'
)
assert.throws(
() =>
BlobEIP4844Transaction.fromTxData(
{
blobsData: ['hello world'],
blobs: ['hello world'],
maxFeePerBlobGas: 100000000n,
gasLimit: 0xffffffn,
to: randomBytes(20),
},
{ common }
),
'encoded blobs',
undefined,
'throws on blobsData and blobs in txData'
)
assert.throws(
() =>
BlobEIP4844Transaction.fromTxData(
{
blobsData: ['hello world'],
kzgCommitments: ['0xabcd'],
maxFeePerBlobGas: 100000000n,
gasLimit: 0xffffffn,
to: randomBytes(20),
},
{ common }
),
'KZG commitments',
undefined,
'throws on blobsData and KZG commitments in txData'
)
assert.throws(
() =>
BlobEIP4844Transaction.fromTxData(
{
blobsData: ['hello world'],
blobVersionedHashes: ['0x01cd'],
maxFeePerBlobGas: 100000000n,
gasLimit: 0xffffffn,
to: randomBytes(20),
},
{ common }
),
'versioned hashes',
undefined,
'throws on blobsData and versioned hashes in txData'
)
assert.throws(
() =>
BlobEIP4844Transaction.fromTxData(
{
blobsData: ['hello world'],
kzgProofs: ['0x01cd'],
maxFeePerBlobGas: 100000000n,
gasLimit: 0xffffffn,
to: randomBytes(20),
},
{ common }
),
'KZG proofs',
undefined,
'throws on blobsData and KZG proofs in txData'
)
assert.throws(
() => {
BlobEIP4844Transaction.fromTxData(
{
blobVersionedHashes: [],
blobs: [],
kzgCommitments: [],
kzgProofs: [],
maxFeePerBlobGas: 100000000n,
gasLimit: 0xffffffn,
to: randomBytes(20),
},
{ common }
)
},
'tx should contain at least one blob',
undefined,
'throws a transaction with no blobs'
)
const txWithMissingBlob = BlobEIP4844Transaction.fromTxData(
{
blobVersionedHashes,
blobs: blobs.slice(1),
kzgCommitments: commitments,
kzgProofs: proofs,
maxFeePerBlobGas: 100000000n,
gasLimit: 0xffffffn,
to: randomBytes(20),
},
{ common }
)
const serializedWithMissingBlob = txWithMissingBlob.serializeNetworkWrapper()
assert.throws(
() =>
BlobEIP4844Transaction.fromSerializedBlobTxNetworkWrapper(serializedWithMissingBlob, {
common,
}),
'Number of blobVersionedHashes, blobs, and commitments not all equal',
undefined,
'throws when blobs/commitments/hashes mismatch'
)
const mangledValue = commitments[0][0]
commitments[0][0] = 154
const txWithInvalidCommitment = BlobEIP4844Transaction.fromTxData(
{
blobVersionedHashes,
blobs,
kzgCommitments: commitments,
kzgProofs: proofs,
maxFeePerBlobGas: 100000000n,
gasLimit: 0xffffffn,
to: randomBytes(20),
},
{ common }
)
const serializedWithInvalidCommitment = txWithInvalidCommitment.serializeNetworkWrapper()
assert.throws(
() =>
BlobEIP4844Transaction.fromSerializedBlobTxNetworkWrapper(serializedWithInvalidCommitment, {
common,
}),
'KZG proof cannot be verified from blobs/commitments',
undefined,
'throws when kzg proof cant be verified'
)
blobVersionedHashes[0][1] = 2
commitments[0][0] = mangledValue
const txWithInvalidVersionedHashes = BlobEIP4844Transaction.fromTxData(
{
blobVersionedHashes,
blobs,
kzgCommitments: commitments,
kzgProofs: proofs,
maxFeePerBlobGas: 100000000n,
gasLimit: 0xffffffn,
to: randomBytes(20),
},
{ common }
)
const serializedWithInvalidVersionedHashes =
txWithInvalidVersionedHashes.serializeNetworkWrapper()
assert.throws(
() =>
BlobEIP4844Transaction.fromSerializedBlobTxNetworkWrapper(
serializedWithInvalidVersionedHashes,
{
common,
}
),
'commitment for blob at index 0 does not match versionedHash',
undefined,
'throws when versioned hashes dont match kzg commitments'
)
})
})
describe('hash() and signature verification', () => {
let common: Common
beforeAll(async () => {
const kzg = await createKZG()
initKZG(kzg)
common = Common.fromGethGenesis(gethGenesis, {
chain: 'customChain',
hardfork: Hardfork.Cancun,
customCrypto: { kzg },
})
})
it('should work', async () => {
const unsignedTx = BlobEIP4844Transaction.fromTxData(
{
chainId: 1,
nonce: 1,
blobVersionedHashes: [
hexToBytes('0x01624652859a6e98ffc1608e2af0147ca4e86e1ce27672d8d3f3c9d4ffd6ef7e'),
],
maxFeePerBlobGas: 10000000n,
gasLimit: 123457n,
maxFeePerGas: 42n,
maxPriorityFeePerGas: 10n,
accessList: [
{
address: '0x0000000000000000000000000000000000000001',
storageKeys: ['0x0000000000000000000000000000000000000000000000000000000000000000'],
},
],
to: Address.zero(),
},
{ common }
)
assert.equal(
bytesToHex(unsignedTx.getHashedMessageToSign()),
'0x02560c5173b0d793ce019cfa515ece6a04a4b3f3d67eab67fbca78dd92d4ed76',
'produced the correct transaction hash'
)
const signedTx = unsignedTx.sign(
hexToBytes('0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8')
)
assert.equal(
signedTx.getSenderAddress().toString(),
'0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b',
'was able to recover sender address'
)
assert.ok(signedTx.verifySignature(), 'signature is valid')
})
})
it('getEffectivePriorityFee()', async () => {
const kzg = await createKZG()
initKZG(kzg, '')
const common = Common.fromGethGenesis(gethGenesis, {
chain: 'customChain',
hardfork: Hardfork.Cancun,
customCrypto: { kzg },
})
const tx = BlobEIP4844Transaction.fromTxData(
{
maxFeePerGas: 10,
maxPriorityFeePerGas: 8,
to: Address.zero(),
blobVersionedHashes: [concatBytes(new Uint8Array([1]), randomBytes(31))],
},
{ common }
)
assert.equal(tx.getEffectivePriorityFee(BigInt(10)), BigInt(0))
assert.equal(tx.getEffectivePriorityFee(BigInt(9)), BigInt(1))
assert.equal(tx.getEffectivePriorityFee(BigInt(8)), BigInt(2))
assert.equal(tx.getEffectivePriorityFee(BigInt(2)), BigInt(8))
assert.equal(tx.getEffectivePriorityFee(BigInt(1)), BigInt(8))
assert.equal(tx.getEffectivePriorityFee(BigInt(0)), BigInt(8))
assert.throws(() => tx.getEffectivePriorityFee(BigInt(11)))
})
describe('Network wrapper deserialization test', () => {
let common: Common
beforeAll(async () => {
const kzg = await createKZG()
initKZG(kzg)
common = Common.fromGethGenesis(gethGenesis, {
chain: 'customChain',
hardfork: Hardfork.Cancun,
customCrypto: {
kzg,
},
})
})
it('should work', async () => {
const txData = {
type: '0x3',
nonce: '0x0',
maxPriorityFeePerGas: '0x0',
maxFeePerGas: '0x0',
gasLimit: '0xffffff',
value: '0x0',
data: '0x',
v: '0x0',
r: '0x3d8cacf503f773c3ae4eed2b38ba68859063bc5ad253a4fb456b1295061f1e0b',
s: '0x616727b04ef78f58d2f521774c6261396fc21eac725ba2a2d89758eae171effb',
to: '0x1f738d535998ba73b31f38f1ecf6a6ad013eaa20',
chainId: '0x1',
accessList: [],
maxFeePerBlobGas: '0x5f5e100',
blobVersionedHashes: ['0x0172ff1d4f354eebdb3cd0cb64e41ac584359094373fd5f979bcccbd6072d936'],
}
const txMeta = {
sender: '0x652a2b04934d96c26c4710853021779fb9f525d2',
unsignedHash: '0x3103e9d2b39b26082a6e36fa0364e5b14502efa0041ad29d485737a10e03431a',
hash: '0x0118d156c8b40c92dd6ef10a09ab967904e1c25fb42ec799e80e0a6271013e46',
// 131325 bytes long i.e. ~128KB
networkSerializedHexLength: 262652, // 0x included
serialized:
'0x03f88a0180808083ffffff941f738d535998ba73b31f38f1ecf6a6ad013eaa208080c08405f5e100e1a00172ff1d4f354eebdb3cd0cb64e41ac584359094373fd5f979bcccbd6072d93680a03d8cacf503f773c3ae4eed2b38ba68859063bc5ad253a4fb456b1295061f1e0ba0616727b04ef78f58d2f521774c6261396fc21eac725ba2a2d89758eae171effb',
}
const blobs = getBlobs('hello world')
const commitments = blobsToCommitments(blobs)
const proofs = blobsToProofs(blobs, commitments)
/* eslint-disable @typescript-eslint/no-use-before-define */
const wrapper = hexToBytes(blobTx.tx)
const deserializedTx = BlobEIP4844Transaction.fromSerializedBlobTxNetworkWrapper(wrapper, {
common,
})
const jsonData = deserializedTx.toJSON()
assert.deepEqual(txData, jsonData as any, 'toJSON should give correct json')
assert.equal(deserializedTx.blobs?.length, 1, 'contains the correct number of blobs')
assert.ok(equalsBytes(deserializedTx.blobs![0], blobs[0]), 'blobs should match')
assert.ok(
equalsBytes(deserializedTx.kzgCommitments![0], commitments[0]),
'commitments should match'
)
assert.ok(equalsBytes(deserializedTx.kzgProofs![0], proofs[0]), 'proofs should match')
const unsignedHash = bytesToHex(deserializedTx.getHashedMessageToSign())
const hash = bytesToHex(deserializedTx.hash())
const networkSerialized = bytesToHex(deserializedTx.serializeNetworkWrapper())
const serialized = bytesToHex(deserializedTx.serialize())
const sender = deserializedTx.getSenderAddress().toString()
assert.equal(networkSerialized, blobTx.tx, 'network serialization should match')
assert.deepEqual(
txMeta,
{
unsignedHash,
hash,
serialized,
sender,
networkSerializedHexLength: networkSerialized.length,
},
'txMeta should match'
)
})
})