Skip to content

Empty account must has codehash of keccak(nil) #17

@noel2004

Description

@noel2004

According to the discussion in this issue, we should make the value codehash of empty account as keccak(nil) rather than 0.

For account gadget, an empty account can be indicated by the EMPTY type tag of mpt gadget row right above it. and we need some additional gates for these constraints: codehash = keccak(nil); balance = 0, nonce = 0, storage = 0

(notice the value of storage in original trie is keccak(rlc([])) while for our zktrie the hash of empty trie is just 0.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions