Skip to content

Should the Revive bytecode hash be compliant with Solidity metadata? #219

Description

@smiasojed

The tooling around compiler needs to parse the metadata and does not expect keccak256 as bytecode hash.

Context:
In solidity we have bytecode hash and metadata hash
Solidity bytecode hash can have the following values:

Ipfs,
None,
Bzzr1,

In revive probably we do not have metadata hash (solidity adds metadata hash to bytecode)

I looks that we are using as bytecode hash the Polkavm::MetadataHash

pub enum MetadataHash {
    /// Do not include bytecode hash.
    #[serde(rename = "none")]
    None,
    /// The default keccak256 hash.
    #[serde(rename = "keccak256")]
    Keccak256,
}

This suggests that Revive is using PolkaVM::MetadataHash instead of the Solidity-defined bytecode hash options, which might cause compatibility issues with Solidity tooling.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions