Skip to content

Fixes for the JSON IO documentation#2097

Merged
chriseth merged 9 commits intodevelopfrom
json-interface-docs
Apr 10, 2017
Merged

Fixes for the JSON IO documentation#2097
chriseth merged 9 commits intodevelopfrom
json-interface-docs

Conversation

@axic
Copy link
Contributor

@axic axic commented Mar 29, 2017

No description provided.

// The bytecode as a hex string.
object: "00fe",
// Opcodes list (string)
opcodes: "",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes more sense here, given it is against bytecode or deployedBytecode.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.

// The list of function hashes
methodIdentifiers: {
"5c19a95c": "delegate(address)",
"delegate(address)": "5c19a95c",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't matter which order this is in, but this order matches that of gasEstimates.

// See https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI
abi: [],
// See the Metadata Output documentation (serialised JSON string)
metadata: "{...}",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to figure out what to do with the metadata. Maybe it makes sense to have:

  • metadataString (serialised)
  • metadata (object)

We'll know better when doing verification.

@axic axic requested a review from chriseth March 29, 2017 21:34
methodIdentifiers: {
"5c19a95c": "delegate(address)",
"delegate(address)": "5c19a95c",
"heavyLifting()": "438dca88"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to remove this, since it is "internal" below.

@axic axic force-pushed the json-interface-docs branch from 17b3002 to 59b0bfe Compare March 30, 2017 10:12
// The bytecode as a hex string.
object: "00fe",
// Opcodes list (string)
opcodes: "",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.

userdoc: {},
// Developer documentation (natspec)
devdoc: {},
// EVM-related outputs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(two lines below): The idea was that the IR is not too EVM specific, but perhaps we can keep it here and later add an additional one higher up. In that IR we might want to use some functions which are not part of the IR itself but will be added when we know the target machine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the new IR is still not part of the compiler and indeed it seems to be different, it would make sense moving it out of of the evm object.

// evm.bytecode - Bytecode
// evm.bytecode.opcodes - Opcodes list
// evm.bytecode.sourceMap - Source mapping (useful for debugging)
// evm.deployedBytecode - Deployed bytecode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you mention that deployedBytecode and bytecode have the same structure?

// evm.methodIdentifiers - The list of function hashes
// evm.gasEstimates - Function gas estimates
// evm.bytecode - Bytecode
// evm.bytecode.opcodes - Opcodes list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add evm.bytecode.object.

Further, how does the output selector look like if I only want to have the object but not the list of opcodes? Note that the list of opcodes is useless most of the time since it does not work once you have data like the metadata hash.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably it makes more sense to only have evm.bytecode which turns on object, opcodes, sourceMaps and linkRerefences.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I don't understand your comment.

@axic axic force-pushed the json-interface-docs branch 2 times, most recently from a2c0c6a to a3c4171 Compare April 7, 2017 14:00
@axic axic force-pushed the json-interface-docs branch from a3c4171 to c22ba03 Compare April 7, 2017 14:34
@axic
Copy link
Contributor Author

axic commented Apr 10, 2017

@chriseth can we merge this?

@chriseth chriseth merged commit 9fe2065 into develop Apr 10, 2017
@axic axic deleted the json-interface-docs branch April 10, 2017 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants