Skip to content

Commit

Permalink
util: Remove ssz from monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed May 22, 2023
1 parent dd8afc5 commit ee5f329
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 183 deletions.
50 changes: 0 additions & 50 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions packages/block/src/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
hexStringToBytes,
intToHex,
isHexPrefixed,
ssz,
} from '@ethereumjs/util'
import { keccak256 } from 'ethereum-cryptography/keccak'

Expand Down Expand Up @@ -66,14 +65,6 @@ export class Block {
return trie.root()
}

/**
* Returns the ssz root for array of withdrawal transactions.
* @param wts array of Withdrawal to compute the root of
*/
public static async generateWithdrawalsSSZRoot(withdrawals: Withdrawal[]) {
ssz.Withdrawals.hashTreeRoot(withdrawals.map((wt) => wt.toValue()))
}

/**
* Returns the txs trie root for array of TypedTransaction
* @param txs array of TypedTransaction to compute the root of
Expand Down
1 change: 0 additions & 1 deletion packages/tx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"tsc": "../../config/cli/ts-compile.sh"
},
"dependencies": {
"@chainsafe/ssz": "^0.11.1",
"@ethereumjs/common": "^3.1.2",
"@ethereumjs/rlp": "^4.0.1",
"@ethereumjs/util": "^8.0.6",
Expand Down
3 changes: 1 addition & 2 deletions packages/tx/src/eip4844Transaction.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { byteArrayEquals } from '@chainsafe/ssz'
import { RLP } from '@ethereumjs/rlp'
import {
MAX_INTEGER,
Expand Down Expand Up @@ -58,7 +57,7 @@ const validateBlobTransactionNetworkWrapper = (

for (let x = 0; x < versionedHashes.length; x++) {
const computedVersionedHash = computeVersionedHash(commitments[x], version)
if (!byteArrayEquals(computedVersionedHash, versionedHashes[x])) {
if (!equalsBytes(computedVersionedHash, versionedHashes[x])) {
throw new Error(`commitment for blob at index ${x} does not match versionedHash`)
}
}
Expand Down
1 change: 0 additions & 1 deletion packages/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
"tsc": "../../config/cli/ts-compile.sh"
},
"dependencies": {
"@chainsafe/ssz": "^0.11.1",
"@ethereumjs/rlp": "^4.0.1",
"ethereum-cryptography": "^2.0.0"
},
Expand Down
5 changes: 0 additions & 5 deletions packages/util/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ export * from './signature'
*/
export * from './bytes'

/**
* SSZ containers
*/
export * as ssz from './ssz'

/**
* Helpful TypeScript types
*/
Expand Down
24 changes: 0 additions & 24 deletions packages/util/src/ssz.ts

This file was deleted.

91 changes: 0 additions & 91 deletions packages/util/test/ssz.spec.ts

This file was deleted.

0 comments on commit ee5f329

Please sign in to comment.