Official Go implementation of the Ethereum protocol
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Martin HS
6d3d252a5e
core/vm/program: evm bytecode-building utility ( #30725 )
...
In many cases, there is a need to create somewhat nontrivial bytecode. A
recent example is the verkle statetests, where we want a `CREATE2`- op
to create a contract, which can then be invoked, and when invoked does a
selfdestruct-to-self.
It is overkill to go full solidity, but it is also a bit tricky do
assemble this by concatenating bytes. This PR takes an approach that
has been used in in goevmlab for several years.
Using this utility, the case can be expressed as:
```golang
// Some runtime code
runtime := program.New().Ops(vm.ADDRESS, vm.SELFDESTRUCT).Bytecode()
// A constructor returning the runtime code
initcode := program.New().ReturnData(runtime).Bytecode()
// A factory invoking the constructor
outer := program.New().Create2AndCall(initcode, nil).Bytecode()
```
We have a lot of places in the codebase where we concatenate bytes, cast
from `vm.OpCode` . By taking tihs approach instead, thos places can be made a
bit more maintainable/robust.
2 months ago
..
program
core/vm/program: evm bytecode-building utility ( #30725 )
2 months ago
runtime
core/vm/program: evm bytecode-building utility ( #30725 )
2 months ago
testdata
core/vm: more benchmarks for bls g1/g2-multiexp precompiles ( #30459 )
4 months ago
analysis_eof.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
analysis_legacy.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
analysis_legacy_test.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
common.go
all: get rid of custom MaxUint64 and MaxUint64 ( #30636 )
3 months ago
contract.go
cmd, core, params, trie: add verkle access witness gas charging ( #29338 )
9 months ago
contracts.go
common: drop BigMin and BigMax, they pollute our dep graph ( #30645 )
3 months ago
contracts_fuzz_test.go
eth/tracers: live chain tracing with hooks ( #29189 )
11 months ago
contracts_test.go
core/vm: add KZG benchmark ( #29583 )
10 months ago
doc.go
core/vm: remove JIT VM codes ( #16362 )
7 years ago
eips.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
eof.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
eof_control_flow.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
eof_immediates.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
eof_instructions.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
eof_test.go
core/vm: remove debug printout in eof test ( #30665 )
3 months ago
eof_validation.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
eof_validation_test.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
errors.go
build: update to golangci-lint 1.61.0 ( #30587 )
4 months ago
evm.go
core: add code to witness when state object is accessed ( #30698 )
3 months ago
gas.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
gas_table.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
gas_table_test.go
core/state: state reader abstraction ( #29761 )
5 months ago
instructions.go
core: add code to witness when state object is accessed ( #30698 )
3 months ago
instructions_test.go
core/vm: speed up push and interpreter loop ( #30662 )
3 months ago
interface.go
core/state: move state log mechanism to a separate layer ( #30569 )
3 months ago
interpreter.go
core/vm: speed up push and interpreter loop ( #30662 )
3 months ago
interpreter_test.go
all: get rid of custom MaxUint64 and MaxUint64 ( #30636 )
3 months ago
jump_table.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
jump_table_export.go
core: fix typos ( #28255 )
1 year ago
jump_table_test.go
all: fix typos in comments ( #28881 )
1 year ago
memory.go
core/vm: reuse Memory instances ( #30137 )
5 months ago
memory_table.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
memory_test.go
core/vm: implement EIP-5656, mcopy instruction ( #26181 )
2 years ago
opcodes.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
operations_acl.go
core/vm, cmd/evm: implement eof validation ( #30418 )
4 months ago
operations_verkle.go
all: get rid of custom MaxUint64 and MaxUint64 ( #30636 )
3 months ago
stack.go
core/vm: improved stack swap performance ( #30249 )
6 months ago
stack_table.go
core/vm: 64 bit memory and gas calculations ( #19210 )
6 years ago