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

feat: toggle settlement health event upon settlement batch submission status #332

Merged
merged 6 commits into from
Jun 4, 2023

Conversation

omritoptix
Copy link
Contributor

@omritoptix omritoptix commented May 30, 2023

Overview

This pr moves the batch submission to settlement layer logic from the manager to the settlement.
By that it allows us to encapsulate the logic and handle any possible failures.
The manager will only be notified upon submission success or health status changes.

PR Standards

Opening a pull request should be able to meet the following requirements


For Author:

  • Targeted PR against correct branch
  • included the correct type prefix in the PR title
  • Linked to Github issue with discussion and accepted design
  • Targets only one github issue
  • Wrote unit and integration tests
  • All CI checks have passed
  • Added relevant godoc comments

For Reviewer:

  • confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • confirmed all author checklist items have been addressed

After reviewer approval:

  • In case targets main branch, PR should be squashed and merged.
  • In case PR targets a release branch, PR should be rebased.

@codecov
Copy link

codecov bot commented May 30, 2023

Codecov Report

Merging #332 (deb6d87) into main (bbd9f01) will increase coverage by 1.33%.
The diff coverage is 85.84%.

@@            Coverage Diff             @@
##             main     #332      +/-   ##
==========================================
+ Coverage   53.72%   55.06%   +1.33%     
==========================================
  Files          80       80              
  Lines       12887    12864      -23     
==========================================
+ Hits         6924     7084     +160     
+ Misses       5025     4817     -208     
- Partials      938      963      +25     
Impacted Files Coverage Δ
mocks/settlement/hubclient.go 49.36% <0.00%> (+7.87%) ⬆️
settlement/settlement.go 28.57% <ø> (+28.57%) ⬆️
utils/events.go 58.82% <50.00%> (ø)
settlement/mock/mock.go 71.68% <60.00%> (+4.11%) ⬆️
settlement/base.go 81.03% <80.00%> (+0.41%) ⬆️
settlement/dymension/dymension.go 59.03% <92.50%> (+39.81%) ⬆️
block/manager.go 70.66% <100.00%> (-0.16%) ⬇️
node/testutils.go 86.95% <100.00%> (ø)
testutil/mocks.go 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@omritoptix omritoptix marked this pull request as ready for review June 2, 2023 11:23
@omritoptix omritoptix requested a review from a team as a code owner June 2, 2023 11:23
mtsitrin
mtsitrin previously approved these changes Jun 4, 2023
Copy link
Contributor

@mtsitrin mtsitrin left a comment

Choose a reason for hiding this comment

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

I don't like the excessive usage of panic instead of returning errors,
IMO it's bad practice

block/manager.go Show resolved Hide resolved
settlement/base.go Outdated Show resolved Hide resolved
settlement/base.go Outdated Show resolved Hide resolved
settlement/dymension/dymension.go Outdated Show resolved Hide resolved
@omritoptix omritoptix merged commit 7c65250 into main Jun 4, 2023
@omritoptix omritoptix deleted the omritoptix/313-toggle-settlement-health branch June 4, 2023 16:19
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.

Toggle settlement health event upon settlement batch submission status
3 participants