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(rollapp): min bond is now defined on rollapp level #1579

Merged
merged 20 commits into from
Dec 3, 2024

Conversation

danwt
Copy link
Contributor

@danwt danwt commented Nov 29, 2024

Description


Closes #1577

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow-up issues.

PR review checkboxes:

I have...

  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Targeted PR against the correct branch
  • included the correct type prefix in the PR title
  • Linked to the GitHub issue with discussion and accepted design
  • Targets only one GitHub issue
  • Wrote unit and integration tests
  • Wrote relevant migration scripts if necessary
  • All CI checks have passed
  • Added relevant godoc comments
  • Updated the scripts for local run, e.g genesis_config_commands.sh if the PR changes parameters
  • Add an issue in the e2e-tests repo if necessary

SDK Checklist

  • Import/Export Genesis
  • Registered Invariants
  • Registered Events
  • Updated openapi.yaml
  • No usage of go map
  • No usage of time.Now()
  • Used fixed point arithmetic and not float arithmetic
  • Avoid panicking in Begin/End block as much as possible
  • No unexpected math Overflow
  • Used sendCoin and not SendCoins
  • Out-of-block compute is bounded
  • No serialized ID at the end of store keys
  • UInt to byte conversion should use BigEndian

Full security checklist here


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 the PR targets the main branch, PR should not be squash merge in order to keep meaningful git history.
  • In case the PR targets a release branch, PR must be rebased.

@danwt danwt marked this pull request as ready for review November 29, 2024 15:25
@danwt danwt requested a review from a team as a code owner November 29, 2024 15:25
x/rollapp/keeper/rollapp.go Outdated Show resolved Hide resolved
proto/dymensionxyz/dymension/rollapp/rollapp.proto Outdated Show resolved Hide resolved
x/sequencer/keeper/params.go Show resolved Hide resolved
Copy link
Contributor

@omritoptix omritoptix left a comment

Choose a reason for hiding this comment

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

nice work!
however I blv we should keep the min bond.
we can always set it to 0 at some point if we wish but I think it's good to start with sane min bond to protect unexperienced creators and maybe will change it later on.

@omritoptix omritoptix changed the title feat: min bond is now defined in rollapp type feat(rollapp): min bond is now defined in rollapp type Nov 29, 2024
@omritoptix omritoptix changed the title feat(rollapp): min bond is now defined in rollapp type feat(rollapp): min bond is now defined on rollapp level Nov 29, 2024
@danwt danwt requested a review from omritoptix November 29, 2024 17:17
@omritoptix
Copy link
Contributor

@danwt I think we also need migration for this (as on mainnet it's defined now on global level).
we can do that in this pr or a separate one.

Copy link

codecov bot commented Nov 30, 2024

Codecov Report

Attention: Patch coverage is 39.31889% with 196 lines in your changes missing coverage. Please review.

Project coverage is 22.59%. Comparing base (0988440) to head (af2e167).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
x/rollapp/types/tx.pb.go 19.04% 77 Missing and 8 partials ⚠️
x/rollapp/types/params.pb.go 0.00% 47 Missing ⚠️
x/rollapp/types/rollapp.pb.go 47.27% 21 Missing and 8 partials ⚠️
x/rollapp/client/cli/tx_update_rollapp.go 18.18% 9 Missing ⚠️
x/rollapp/client/cli/tx_create_rollapp.go 30.00% 5 Missing and 2 partials ⚠️
x/rollapp/keeper/bond.go 75.00% 2 Missing and 1 partial ⚠️
x/rollapp/keeper/msg_server_create_rollapp.go 0.00% 2 Missing and 1 partial ⚠️
x/rollapp/types/bond.go 83.33% 2 Missing and 1 partial ⚠️
x/rollapp/types/params.go 75.00% 2 Missing and 1 partial ⚠️
x/sequencer/keeper/invariants.go 25.00% 3 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1579      +/-   ##
==========================================
- Coverage   22.61%   22.59%   -0.02%     
==========================================
  Files         577      590      +13     
  Lines      127061   127609     +548     
==========================================
+ Hits        28729    28829     +100     
- Misses      94477    94911     +434     
- Partials     3855     3869      +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@VictorTrustyDev VictorTrustyDev left a comment

Choose a reason for hiding this comment

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

utACK LGTM!

x/rollapp/client/cli/tx_create_rollapp.go Show resolved Hide resolved
x/rollapp/keeper/bond.go Outdated Show resolved Hide resolved
x/rollapp/types/message_update_rollapp.go Outdated Show resolved Hide resolved
x/sequencer/types/bond.go Outdated Show resolved Hide resolved
x/sequencer/keeper/funds.go Show resolved Hide resolved
proto/dymensionxyz/dymension/rollapp/rollapp.proto Outdated Show resolved Hide resolved
@danwt
Copy link
Contributor Author

danwt commented Dec 2, 2024

@mtsitrin I'm considering your comments to be nits but I will change the param to adym

mtsitrin
mtsitrin previously approved these changes Dec 3, 2024
@mtsitrin mtsitrin merged commit 89d3abd into main Dec 3, 2024
5 checks passed
@mtsitrin mtsitrin deleted the danwt/1577-min-bond-parameterization branch December 3, 2024 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

change min bond to be relative to IRO funds raised in case such exists
4 participants