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

Add block number to simulation error #2054

Merged
merged 5 commits into from
Nov 16, 2023
Merged

Add block number to simulation error #2054

merged 5 commits into from
Nov 16, 2023

Conversation

sunce86
Copy link
Contributor

@sunce86 sunce86 commented Nov 13, 2023

Description

Fixes #2018

Changes

  • Added block number to each simulation failure. The block number is approximately fetched from the web3.
  • Used this block number for notify calls
  • Extracted notify::simulation_failure as it is important enough to have it's own function

@sunce86 sunce86 requested a review from a team as a code owner November 13, 2023 11:12
@@ -224,6 +224,9 @@ impl Competition {
tracing::warn!(block = block.number, ?err, "solution reverts on new block");
*score_ref = None;
*self.settlement.lock().unwrap() = None;
if let Some(id) = settlement.notify_id() {
Copy link
Contributor Author

@sunce86 sunce86 Nov 14, 2023

Choose a reason for hiding this comment

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

Here we have IF because we decided to not send the notifications for merged solutions. While this is okkish now since external solvers are sending a single solution anyway, it may become problematic in the future with combinatorial auctions...

@sunce86 sunce86 merged commit b5a258a into main Nov 16, 2023
8 checks passed
@sunce86 sunce86 deleted the missing_notify branch November 16, 2023 09:34
@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Simulator to return block number if errored
2 participants