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

verkle: rename code keccak #3426

Merged
merged 3 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions packages/verkle/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ export enum LeafType {
Version = 0,
Balance = 1,
Nonce = 2,
CodeKeccak = 3,
CodeHash = 3,
CodeSize = 4,
}

export const VERSION_LEAF_KEY = intToBytes(LeafType.Version)
export const BALANCE_LEAF_KEY = intToBytes(LeafType.Balance)
export const NONCE_LEAF_KEY = intToBytes(LeafType.Nonce)
export const CODE_KECCAK_LEAF_KEY = intToBytes(LeafType.CodeKeccak)
export const CODE_KECCAK_LEAF_KEY = intToBytes(LeafType.CodeHash)
export const CODE_SIZE_LEAF_KEY = intToBytes(LeafType.CodeSize)

export const HEADER_STORAGE_OFFSET = 64
Expand Down
2 changes: 1 addition & 1 deletion packages/verkle/src/util/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const getKey = (stem: Uint8Array, leaf: LeafType | Uint8Array) => {
return concatBytes(stem, BALANCE_LEAF_KEY)
case LeafType.Nonce:
return concatBytes(stem, NONCE_LEAF_KEY)
case LeafType.CodeKeccak:
case LeafType.CodeHash:
return concatBytes(stem, CODE_KECCAK_LEAF_KEY)
case LeafType.CodeSize:
return concatBytes(stem, CODE_SIZE_LEAF_KEY)
Expand Down
2 changes: 1 addition & 1 deletion packages/verkle/test/keys.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('should generate valid tree keys', () => {
LeafType.Version,
LeafType.Balance,
LeafType.Nonce,
LeafType.CodeKeccak,
LeafType.CodeHash,
LeafType.CodeSize,
]) {
const key = getKey(stem, leaf)
Expand Down
Loading