Commit graph

89 commits

Author SHA1 Message Date
Arran Schlosberg
51afedec91
chore: Go 1.24 (#232)
## Why this should be merged

Version increase across all `ava-labs` EVM-related code.

## How this works

Bump to 1.24.8 in both `go.mod` files + requisite version increase for
`golangci-lint`.

## How this was tested

Existing tests.

---------

Co-authored-by: Austin Larson <austin.larson@avalabs.org>
2025-10-13 14:07:33 -04:00
Michael Kaplan
4bc19e9f8f
Update feature.yml (#223)
## Why this should be merged
Non-unique IDs in feature-request template body.

## How this works
Makes IDs unique. See
[here](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/common-validation-errors-when-creating-issue-forms#body-must-have-unique-ids).

## How this was tested

[Inspection of GitHub preview](https://github.com/ava-labs/libevm/blob/michaelkaplan13/fix-feature-issue-template/.github/ISSUE_TEMPLATE/feature.yml)

Signed-off-by: Michael Kaplan <55204436+michaelkaplan13@users.noreply.github.com>
2025-09-05 09:53:27 +01:00
Arran Schlosberg
d4c22ca34b
chore: stochastic gradient descent to fix goheader (#196)
## Why this should be merged

Avoids false positives from `goheader`.

## How this works

Checks out entire history to give the linter a reference point for new
issues only.

## How this was tested

With great frustration by waiting for CI.
2025-06-23 15:52:20 +00:00
Quentin McGaw
979064cfdb
fix(ci): go_tooling CI job git checkout tip of PR (#173)
## Why this should be merged

The release-branch CI job tests branch properties of the `git` DAG but
GitHub's `actions/checkout` by default creates a speculative merge
commit against which PR CI is run. Running against this hypothetical
situation makes the tests fail.

## How this works

[`actions/checkout` uses PR
tip](https://github.com/actions/checkout?tab=readme-ov-file#checkout-pull-request-head-commit-instead-of-merge-commit)

## How this was tested

Future run against a release branch.

---------

Signed-off-by: Quentin McGaw <quentin.mcgaw@gmail.com>
2025-03-26 11:29:45 +01:00
Arran Schlosberg
7b8d20f3d5
fix(ci): only create local main branch if non-existent (#164)
## Why this should be merged

The CI job in #145 requires a local (to the runner) `main` branch and
since `actions/checkout` doesn't check it out, the workflow creates the
branch off `origin/main`. However, after merge of a PR to `main`, the
workflow is run on `main` itself and that step [fails because the branch
already
exists](https://github.com/ava-labs/libevm/actions/runs/13908218530/job/38916101218).

## How this works

Only call `git branch main origin/main` if `main` doesn't exist.

## How this was tested

We'll see once it's merged 🤷
2025-03-17 13:00:39 -07:00
Arran Schlosberg
0ed61356ed
refactor(params): make LibEVMVersion a constant (#162)
> [!NOTE]
> This will be merged into `main` once the current target branch has
been merged.

## Why this should be merged

My original implementation was back to front and it's been bugging me.

## How this works

Originally `params.LibEVMVersion` was a `var` (because it needed to be
computed) and the test used a `const`. This change simply inverts the
two and moves some code around without any change in logic.

I bumped the minor version to 2 (a no-op when not on a release branch)
to bring it in line with the latest release candidate and to avoid
forgetting to do so when performing an actual release.

## How this was tested

Unit test of version-string constant.
2025-03-17 19:29:16 +00:00
Arran Schlosberg
08490a9b76
test: branch properties of main and release/* (#145)
## Why this should be merged

Safer release process by enforcing invariants of `release/*` branches as
automated in #137 to fulfil #25.

## How this works

New test for `go_tooling` CI job.

If the PR target branch is `main` then only the `params.ReleaseType` is
checked. If the target is neither `main` nor a release branch then the
test is skipped. The checks performed on `release/*` branches are
described in the test.

## How this was tested

Locally against a dummy release branch with deliberate problems created
by (a) including this PR's changes in the final commit and (b) not
updating the libevm version.

```
$ go test -v ./... --target_branch="release/v1.13.14-0.1.0.rc.3"
=== RUN   TestCherryPicksFormat
--- PASS: TestCherryPicksFormat (0.39s)
=== RUN   TestBranchProperties
=== RUN   TestBranchProperties/branch_name
    release_test.go:172: 
                Error Trace:    .../ava-labs/libevm/libevm/tooling/release/release_test.go:172
                Error:          Not equal: 
                                expected: "release/v1.13.14-0.1.0.beta"
                                actual  : "release/v1.13.14-0.1.0.rc.3"
                            
                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -1 +1 @@
                                -release/v1.13.14-0.1.0.beta
                                +release/v1.13.14-0.1.0.rc.3
                Test:           TestBranchProperties/branch_name
    release_test.go:175: On release branch; params.LibEVMReleaseType = "beta", which is unsuitable for release branches
=== RUN   TestBranchProperties/commit_history
    release_test.go:192: Forked from "main" at commit 4c6e50e7d1 (chore: module-renaming workflow inverts between `libevm` and `geth` (#152))
    release_test.go:314: ### History since fork from default branch (8 commits):
    release_test.go:316: internal/build, rpc: add missing HTTP response body Close() calls (#29223) by Shiming Zhang <wzshiming@hotmail.com>
    release_test.go:316: core/state: fix bug in statedb.Copy and remove unnecessary preallocation (#29563) by Aaron Chen <aaronchen.lisp@gmail.com>
    release_test.go:316: params: print time value instead of pointer in ConfigCompatError (#29514) by Nathan <Nathan.l@nodereal.io>
    release_test.go:316: eth/gasprice: add query limit for FeeHistory to defend DDOS attack (#29644) by Nathan <Nathan.l@nodereal.io>
    release_test.go:316: core/state/snapshot: add a missing lock (#30001) by maskpp <maskpp266@gmail.com>
    release_test.go:316: crypto: add IsOnCurve check (#31100) by Felix Lange <fjl@twurst.com>
    release_test.go:316: internal/ethapi: fix panic in debug methods (#31157) by Sina M <1591639+s1na@users.noreply.github.com>
    release_test.go:316: x by Arran Schlosberg <me@arranschlosberg.com>
=== RUN   TestBranchProperties/commit_history/cherry_picked_commits
    release_test.go:314: ### Expected cherry-picks (7 commits):
    release_test.go:316: internal/build, rpc: add missing HTTP response body Close() calls (#29223) by Shiming Zhang <wzshiming@hotmail.com>
    release_test.go:316: core/state: fix bug in statedb.Copy and remove unnecessary preallocation (#29563) by Aaron Chen <aaronchen.lisp@gmail.com>
    release_test.go:316: params: print time value instead of pointer in ConfigCompatError (#29514) by Nathan <Nathan.l@nodereal.io>
    release_test.go:316: eth/gasprice: add query limit for FeeHistory to defend DDOS attack (#29644) by Nathan <Nathan.l@nodereal.io>
    release_test.go:316: core/state/snapshot: add a missing lock (#30001) by maskpp <maskpp266@gmail.com>
    release_test.go:316: crypto: add IsOnCurve check (#31100) by Felix Lange <fjl@twurst.com>
    release_test.go:316: internal/ethapi: fix panic in debug methods (#31157) by Sina M <1591639+s1na@users.noreply.github.com>
=== RUN   TestBranchProperties/commit_history/final_commit
    release_test.go:365: Modified disallowed file "go.yml"
    release_test.go:365: Modified disallowed file "go.mod"
    release_test.go:365: Modified disallowed file "go.sum"
    release_test.go:365: Modified disallowed file "release_test.go"
--- FAIL: TestBranchProperties (2.07s)
    --- FAIL: TestBranchProperties/branch_name (0.00s)
    --- FAIL: TestBranchProperties/commit_history (2.07s)
        --- PASS: TestBranchProperties/commit_history/cherry_picked_commits (1.81s)
        --- FAIL: TestBranchProperties/commit_history/final_commit (0.01s)
FAIL
FAIL    github.com/ava-labs/libevm/libevm/tooling/release       2.712s
FAIL
```
2025-03-17 16:55:39 +00:00
Arran Schlosberg
b0332b5168
chore(ci): add merge_group trigger to required workflows (#160)
## Why this should be merged

Allows ruleset-required workflows to be triggered by a merge queue, not
just the PR for the merge. Although `main` isn't a particularly "busy"
branch, a merge queue will ensure that CI passes on the exact version of
code that is about to be merged; i.e. (from the [docs]):

> The merge queue provides the same benefits as the **Require branches
to be up to date before merging** branch protection, but does not
require a pull request author to update their pull request branch and
wait for status checks to finish before trying to merge.

[docs]:
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue#about-merge-queues

## How this works

Adds `merge_group` workflow trigger with [recommended
type](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#merge_group).

## How this was tested

N/A (worst-case it has to be reverted and another PR is temporarily
blocked).
2025-03-11 13:57:57 +00:00
Arran Schlosberg
4c6e50e7d1
chore: module-renaming workflow inverts between libevm and geth (#152)
## Why this should be merged

Originally I'd planned on doing an upstream sync by running the rename
workflow on the incoming commit and then merging it to `main` however
this resulted in hundreds of merge commits that were solely due to Go
imports. Renaming the module from `ava-labs/libevm` to
`ethereum/go-ethereum` removed 90% of conflicts (H/T @darioush). The
module will then need to be named `ava-labs/libevm` again, so the commit
history will probably[^1] look like this after an update:

```mermaid
---
config:
  gitGraph:
    mainBranchName: main
    parallelCommits: true
---
gitGraph TB:
    branch geth order:2
    commit id:"geth@v1.15.2"
    checkout main
    commit id:"libevm@v1.13.14"
    branch sync/v1.15.2
    commit id:"[AUTO] rename to ethereum/go-ethereum"
    merge geth
    commit id:"[AUTO] rename to ava-labs/libevm"
    checkout main
    merge sync/v1.15.2 id:"libevm@v1.15.2"
```

[^1]: Specifics of and rationale behind the merge strategy are beyond
the scope of this PR.

## How this works

The current module name is determined with `go list -m` and the rename
from/to patterns are no longer hard-coded.

## How this was tested

Inspection of runs and resulting branch. Although these were the
bc8e5015694707ff682c444afff52a3801b35a53 workflow, the only other commit
in this PR is cosmetic (as seen in [this
run](https://github.com/ava-labs/libevm/actions/runs/13433886428) to
create f2cecaff9c01c86053644aafc9b7196229a84cbc).

1. Run on `main` @ d32c7e0090 changes from
`libevm` to `go-ethereum`:
a.
[Run](https://github.com/ava-labs/libevm/actions/runs/13432588947/job/37527588744)
b.
[Commit](6288df93f7)
  c. Created branch `arr4n/auto/test-invertible-rename`
2. Re-run on `arr4n/auto/test-invertible-rename` changes back to
`libevm`:
  a. [Run](https://github.com/ava-labs/libevm/actions/runs/13432810657)
b.
[Commit](6f4f94edd9)
c. [Auto-generated branch is identical to `main` at the time of
running](d32c7e0090...6f4f94edd9)
2025-03-07 13:23:11 +00:00
Arran Schlosberg
02110d3f34
chore: logging (#151)
## Why this should be merged

Adds logging of `libevm` modification of default behaviour.

## How this works

1. Introduces `log.Lazy` functions to allow expensive logging operations
to be computed i.f.f. required by the logging level.
2. Adds `Info` logging for registration of types and `Debug` logging for
all else.
3. Only paths that change behaviour in a potentially unpredictable
manner are logged; of note, RLP / JSON encoding is _not_ considered
unpredictable given that registered extras are logged.
4. The minimal viable package, `set`, was necessary because we don't
want to depend on `avalanchego` and the `hashicorp/go-set` latest
version requires a later version of Go. #153 tracks a swap to the latter
when possible.

The `eth/tracers/internal/tracetest` test flaked at least twice
(unrelated to these changes) so I've marked it as such since it's not
worth a separate PR.

## How this was tested

New unit test on `log.Lazy` + `set` methods. Existing CI for the rest as
it's a refactor.
2025-02-24 16:53:21 +00:00
Quentin McGaw
1344d20908
chore(ci): disable lint goheader step on non-pull-request events (#143)
- Pin golangci-lint action to v6 now that goheader doesn't run on the default branch pushes
- This addresses the goheader step misbehaving and linting all files on pushes
2025-02-17 11:34:52 +00:00
Arran Schlosberg
f7a3a4f548
chore(ci): add go catch-all job (#140)
## Why this should be merged

New jobs are easily forgotten in the GitHub rules so we will only gate
on `go` and have all others added as dependencies.

## How this works

Same as #139 

## How this was tested

Inspection of CI run:

![image](https://github.com/user-attachments/assets/f76ce720-a5ed-49e6-b000-265f3660ce8f)
2025-02-14 12:56:51 -05:00
Arran Schlosberg
bc42e5f29c
chore(ci): consolidate linters (#139)
## Why this should be merged

Branch-protection rules only require the Go linter (erroneously called
`lint`) by mistake. All linters are now dependencies of a single `lint`
job that remains as a PR gate. New linters will now be enforced by
default.

Closes #138 

## How this works

GitHub Actions `need` configuration. The path limitation of running
`yamllint` is removed because it's such a cheap job so is ok to always
run.

## How this was tested

Inspection of CI run and PR's required jobs:


![image](https://github.com/user-attachments/assets/9454ca35-8a7f-4393-bdd8-5029cfaaf7e6)


![image](https://github.com/user-attachments/assets/e92b964d-5a64-415d-b8a3-1e9c84af3060)
2025-02-14 11:48:55 -05:00
Arran Schlosberg
00c10cf539
feat: release-branch automation (#137)
## Why this should be merged

Closes #25 

## How this works

See https://github.com/ava-labs/libevm/discussions/126.

The code is in a new module to (a) avoid polluting the root `go.mod`
file and (b) because `go-git` requires a newer version of Go.
Unfortunately `go-git` doesn't support cherry-picking yet so a Bash
script had to be used for that bit `#!/sad`.

## How this was tested

Inspection of output when running `cherrypick.sh` (with `set -x` added)
from the current branch.

```
...
...
+ CHERRY_PICKS='2bd6bd01d2e8561dd7fc21b631f4a34ac16627a1
99bbbc0277
1e9bf2a09e
69f815f6f5
e4b8058d5a
34b46a2f75
159fb1a1db
da71839a270a353bac92e3108e4b74fb0eefec29'
...
Skipping 2bd6bd01d2 already in history
...
Cherry-picking 99bbbc0277
...
Cherry-picking 1e9bf2a09e
...
Cherry-picking 69f815f6f5
...
Cherry-picking e4b8058d5a
...
Cherry-picking 34b46a2f75
...
Cherry-picking 159fb1a1db
...
Cherry-picking da71839a27
...
+ git cherry-pick 99bbbc0277 1e9bf2a09e 69f815f6f5 e4b8058d5a 34b46a2f75 159fb1a1db da71839a27
```
2025-02-14 16:09:41 +00:00
Quentin McGaw
2580bd1d05
chore(ci): add go_tidy job to go workflow (#127) 2025-02-11 15:28:33 +01:00
Arran Schlosberg
94383c77ad
chore: add label "Priority: With next Geth sync" (#129)
## Why this should be merged

#110 introduces changes that we want to revert as part of the next Geth
sync. This label will be applied to issues that track similar tasks.

## How this works

Magic 🧙 

## How this was tested

Inspecting [CI dry run, which creates the new
label](https://github.com/ava-labs/libevm/actions/runs/13261362433/job/37018526246?pr=129#step:3:99).

Signed-off-by: Arran Schlosberg <519948+ARR4N@users.noreply.github.com>
2025-02-11 12:41:12 +01:00
Quentin McGaw
9125583d8e
chore(ci): pin goheader golangci-lint action to v6.2.0 (#124)
The action pinned as v6 uses v6.3.1 which is currently misbehaving on the main branch linting all files instead of just the files from the current commit.
2025-02-10 14:05:16 +00:00
Arran Schlosberg
761c4b40de
fix(ci): module-renaming workflow includes .go.tpl and .proto (#122)
## Why this should be merged

Introduction of breaking upstream changes (inclusion of `.go.tpl` files)
since the workflow was written. Resulted in [failed smoke
tests](https://github.com/ava-labs/libevm/actions/runs/13198798601) due
to ABI-binding templates not being updated.

## How this works

Only (1) is necessary for the fix but the others were added for
convenience as relevant to this PR:

1. Replace module name in `*.go.tpl` files;
2. As above for `*.proto` files (`go_package` option);
3. Remove concurrency limitations as they're unnecessary with a manually
triggered workflow; and
4. Display all tags that point to the source commit as they're useful
for inspection of version.

## How this was tested

[Successful workflow
run](https://github.com/ava-labs/libevm/actions/runs/13199663099/job/36848609786)
at upstream v1.15.0.

For the modifications, respectively:

1. Smoke tests pass and no `.go.tpl` files in [Remnant
references](https://github.com/ava-labs/libevm/actions/runs/13199663099/job/36848609786#step:9:1);
2. As above re remnant references;
3. N/A; and
4. Inspection of [step
output](https://github.com/ava-labs/libevm/actions/runs/13199663099/job/36848609786#step:6:5).
2025-02-07 15:28:53 +00:00
Quentin McGaw
a8df623269
chore(ci): restrict each job concurrency except for main branch (#117)
- save some compute minutes 🌱
- Limit concurrency by workflow + ref (except for main branch)
2025-02-06 11:03:26 +00:00
Quentin McGaw
80bdfe7243
chore(ci): use the Go version found in go.mod (#118) 2025-02-06 10:52:45 +00:00
Quentin McGaw
be6e93eedb
chore(ci): linting job changes regarding goheader (#116)
`goheader` only needs to be run on files changed in the current PR as it will otherwise suggest updating copyright years on untouched files. The other linters, however, should be run in the same manner as a local invocation
2025-02-05 09:10:57 +01:00
Quentin McGaw
e2b0abbe53
chore(ci): automate detection of last auto-rename commit(#99) 2025-01-13 18:12:33 +01:00
Quentin McGaw
c996175b46
chore(ci): yaml linter workflow and fix yaml files (#98)
- New workflow triggering only on yaml file changes using the built-in `yamllint`
- `.yamllint.yml` configuration added at the root of the project
- Fix existing yml files to satisfy ymllint
- Ignore go-ethereum original yml files
2025-01-12 13:56:08 +00:00
Quentin McGaw
ce2cde5662
docs(linter): comment why goheader is only enabled in the CI (#101) 2025-01-09 14:17:06 +01:00
Quentin McGaw
efa14ab5d0
chore(ci): goheader linting only runs in CI on changed or new files (#100) 2025-01-08 08:38:50 +00:00
Quentin McGaw
9e452f2960
chore(github): issue template configuration and update issue templates (#96) 2024-12-30 18:00:05 +01:00
Quentin McGaw
bee85d6171
chore(ci): define Github labels as code with a workflow (#93) 2024-12-23 15:02:52 +01:00
Arran Schlosberg
aa183c52be
refactor: generate internal Header.encodeRLP() for override (#86)
## Why this should be merged

This is a precursor to being able to override `types.Header` RLP
{en,de}coding. As there is already a `Header.EncodeRLP()` method we
either have to modify the generated code or rename the generated
method—this PR does the latter.

## How this works

The `rlpgen -internal_methods` flag changes the generated methods from
`EncodeRLP()` and `DecodeRLP()` to `encodeRLP()` and `decodeRLP()`,
respectively. A new CI job checks that generated code is up to date. We
can then implement our own `Header.EncodeRLP()` that either overrides or
falls back on the original.

It appears that `core/gen_genesis.go` was out of date but only because
of formatting.

## How this was tested

I deliberately excluded the change to `core/types/gen_header_rlp.go` to
confirm that the new workflow
[detects](https://github.com/ava-labs/libevm/actions/runs/12259667481/job/34202386378?pr=86#step:5:92)
the change and fails. The actual change can be inspected via the code
diff.
2024-12-11 10:20:58 +00:00
Arran Schlosberg
7d1b45b841
chore: mark upstream triedb/pathdb test flaky (#78)
## Why this should be merged

Reduce false-positive CI failures.

## How this works

Runs upstream `triedb/pathdb` test sequentially.

## How this was tested

[Inspection of
CI](https://github.com/ava-labs/libevm/actions/runs/12049469376/job/33596276893?pr=78#step:4:17)
2024-11-27 08:17:26 -08:00
Arran Schlosberg
41a2592b8c
chore: post-rename cleanup + libevm intro (#68)
## Why this should be merged

Cleans up loose ends after renaming the Go module. Also adds an
introduction to the README to explain the purpose of libevm.

## How this works

The changed hash in the workflow is just a fix (although a no-op). The
spaces after the copyright headers are to stop them from [showing up in
documentation](https://pkg.go.dev/github.com/ava-labs/libevm@v1.13.14-0.1.0-rc.1/params).

## How this was tested

n/a
2024-10-30 09:51:41 -04:00
Arran Schlosberg
dc8fc0308d
chore: run workflows on PRs+push to release branches (#67)
## Why this should be merged

These workflows are required by branch protection for release branches,
but aren't run automatically so release PRs can't currently be merged.

## How this works

Extends the `branches` filters of necessary workflows.

## How this was tested

n/a
2024-10-29 07:29:27 +00:00
Arran Schlosberg
5c6635282d
chore: CI updates for renamed module
Linter:
- Block imports of `ethereum/go-ethereum` upstream module
- Disable `goimports` checks on upstream code

Go:
- Update flaky-test regex
- Run flaky and non-flaky tests in different steps as this makes it easier to spot incorrect regex

Upstream delta:
- Use env var in workflow instead of `libevm-base` tag -> base changes atomically with the update commit
2024-10-17 13:09:06 +11:00
Arran Schlosberg
c6c85589af
feat: signed commit when renaming upstream module (#61)
## Why this should be merged

Signs commits for auto-renaming the Go module, originally introduced in
#51 with unsigned commits that can't be merged to `main`.

## How this works

Changes the commit action to use
[`ghcommit`](https://github.com/planetscale/ghcommit), which was made
specifically to allow for keyless signing (GitHub signs the commit). The
workflow no longer opens a PR to the `renamed-go-module` branch as it's
redundant and the generated branch can be used directly.

The commit message includes the `workflow_dispatch` trigger branch as
well as a hash of the workflow file for a complete audit trail.

I removed the commented-out PR trigger as it's unnecessary. In
development we can now just trigger the workflow on the dev branch.

## How this was tested

Inspecting [the
commit](572b8ab74e)
generated by a [workflow
run](https://github.com/ava-labs/libevm/actions/runs/11357025696/job/31589219847).
It is identical in modifications to the one reviewed in #59.
2024-10-17 12:47:06 +11:00
Arran Schlosberg
21122c043a
fix: run renaming workflow if branch == main (#58)
## Why this should be merged

#51 had a bug when checking whether or not to open a PR. I was
originally blocking everything if _not_ on main instead of doing
something if on it. The [manually dispatched run therefore didn't open a
PR as
expected](https://github.com/ava-labs/libevm/actions/runs/11299366394/job/31430160561).

## How this works

Change `!=` to `==`

## How this was tested

n/a

Signed-off-by: Arran Schlosberg <519948+ARR4N@users.noreply.github.com>
2024-10-11 17:35:31 -04:00
Arran Schlosberg
a8cc7bd033
feat: GitHub action to rename module (#51)
## Why this should be merged

Automate renaming of the Go module from
`github.com/ethereum/go-ethereum` to `github.com/ava-labs/libevm`.

## How this works

Before starting this PR, I branched the `renamed-go-module` branch off
`master` (the upstream geth branch; our default is called `main`). It
has been protected to require PRs, which are automatically generated by
the workflow introduced in this PR.

The new workflow is designed to be manually dispatched with an input
string of the commit hash to use as a source for renaming. On dispatch,
it:

1. Checks out the source commit;
2. Renames the module;
3. Makes all necessary internal changes (e.g. import renaming);
4. Runs [smoke
tests](https://en.wikipedia.org/wiki/Smoke_testing_(software));
5. Commits the changes to a new branch; and
6. Opens a PR to merge the new branch into `renamed-go-module`.

### Intended usage

When performing an upstream sync to pull in new geth code, this workflow
will first be run against the geth commit we intend to merge. After the
generated PR is merged, the `renamed-go-module` branch will be the one
incorporated into `main`.

Note that the `renamed-go-module` branch requires _two_ reviewers to
approve. The user who dispatches the workflow SHOULD be one, with any
other valid reviewer as the other. This is because a single-reviewer
workflow would allow any user to update the `renamed-go-module` branch
because the PR author is `github-actions`.

## How this was tested

Inspection of the generated PR #57 as well as the [workflow run that
generated
it](https://github.com/ava-labs/libevm/actions/runs/11298471240/job/31427495426).
2024-10-11 13:30:55 -07:00
Arran Schlosberg
88c00c6801
chore: cleanup after repo and default-branch renames (#55)
* chore: update GitHub workflow refs to `main` branch

* chore: update README reference to old repo path

* chore: exclude `README.md` from `libevm-delta` workflow
2024-10-11 10:29:32 -07:00
Arran Schlosberg
51cd795878
fix: vm.WithUNSAFECallerAddressProxying under DELEGATECALL (#50)
* fix: `vm.WithUNSAFECallerAddressProxying` under `DELEGATECALL`

* test: `vm.WithUNSAFECallerAddressProxying()` effect on outgoing caller addr

* chore: mark `eth/tracers/js` test flaky

* feat: `vm.PrecompileEnvironment.IncomingCallType()`

* chore: minor documentation edit

* doc: `PrecompileEnvironment` example for determining actual caller

* chore: placate the linter
2024-10-07 12:46:14 +01:00
Arran Schlosberg
336a289f42
feat: pseudo.Type RLP round-tripping (#43)
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
2024-10-01 08:23:51 -07:00
Arran Schlosberg
210f8ab8e1
feat: vm.PrecompiledStatefulContract can make CALLs (#40)
* feat: `vm.PrecompiledStatefulContract` can make `CALL`s

* fix: caller propagation

* feat: precompile can override default caller in `Call()`

* refactor: `WithUNSAFEForceDelegate()` replaces `WithCaller()`

* refactor: `WithUNSAFECallerAddressProxying()` instead of `ForceDelegate`

This matches the pattern used by `ava-labs/coreth` `NativeAssetCall`.

* refactor: `type callType` replaces `rwInheritance` + `delegation` types

* refactor: abstract return-data-proxy contract bytecode

* doc: fix comments from `46346f51`

* fix: `PrecompileEnvironment.Addresses()` for all call types

* chore: readability, linting & mark upstream test flaky

* test: `PrecompileEnvironment.Call()`

* refactor: improved {read,maintain}ability

* doc: fix `evmCallArgs` example

* test: `PrecompileEnvironment.Call()` input data

* fix: write protection for non-zero call value
2024-09-30 17:26:50 +01:00
Arran Schlosberg
df322564d0
chore: workflow to print diffs vs libevm-base tag (#18)
* 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
2024-09-14 09:33:20 +01:00
Arran Schlosberg
2034f767ea
chore: PR template (#19) 2024-09-13 08:33:36 -07:00
Arran Schlosberg
04543ea837
chore: golangci-lint CI workflow (#16)
* 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
2024-09-12 20:31:04 +01:00
Arran Schlosberg
2d3894fb97
fix: run flaky upstream tests sequentially (#15)
* 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.
2024-09-12 19:53:38 +01:00
Arran Schlosberg
b6f3eb9093
chore: basic CI (#9)
* chore: Go CI runs on `libevm` branch

* fix: stop using `reflect.TypeFor[T]()`

* chore: rename job, remove flaky tests, and clear `GOOS`+`GOARCH`

* fix: PR branch was `libem`

* chore: rename workflow

* chore: disable flaky `accounts/keystore` test
2024-09-10 20:52:25 +01:00
Sina Mahmoodi
a608c0ac84
cmd/devp2p/internal/ethtest: skip large tx test on github build (#28794)
This test was failling consistently on the github 32-bit build probably due to slow IO. Skipping it for that green check.
2024-01-12 15:14:03 +01:00
Guillaume Ballet
69576df254
.github: use github actions to run 32-bit linux tests (#28549)
use github actions to run 32-bit linux tests
2023-12-05 14:45:40 +01:00
Guillaume Ballet
a03490c6b2
remove @gballet as a GraphQL codeowner (#27012) 2023-03-30 04:58:23 -04:00
Stephen Flynn
b5c9be3358
all: update links in documentation (#26882)
Co-authored-by: Stephen Flynn <stephen.flynn@gapac.com>
2023-03-14 10:23:49 -04:00
Péter Szilágyi
d9699c8238
accounts, build, mobile: remove Andriod and iOS support 2023-02-03 12:29:07 +02:00
Sina Mahmoodi
220bdd3277
.github: add CL client to issue template (#25814) 2022-09-23 10:25:16 +02:00