* refactor: abstract `testonly` package
* test: `StateAccount.Extra` via `trie.StateTrie.{Update,Get}Account()`
* chore: `types.TestOnlyClearRegisteredExtras()` at beginning of tests
This is a purely defensive approach in case future tests forget to clean up.
* chore: placate the linter
Some of the changes in the full commit history were merged into `libevm` as part of #43 in `336a289` and then merged back into this branch as `5b15698`. Cherry-picking commits was not possible as some touched both halves of the changes; the squash-merges will, however, make this convoluted history irrelevant.
* feat: `types.StateAccount` pseudo-generic payload
* feat: registration of `StateAccount` payload type
* chore: mark `eth/tracers/logger` flaky
* chore: copyright header + `gci`
* test: lock default `types.SlimAccount` RLP encoding
* feat: `vm.SlimAccount.Extra` from `StateAccount` equiv
* chore: placate the linter
* test: `pseudo.Type.EncodeRLP()`
* test: `pseudo.Type.DecodeRLP()`
* fix: `pseudo.Type.DecodeRLP()` with non-pointer type
* feat: `pseudo.Type.IsZero()` and `Type.Equal(*Type)`
* feat: `types.StateAccountExtra.DecodeRLP()`
* fix: remove unnecessary `StateAccountExtra.clone()`
* refactor: readability
* feat: `pseudo.Type.Format()` implements `fmt.Formatter`
All commits except the last two constitute PRs #43 and #44. The last two reverted files such that only changes to the `pseudo` and `ethtest` packages remain; once this is merged into the `libevm` branch then `libevm` will be merged into the branch for #44 too. Cherry-picking commits was not possible as some touched both halves of the changes; the squash-merges will, however, make this convoluted history irrelevant.
* feat: `types.StateAccount` pseudo-generic payload
* feat: registration of `StateAccount` payload type
* chore: mark `eth/tracers/logger` flaky
* chore: copyright header + `gci`
* test: lock default `types.SlimAccount` RLP encoding
* feat: `vm.SlimAccount.Extra` from `StateAccount` equiv
* chore: placate the linter
* test: `pseudo.Type.EncodeRLP()`
* test: `pseudo.Type.DecodeRLP()`
* fix: `pseudo.Type.DecodeRLP()` with non-pointer type
* feat: `pseudo.Type.IsZero()` and `Type.Equal(*Type)`
* feat: `types.StateAccountExtra.DecodeRLP()`
* chore: revert non-pseudo-package modifications
* chore: delete non-pseudo-package additions
* feat: override `vm.NewEVM()` args
* test: `vm.Hooks.OverrideNewEVMArgs`
* refactor: use `NewEVMArgs struct` in hook
* chore: `gci`
* fix: clear `vm.Hooks` at end of test
* refactor!: `RulesHooks.CanCreateContract()` via `defer`
`TestCanCreateContract` is unchanged and merely moved to the appropriate file.
* feat!: `RulesHooks.CanCreateContract()` accepts and returns gas
* chore: move `TestCanCreateContract` to original file
Simplifies code review
* chore: pacify linter
* refactor!: revert to non-deferred call (not at start)
* chore: workflow to print diffs vs `libevm-base` tag
* fix: job name
* fix: use `${{ github.ref_name }}` instead of `HEAD`
* fix: use `github.sha` instead of `github.ref_name`
* fix: `fetch-tags: true`
* chore: fml
* fix: `fetch-depth: 0` for more than just 1 commit
* fix: check out branch before performing diff
* chore: `set -x` to aid debugging
* fix: add `--` suffix to `git checkout`
* fix: use `github.ref_name` instead of `github.sha`
* refactor: move all actions inside workflow
* fix: use `github.ref` for full name
* fix: only use explicit diff for `libevm`
* chore: `git diff --color=always`
* feat: color-blindness a11y
* chore: `golangci-lint` CI workflow
* fix: make `golangci-lint` happy
* chore: bump `actions/{checkout,setup-go}` versions
* chore: overhaul `.golanci.yml` config
* fix: all linter issues
* chore: exclude non-libevm linters + change deprecated option
* fix: add overflow check in example
* fix: try again; different local version?
* chore: this is trying my patience
* chore: enable `gci` and fix ordering
* chore: mark `ethclient/gethclient` test as flaky
* chore: mark `eth/catalyst` test as flaky
* fix: run flaky upstream tests sequentially
* chore: run flaky tests first to fail early
There are fewer of them so they'll fail quickly and allow the CI run to just be restarted.
* refactor: extra types `C` + `R` are never plumbed as `*C` / `*R`
* refactor: force use of `pseudo.Constructor.Zero()` instead of `NilPointer()`
* feat: `pseudo.PointerTo()`
* feat: `params.ExtraPayloadGetter[C,R].PointerFromChainConfig(...) *C` and `Rules => *R` equiv
* test: shallow copy of `ChainConfig`/`Rules` includes extras
* feat: `params.ChainConfig` extra payload can use root JSON
* refactor: simplify `ChainConfig.UnmarshalJSON()` branches
* fix: change redundant `assert` to `require` for simplicity
* feat: pseudo-generic extra payloads in `params.ChainConfig` and `params.Rules`
* feat: `params.ExtraPayloadGetter` for end-user type safety
* refactor: payloads only available through `params.ExtraPayloadGetter`
* chore: make `libevm/examples/extraparams` a `params` testable example
* doc: `libevm/pseudo` package comments and improved readability
* doc: `params.*Extra*` comments and improved readability
* doc: `params.ExtraPayloadGetter` comments and improved readability
* doc: `params/config.libevm_test.go` comments and improved readability
* refactor: simplify `params.ChainConfig.UnmarshalJSON()`
* refactor: abstract new/nil-pointer creation into `pseudo.Constructor`s
* feat: precompile override via `params.Extras` hooks
* doc: flesh out `PrecompileOverride()` in example
* doc: complete commentary and improve readability
* refactor: `ChainConfig.Hooks()` + `Rules` equivalent
* chore: rename precompiles test file in keeping with geth equivalent
* feat: stateful precompiles + allowlist hooks
The allowlist hooks are included in this commit because they allow for the same functionality as stateful precompiles in `ava-labs/coreth` and `ava-labs/subnet-evm`.
* fix: `StateTransition.canExecuteTransaction()` used `msg.From` instead of `To`
* test: `params.RulesHooks.CanCreateContract` integration
* test: `params.RulesHooks.CanExecuteTransaction` integration
* test: `vm.NewStatefulPrecompile()` integration
* refactor: simplify test of `CanCreateContract`
* refactor: abstract generation of random `Address`/`Hash` values
* doc: full documentation + readability refactoring/renaming
* fix: remove circular dependency in tests
* core/txpool: no need to run rotate if no local txs
Signed-off-by: jsvisa <delweng@gmail.com>
* Revert "core/txpool: no need to run rotate if no local txs"
This reverts commit 17fab17388.
Signed-off-by: jsvisa <delweng@gmail.com>
* use Debug if todo is empty
Signed-off-by: jsvisa <delweng@gmail.com>
---------
Signed-off-by: jsvisa <delweng@gmail.com>
* make blobpool reject blob transactions with fee below the minimum
* core/txpool: some minot nitpick polishes and unified error formats
* core/txpool: do less big.Int constructions with the min blob cap
---------
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
This PR enhances eth_createAccessList RPC call to support scenarios where the node is launched with an unlimited gas cap (--rpc.gascap 0). The eth_createAccessList RPC call returns failure if user doesn't explicitly set a gas limit.
eth_call and debug_traceCall allow users to override various block fields, among them base fee. However the overriden base fee was not considered for computing the effective gas price of that message, and instead base fee of the base block was used. This has been fixed in this commit.