-
Notifications
You must be signed in to change notification settings - Fork 208
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
Add eth-evm-code codec #61
Conversation
This is the binary found in a smart contract account, referenced in ethereum by `keccak256(evm_code_binary)`. It is binary data, which the Ethereum Virtual Machine (EVM) interprets.
This is yet another distinct ethereum format? |
@whyrusleeping It is a raw binary. The work around is using |
Hrm... if there isnt any inherent structure to the data, then i really hesitate to add another new code for it. |
In general, that's not what CIDs are for. CIDs allow one to interpret unstructured binary into structured data but shouldn't (usually) be used to determine the intended use of the data (unixfs currently does this but it but shouldn't). For example, we've considered adding a code for webasm but that's because it's an AST, not just raw binary. However, if a user provided a CBOR-encoded webasm AST, an IPLD webasm VM shouldn't care. |
I see. I'm short on argumentations, as I am not particularly clear on the overall vision of CID. While the points expressed above make sense to me, I'd like to get @kumavis feedback, as he is the "end user" of this information. |
Basically, IPLD == structured data. CIDs exist to allow us to be compatible with existing merkledags (e.g., eth, git, our own protobuf-based merkledag (used in unixfs), etc.). In general, IPLD does not encode type information beyond basic primitives such as: byte array, array, string, number, float, map, etc... (exact primitives TBD by the end of this week or I start kidnapping people). |
yeah theres not a lot of structure to this. you could index it by program counter or op code index (skipping inline data associated with an opcode) but no external links. im indifferent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of questions:
- Is there a need for this to be "serialized and deserialized"?
- Is there any local resolve to happen?
From the thread, sounds like you won't benefit from having the evm code as a IPLD Format.
No and no. 😄 Just a little bit of context...We have What are we doing now? We are importing this data, making it a "raw" ( So, as @kumavis said, there is value on identifying that this is not just ordinary raw information hashed into Do we close this PR then? |
@Stebalien is right, CID should not convey that information. That doesn't mean that the metadata information should not exist in the whole data structure. Think of CID such as Also, if I'm understanding correctly, you know that the |
All clear. Closing this issue. |
This is the binary found in a smart contract account, referenced in ethereum by
keccak256(evm_code_binary)
. It is binary data, which the Ethereum Virtual Machine (EVM) interprets.