Skip to content

Conversation

ucwong
Copy link
Member

@ucwong ucwong commented Sep 21, 2023

No description provided.

* cmd/evm: improve flags handling

This fixes some issues with flags in cmd/evm. The supported flags did not
actually show up in help output because they weren't categorized. I'm also
adding the VM-related flags to the run command here so they can be given
after the subcommand name. So it can be run like this now:

   ./evm run --code 6001 --debug

* cmd/evm: enable all forks by default in run command

The default genesis was just empty with no forks at all, which is annoying because
contracts will be relying on opcodes introduced in a fork. So this changes the default to
have all forks enabled.

* core/asm: fix some issues in the assembler

This fixes minor bugs in the old assembler:

- It is now possible to have comments on the same line as an instruction.
- Errors for invalid numbers in the jump instruction are reported better
- Line numbers in errors were off by one
@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Merging #1734 (4abebfc) into master (425d290) will increase coverage by 0.00%.
Report is 6 commits behind head on master.
The diff coverage is 35.39%.

❗ Current head 4abebfc differs from pull request most recent head 2c87bed. Consider uploading reports for the commit 2c87bed to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1734   +/-   ##
=======================================
  Coverage   52.75%   52.76%           
=======================================
  Files         485      486    +1     
  Lines       60417    60445   +28     
=======================================
+ Hits        31876    31891   +15     
- Misses      26093    26116   +23     
+ Partials     2448     2438   -10     
Files Changed Coverage Δ
cmd/devp2p/crawl.go 0.00% <0.00%> (ø)
cmd/devp2p/discv4cmd.go 0.00% <0.00%> (ø)
cmd/devp2p/discv5cmd.go 0.00% <0.00%> (ø)
core/asm/tokentype_string.go 0.00% <0.00%> (ø)
trie/database.go 48.07% <0.00%> (-0.50%) ⬇️
core/asm/compiler.go 58.04% <50.00%> (-4.27%) ⬇️
core/asm/lexer.go 92.59% <100.00%> (+4.30%) ⬆️

... and 18 files with indirect coverage changes

@ucwong ucwong marked this pull request as ready for review September 21, 2023 14:55
@ucwong ucwong merged commit 5d9d513 into master Sep 21, 2023
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