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

fix awm relayer crash for wiz #2191

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module github.com/ava-labs/avalanche-cli

go 1.21.12
toolchain go1.22.5
go 1.22
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if updating the golang version here was intentional or not. It is probably best left for it's own PR in case there is any unexpected behavior from updating.

We should also specify the full patch version as whatever the latest 1.22 release is when we do 👍


toolchain go1.22.6

require (
github.com/ava-labs/apm v1.0.0
Expand Down
10 changes: 7 additions & 3 deletions pkg/teleporter/relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
)

const (
localRelayerSetupTime = 2 * time.Second
localRelayerCheckPoolTime = 100 * time.Millisecond
localRelayerCheckTimeout = 3 * time.Second
localRelayerSetupTime = 2 * time.Second
localRelayerCheckPoolTime = 100 * time.Millisecond
localRelayerCheckTimeout = 3 * time.Second
AWMRElayerDBWriteIntervalSeconds = 10
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like capitalization typo here.

Also, do these new consts need to be exported?

AWMRelayerSignatureCacheSize = 1024
)

var teleporterRelayerRequiredBalance = big.NewInt(0).Mul(big.NewInt(1e18), big.NewInt(500)) // 500 AVAX
Expand Down Expand Up @@ -356,11 +358,13 @@
BaseURL: network.Endpoint,
QueryParams: map[string]string{},
},
DBWriteIntervalSeconds: AWMRElayerDBWriteIntervalSeconds,

Check failure on line 361 in pkg/teleporter/relayer.go

View workflow job for this annotation

GitHub Actions / Golang Unit Tests v1.21.7 (ubuntu-20.04)

unknown field DBWriteIntervalSeconds in struct literal of type "github.com/ava-labs/awm-relayer/config".Config

Check failure on line 361 in pkg/teleporter/relayer.go

View workflow job for this annotation

GitHub Actions / Lint

unknown field DBWriteIntervalSeconds in struct literal of type "github.com/ava-labs/awm-relayer/config".Config

Check failure on line 361 in pkg/teleporter/relayer.go

View workflow job for this annotation

GitHub Actions / Lint

unknown field DBWriteIntervalSeconds in struct literal of type "github.com/ava-labs/awm-relayer/config".Config

Check failure on line 361 in pkg/teleporter/relayer.go

View workflow job for this annotation

GitHub Actions / Lint

unknown field DBWriteIntervalSeconds in struct literal of type "github.com/ava-labs/awm-relayer/config".Config
Copy link
Collaborator

Choose a reason for hiding this comment

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

Think we'll need to fix these lint errors here

StorageLocation: storageLocation,
ProcessMissedBlocks: false,
SourceBlockchains: []*config.SourceBlockchain{},
DestinationBlockchains: []*config.DestinationBlockchain{},
MetricsPort: metricsPort,
SignatureCacheSize: AWMRelayerSignatureCacheSize,

Check failure on line 367 in pkg/teleporter/relayer.go

View workflow job for this annotation

GitHub Actions / Golang Unit Tests v1.21.7 (ubuntu-20.04)

unknown field SignatureCacheSize in struct literal of type "github.com/ava-labs/awm-relayer/config".Config

Check failure on line 367 in pkg/teleporter/relayer.go

View workflow job for this annotation

GitHub Actions / Lint

unknown field SignatureCacheSize in struct literal of type "github.com/ava-labs/awm-relayer/config".Config (typecheck)

Check failure on line 367 in pkg/teleporter/relayer.go

View workflow job for this annotation

GitHub Actions / Lint

unknown field SignatureCacheSize in struct literal of type "github.com/ava-labs/awm-relayer/config".Config) (typecheck)

Check failure on line 367 in pkg/teleporter/relayer.go

View workflow job for this annotation

GitHub Actions / Lint

unknown field SignatureCacheSize in struct literal of type "github.com/ava-labs/awm-relayer/config".Config) (typecheck)
}
return saveRelayerConfig(awmRelayerConfig, relayerConfigPath)
}
Expand Down
Loading