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

error when batch limit error + add sub batch arg #192

Merged
merged 7 commits into from
Jan 26, 2024
Merged

Conversation

gatsbyz
Copy link
Contributor

@gatsbyz gatsbyz commented Jan 22, 2024

log why batch call is failing so we are not lost
i made the retry + backoff a go routine… but this still prevents ctrl+c when it’s retrying 🤷
force stop batch retry when the error is “batch limit”

@gatsbyz gatsbyz changed the title hot fix: add sub batch arg error when batch limit error + add sub batch arg Jan 22, 2024
@leovct
Copy link
Member

leovct commented Jan 23, 2024

Not sure about the rest of the changes in the PR but just these lines fixed the issue for me.

// func (ms *monitorStatus) processBatchesConcurrently(ctx context.Context, rpc *ethrpc.Client, blms []ethrpc.BatchElem) error {
retryable := func() error {
	if err := rpc.BatchCallContext(ctx, subBatch); err != nil {
		log.Error().Err(err).Msg("Error when performing batch calls")
		return backoff.Permanent(err)
	}
	return nil
}

@gatsbyz
Copy link
Contributor Author

gatsbyz commented Jan 23, 2024

@leovct the other changes are basically an attempt to make Ctrl+C work when BatchCall retry is happening, but it's not working as intended. backoff.Permanent(err) will force quit the retry, so if wrap the error with that in any failure, the retry will never happen I think?

@gatsbyz gatsbyz force-pushed the jesse/sub-batch-size branch from cf75366 to d76fa6b Compare January 26, 2024 14:24
Copy link
Member

@leovct leovct left a comment

Choose a reason for hiding this comment

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

lgtm

I hope nobody will return an error with limit other than batch limit errors lol!
Maybe add a note that says this is a dirty hack ;)

@leovct
Copy link
Member

leovct commented Jan 26, 2024

Solc 0.8.24 just went out, that's why the CI breaks... I'll send a PR to make sure it doesn't break again!

@gatsbyz gatsbyz force-pushed the jesse/sub-batch-size branch from 0f262a6 to 524cca2 Compare January 26, 2024 18:05
@gatsbyz gatsbyz merged commit 5e20a71 into main Jan 26, 2024
6 checks passed
@gatsbyz gatsbyz deleted the jesse/sub-batch-size branch January 26, 2024 18: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