draft: implement eof_create_inputs definitions#648
Open
Conversation
clarus
reviewed
Jan 24, 2025
| Parameter eof_decode : Bytes.t -> Eof.t. | ||
|
|
||
| Definition new (caller : Address.t) (value : U256.t) | ||
| (gas_limit : U64.t) (kind : EOFCreateKind.t) : Self := |
Collaborator
There was a problem hiding this comment.
We do not create any definitions in the links mode and only write run_new. This is one advantage of the links approach. Here the statement would be something like:
Definition run_new (caller : Address.t) (value : U256.t) (gas_limit : U64.t) (kind : EOFCreateKind.t) :
{{
(* the name is in the translation file and might be longer with more module prefixes *)
Impl_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInputs.new
[] [] [φ caller; φ value; φ gas_limit; φ kind] ⇓
fun (v : Self) => inl (φ v)
}}.
Proof.Then for an example of proof there is the file https://github.com/formal-land/coq-of-rust/blob/main/CoqOfRust/revm/links/interpreter/interpreter/gas.v , although it is still quite experimental.
| Definition new_opcode (caller : Address.t) (created_address : Address.t) | ||
| (value : U256.t) (eof_init_code : Eof.t) | ||
| (gas_limit : U64.t) (input : Bytes.t) : Self := | ||
| new caller value gas_limit (EOFCreateKind.Opcode eof_init_code input created_address). |
Collaborator
There was a problem hiding this comment.
Same as with the new function!
d70bfdc to
6bf7f68
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.