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

fix awm relayer crash for wiz #2191

wants to merge 2 commits into from

Conversation

arturrez
Copy link
Collaborator

Why this should be merged

fixed container crash for awm-relayer
fixes crashes

goroutine 1 [running]:
main.main()
        /home/runner/work/awm-relayer/awm-relayer/relayer/main/main.go:79 +0x2436
panic: couldn't build config: failed to validate configuration: db-write-interval-seconds must be between 1 and 600

and

{"level":"info","timestamp":"2024-09-27T02:31:49.166Z","logger":"awm-relayer","caller":"main/main.go:550","msg":"starting metrics server...","port":9091}
{"level":"fatal","timestamp":"2024-09-27T02:31:49.166Z","logger":"awm-relayer","caller":"main/main.go:232","msg":"Failed to create signature aggregator","error":"failed to create signature cache: must provide a positive size"}
panic: failed to create signature cache: must provide a positive size

How this works

adds configuration required as default values causes app crash

How this was tested

./scripts/build.sh && ./bin/avalanche subnet delete r1;  ./bin/avalanche node destroy r1 -y ; ./bin/avalanche node devnet wiz r1 r1 --num-validators=1 --num-apis=1  --region us-east-1 --aws --node-type default  --use-static-ip=false  --enable-monitoring=false

How is this documented

@arturrez arturrez requested a review from a team as a code owner September 27, 2024 02:47
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?

@@ -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 👍

@@ -356,11 +358,13 @@ func CreateBaseRelayerConfig(
BaseURL: network.Endpoint,
QueryParams: map[string]string{},
},
DBWriteIntervalSeconds: AWMRElayerDBWriteIntervalSeconds,
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

Copy link
Collaborator

@felipemadero felipemadero left a comment

Choose a reason for hiding this comment

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

not understanding. I just created a devnet from main branch, and there is no relayer panic. also, relayer on local networks doesn't panic which current conf. am I missing something?

@arturrez
Copy link
Collaborator Author

closing as not needed

@arturrez arturrez closed this Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants