Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AvalancheGo dep to include latest + ACP-118 #1961

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

aaronbuchwald
Copy link
Collaborator

This PR updates the AvalancheGo dependency to include the latest version of master + ACP-118 ava-labs/avalanchego#3394

Additionally, using this version results in a coreth dependency conflict, so this depends on ava-labs/avalanchego@6e7a7d5

This PR should be the last we need before depending on the master branch of AvalancheGo as ACP-118 is still blocked, but should be merged soon.

@aaronbuchwald
Copy link
Collaborator Author

Hmm I haven't seen this before. Locally, one version of this passes the linter and fails compilation and the other vice versa. This is strange...

https://github.com/ava-labs/hypersdk/actions/runs/13727774395/job/38398037402#step:4:146

Screenshot 2025-03-07 at 14 57 30

https://github.com/ava-labs/hypersdk/actions/runs/13727859748/job/38398319055

Screenshot 2025-03-07 at 14 58 14


toolchain go1.22.12
toolchain go1.23.7

require (
github.com/ava-labs/avalanchego v1.12.3-warp-verify6.0.20250209190418-217ef3979ea7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be the same version as the top-level go.mod?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, guess it's not enforced by updating the AvalancheGo dep, but we should align them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I thought you were referring to the golang toolchain version, this was indeed the fix. Nice catch 🙏

@aaronbuchwald
Copy link
Collaborator Author

Hmm I haven't seen this before. Locally, one version of this passes the linter and fails compilation and the other vice versa. This is strange...

https://github.com/ava-labs/hypersdk/actions/runs/13727774395/job/38398037402#step:4:146

Screenshot 2025-03-07 at 14 57 30 https://github.com/ava-labs/hypersdk/actions/runs/13727859748/job/38398319055 Screenshot 2025-03-07 at 14 58 14

Looks like this was caused by MorpheusVM importing a different version of AvalancheGo in its own go.mod file. When compiling MorpheusVM, it used the outdated version specified in its own go.mod, which failed.

Meanwhile, the linter saw a different version, so it failed for a different reason. 🤦

Comment on lines +34 to +36
# Make issues output unique by line.
# Default: true
uniq-by-line: false
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -45,7 +44,7 @@ linters:
- dupword
- errcheck
- errorlint
- exportloopref
- copyloopvar
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed as of go1.23

@@ -121,6 +120,7 @@ linters-settings:
gosec:
excludes:
- G107 # Url provided to HTTP request as taint input https://securego.io/docs/rules/g107
- G115 # TODO Enable this ruleset in a follow-up PR
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disable majority of newly introduced linting errors with the golangci / golang version bump

Comment on lines -48 to -52
- structcheck
# - lll
# - gomnd
- goprintffuncname
- interfacer
Copy link
Collaborator Author

@aaronbuchwald aaronbuchwald Mar 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer supported

@@ -78,8 +78,8 @@ func TestExpiryHeapRemoveEmpty(t *testing.T) {
eheap := New[*TestItem](0)
item := GenerateTestItem("sponsor", 1)
// Require this returns
eheap.Remove(item.GetID())
require.True(true, "not true")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why this was here originally

@aaronbuchwald aaronbuchwald marked this pull request as ready for review March 8, 2025 01:09
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