-
Notifications
You must be signed in to change notification settings - Fork 227
feat(inflation): add burn method #1823
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
Conversation
WalkthroughThe recent updates focus on enhancing the inflation module of the Nibiru blockchain application by introducing a token burning capability. This includes adding permissions for burning tokens, introducing new protobuf definitions for the burn functionality, and implementing the burn method across various components. The changes aim to allow users to burn tokens, thereby affecting the token supply and potentially influencing inflation rates. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 5
Configuration used: CodeRabbit UI
Files ignored due to path filters (2)
x/inflation/types/tx.pb.go
is excluded by:!**/*.pb.go
x/inflation/types/tx.pb.gw.go
is excluded by:!**/*.pb.gw.go
Files selected for processing (8)
- app/keepers.go (1 hunks)
- proto/nibiru/inflation/v1/tx.proto (3 hunks)
- x/inflation/keeper/keeper.go (1 hunks)
- x/inflation/keeper/keeper_test.go (1 hunks)
- x/inflation/keeper/msg_server.go (1 hunks)
- x/inflation/keeper/msg_server_test.go (1 hunks)
- x/inflation/types/interfaces.go (1 hunks)
- x/inflation/types/msgs.go (3 hunks)
Additional comments: 3
x/inflation/keeper/msg_server.go (1)
- 50-62: The implementation of the
Burn
method in themsgServer
struct correctly unwraps the context, validates the sender address, and calls theBurn
method on the keeper. However, there's no explicit validation for themsg.Coin
field within this method. WhileValidateBasic
on the message likely covers this, relying solely on message validation for critical checks can be risky, especially if the message structure or validation logic changes in the future.Consider adding explicit validation for the
msg.Coin
field within theBurn
method to ensure robustness.proto/nibiru/inflation/v1/tx.proto (1)
- 4-28: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [7-75]
The protobuf definitions for the new burn functionality are correctly structured and include all necessary components for the feature. However, it's important to ensure that the
cosmos/base/v1beta1/coin.proto
import is used consistently across the project to avoid version mismatches or deprecation issues in the future.Verification successful
The verification process has confirmed that the import statement
import "cosmos/base/v1beta1/coin.proto"
is used consistently across various protobuf files within the project. This consistency is crucial for maintaining compatibility and avoiding version mismatches or deprecation issues with thecosmos/base/v1beta1/coin.proto
file. Therefore, the original review comment regarding the need to ensure consistent use of this import across the project is validated by the evidence gathered from the codebase.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that `cosmos/base/v1beta1/coin.proto` is used consistently across all protobuf files. rg "import \"cosmos/base/v1beta1/coin.proto\"" --type protoLength of output: 89
Script:
#!/bin/bash # Verify that `cosmos/base/v1beta1/coin.proto` is used consistently across all protobuf files by including .proto files explicitly in the search. rg "import \"cosmos/base/v1beta1/coin.proto\"" --glob "*.proto"Length of output: 1583
app/keepers.go (1)
- 797-797: The update to include
authtypes.Burner
permission forinflationtypes.ModuleName
is correctly implemented and aligns with the PR's objective to introduce a coin burning feature. This change enables thex/inflation
module to burn coins, enhancing the Nibiru Chain's capabilities in managing its monetary policy.
SendCoinsFromAccountToModule( | ||
ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins, | ||
) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of SendCoinsFromAccountToModule
to the BankKeeper
interface is crucial for the burn functionality. However, the method lacks documentation. It's important for interface methods, especially those that are part of public APIs, to have clear, concise documentation explaining their purpose, parameters, and expected behavior.
Add documentation to the SendCoinsFromAccountToModule
method to improve code readability and maintainability.
func (k Keeper) Burn(ctx sdk.Context, coins sdk.Coins, sender sdk.AccAddress) error { | ||
if err := k.bankKeeper.SendCoinsFromAccountToModule( | ||
ctx, sender, types.ModuleName, coins, | ||
); err != nil { | ||
return err | ||
} | ||
|
||
return k.bankKeeper.BurnCoins(ctx, types.ModuleName, coins) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Burn
method in the Keeper
struct correctly transfers coins from an account to the module before burning them. This method should ensure that the coins are indeed transferred to a "burn" account or somehow marked as burned to prevent their reuse. Additionally, consider adding more detailed logging for auditability, especially for operations like burning coins which are critical to the monetary policy.
Enhance the Burn
method with detailed logging to improve traceability and auditability of burn operations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- CHANGELOG.md (2 hunks)
Additional comments: 1
CHANGELOG.md (1)
- 67-67: The documentation of the addition of the burn method to the inflation module is clear and follows the conventions of Keep a Changelog. It's correctly placed under the "State Machine Breaking" section, indicating its impact on the state machine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- x/inflation/keeper/keeper_test.go (1 hunks)
- x/inflation/keeper/msg_server_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- x/inflation/keeper/keeper_test.go
- x/inflation/keeper/msg_server_test.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- x/inflation/types/msgs.go (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- x/inflation/types/msgs.go
return err | ||
} | ||
|
||
return k.bankKeeper.BurnCoins(ctx, types.ModuleName, coins) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there logging done in the bank keeper so this can be picked up by heart monitor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use the query of the supply from the bank module
nibid q bank total
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is one thing missing from the tests. They don't check if the total supply response changes after burning
* feat(inflation): add burn method * Update CHANGELOG.md
* chore(perp): remove perp * chore(perp): remove perp protos * chore(stablecoin): remove stablecoin * chore(spot): remove spot * chore: use large ubuntu runner for goreleaser workflow * fix(ledger): bump the hid package to v0.9.2 which fixes ledger on new… (#1649) * fix(ledger): bump the hid package to v0.9.2 which fixes ledger on new macos versions * chore: update changelog * chore: update changelog * feat(wasmbinding)!: whitelisted stargate queries for QueryRequest::Stargate: auth, bank, gov, tokenfactory, epochs, inflation, oracle, sudo, devgas (#1646) * fix(tokenfactory)!: Fix bug in MsgBurn on total supply tracking * chore: rm stablecoin. How does this keep getting merged lol * test: add export statements for the gRPC query service descriptions in each module * feat(wasmbinding): whitelisted stargate queries for QueryRequest::Stargate * changelog * fix changelog * refactor!: make the epoch infos name consistent * docs,test(stargate_query): leave an in-depth explainer above the function * refactor: pR comments: earlier return + remove duplicate hardcoded paths * test: proto package may have more than 3 'parts'. Use len - 1 instead * docs: fix small documentation typos * chore: reset module consensus versions * fix(inflation): enable inflationary NIBI (#1655) * chore(epochs): add day epoch and remove 15min epoch from default genesis * chore(epochs): remove 15min epoch from default genesis * fix(inflation): inflate strategic reserves to sudo root account * fix(inflation): test inflation amounts * chore: update changelog * fix(keeper): inflation keeper instantiation * feat(oracle): edit oracle params msg (#1658) * chore: update changelog * Update CHANGELOG.md * chore(oracle): curate default oracle whitelist (#1659) * chore(oracle): curate default oracle whitelist * update changelog * chore(deps): Bump github.com/CosmWasm/wasmvm from 1.4.1 to 1.5.0 (#1657) Bumps [github.com/CosmWasm/wasmvm](https://github.com/CosmWasm/wasmvm) from 1.4.1 to 1.5.0. - [Release notes](https://github.com/CosmWasm/wasmvm/releases) - [Changelog](https://github.com/CosmWasm/wasmvm/blob/main/CHANGELOG.md) - [Commits](CosmWasm/wasmvm@v1.4.1...v1.5.0) --- updated-dependencies: - dependency-name: github.com/CosmWasm/wasmvm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: Unique-Divine <realuniquedivine@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * chore(deps): Bump google.golang.org/grpc from 1.58.3 to 1.59.0 (#1643) * chore(deps): Bump google.golang.org/grpc from 1.58.3 to 1.59.0 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.3 to 1.59.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.58.3...v1.59.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Updated changelog - dependabot --------- Signed-off-by: Unique-Divine <Unique-Divine@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> Co-authored-by: Unique-Divine <Unique-Divine@users.noreply.github.com> Co-authored-by: Unique-Divine <realuniquedivine@gmail.com> * chore(deps): Bump github.com/cosmos/ibc-go/v7 from 7.3.0 to 7.3.1 (#1647) * chore(oracle): remove bnb:usd from default whitelist * chore(epochs): add month default epoch * chore(wasm): bump wasmd dependency to v0.43.0 (#1660) * chore(wasm): bump wasmd dependency to v0.43.0 * Update CHANGELOG.md * fix: fix linter issues --------- Co-authored-by: Matthias <md2022@matrixsystems.co> * fix(epochs): fix epoch tests broken by adding month epoch into default genesis * feat: update wasmd to v0.44.0 (#1666) * feat: update wasmd to v0.44.0 * chore: lint * chore(inflation)!: remove x/inflation module (#1667) * chore(inflation): remove x/inflation and inflation proto files * fix: wasmbinding imports * chore(inflation): remove inflation from app keepers * update changelog * feat(inflation)!: make inflation follow a polynomial distribution (#1670) * feat: make inflation follow a polynomial distribution * chore: changelog * fix: fix inflation test * fix: fix epoch/period confusion * chore: update changelog * feat: add inflation events detailed distribution (#1695) * feat: add inflation events detailed distribution * chore: changelog * fix: improve error handling * fix: broken unit test + make x/sudo safer by making blank genesis invalid * refactor: run gofumpt formatter --------- Co-authored-by: Unique-Divine <realuniquedivine@gmail.com> * fix(inflation): fix default inflation allocation params (#1688) * fix: fix default inflation allocation * chore: changelog * fix: fix tests --------- Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * feat: add upgrade handler for inflation module (#1684) * upgrade handler * make lint * update changelog * fix changelog * use orderedModuleNames() function for upgrade --------- Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * fix: upgrade handler for v1.1.0 (#1706) * fix: upgrade handler for v1.1.0 * chore: update changelog * refactor(inflation): make inflation disabled by default (#1712) * refactor(inflation): make inflation disabled by default * chore: update changelog * chore: bump librocksdb to v8.9.1 (#1778) Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * chore: update changelog * ci: fix go mod * ci: remove go toolchain directive * feat: make inflation params a collection and add commands to update them (#1776) * feat: make inflation params a collection and add commands to update them * fix: more tests * chore: changelog * Update x/inflation/keeper/grpc_query.go Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * Update x/inflation/keeper/grpc_query.go Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * Update x/inflation/keeper/sudo.go Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * fix: fix tests and improve function * fix: add test for queryserver --------- Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * ci: bump grocksdb to 1.8.12 * fix: remove verify-dist-temp * ci: use new goreleaser image * ci: update make build commands * fix(inflation): fix first epoch's inflation distribution (#1786) * fix: fix inflation start bug * fix: fix off by 2 on inflation start * fix: make test more random * chore: changelog * fix: use sdkmath.Int instead of sdk.Int * comments + var names --------- Co-authored-by: Unique-Divine <realuniquedivine@gmail.com> * ci: update goreleaser config file * feat: upgrade handler for v1.0.1 * feat(inflation): add inflation tx cmds (#1795) * feat(inflation): add toggle-inflation cli command * feat(inflation): add edit-params command and update validate-basic * chore: update changelog * feat: uncomment amino registering on register legacy amino codec for inflation module (#1792) * uncomment amino registering on register legacy amino codec * add changelog entry --------- Co-authored-by: Unique-Divine <realuniquedivine@gmail.com> * feat: handle case where skip epoch not aligned with epoch passed (#1796) * fix(inflation): num skipped epochs tracking (#1797) * fix: fix bug on inflation * chore: changelog * fix: add bool to see wether inflation ever started * fix: epoch off by one error * chore: unwire epochs keeper from inflation keeper * fix: off by one tests --------- Co-authored-by: Kevin Yang <5478483+k-yang@users.noreply.github.com> * chore: bump cosmos-sdk to v0.47.9 (#1808) * chore: bump cosmos-sdk to v0.47.9 * chore: update changelog * chore: add v1.0.2 upgrade handler * fix(inflation-docs): ① Document inflation + ② delete unused code + ③ fix CI (#1799) * refactor,docs(inflation): Document everything + delete unused code * changelog * feat(localnet): make perp and spot modules optional features * fix(e2e-wasm.yml-ci): Use consistent command runner * wip! move nibid to path after downlaoding release * wip! fix syntax error in localnet.sh * wip!: what version is running? * wip! try: simplify and use fresh build * wip! fix param space * wip!: fix source path in chaosnet and localnet * wip!: fix source path in chaosnet and localnet * wip!: fix source path in chaosnet and localnet * fix(localent.sh): missing prices in oralce genesis * wait a bit since localnet is fixed now * fix(deploy-wasm): using wrong binary name * ci: Runs well but needs a better name * ci: fix chaosnet build (#1806) * ci: fix chaosnet build * fix(scripts): use better current absolute path directory fn * refactor(e2e-localnet): remove unused script * fix(justfile): handle case where stop is called without anything running --------- Co-authored-by: Unique-Divine <realuniquedivine@gmail.com> * chore: bump cosmos-sdk to v0.47.9 (#1808) * chore: bump cosmos-sdk to v0.47.9 * chore: update changelog * feat: update default inflation rate (#1804) * feat: update default inflation rate * chore: changelog * fix: fix rounding issue * ci: remove go toolchain in go.mod file * ci: revert back to cosmos sdk v0.47.5 * ci: bump to cosmos-sdk v0.47.6 * ci: bump to cosmos-sdk v0.47.7 * ci: bump to cosmos-sdk v0.47.8 * ci: bump to cosmos-sdk v0.47.9 * ci: revert to cosmos sdk v0.47.5 * chore: bump cosmos-sdk to v0.47.10 * chore: add back v1.0.1 files * fix: add back v1.0.2 upgrade handler * fix: wasm ibc transaction panic (#1816) * fix wasm ibc transaction panic * include upgrade 1.0.3 * linter * update and fix changelog * feat: base64 decoder for cw3 wasm messages (#1731) * wip * feat: have a dirty funny looking solution * chore: changelog * fix: fix replace usage * Update cmd/nibid/cmd/decode_base64.go Co-authored-by: Kevin Yang <5478483+k-yang@users.noreply.github.com> * fix: turns out InterfaceRegistry.Resolve does the trick * chore: changelog * fix: remove unused import --------- Co-authored-by: Kevin Yang <5478483+k-yang@users.noreply.github.com> * refactor(decode-base64): clean code improvements and fn docs (#1754) * add date into changelog for release * chore: finalize v1.1.0 changelog * feat(inflation): add burn method (#1823) * feat(inflation): add burn method * Update CHANGELOG.md * chore: fix changelog (#1824) * test(inflation): add additional burn test cases (#1828) * test(inflation): add negative burn tests * test(inflation): add total supply check to burn tests * Update CHANGELOG.md * feat(tokenfactory): burn native method (#1832) * refactor: move Burn rpc method to x/tokenfactory * Update tx_msgs.go * feat: add burn native method to tokenfactory msg server * feat: add cli cmd * fix: validate msg * feat: add v1.2.0 upgrade handler * Update CHANGELOG.md * fix: register codec for MsgBurnNative * fix: test --------- Co-authored-by: Unique-Divine <realuniquedivine@gmail.com> * revert: remove x/inflation burn method * feat(ica): ICA Host / Controller integration (#1820) * ICA Host / Controller integration. Added upgrade constants. Added make format command * Fixed required message URLs * Code import fix * Fixed upgrade name * Fixed upgrade target * Changed version number * Update CHANGELOG.md --------- Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com> Co-authored-by: Kevin Yang <5478483+k-yang@users.noreply.github.com> * refactor(oracle): add oracle slashing events (#1859) * refactor(oracle): add oracle slashing events * Update CHANGELOG.md * fix(ica): add controller stack (#1864) * fix(ica): add controller stack * chore: update changelog * fix: linter issues * Update CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat(wasm)!: increase contract size limit to 3MB (#1906) * feat(wasm): increase contract size limit to 3MB * chore: update changelog * feat: add pebbledb support (#1818) * chore: make default db backend PebbleDB * chore: update changelog * chore: add v1.4.0 upgrade handler * feat(ibc): add wasm stack to ibc router (#1931) * feat(ibc): add wasm stack to ibc router * Update CHANGELOG.md * feat: add v1.5.0 upgrade handler * chore: update changelog * feat: add pebbledb support * chore: remove wasmbinding folder and nibiru/v1 dependency * fix: remove extra overrideWasmVariables * fix: upgrades * fix: oracle keeper * fix: epochs tests * feat: add v2.0.0 upgrade handler * linter * fix: upgrade handlers had wrong function type * Revert "feat: enable wasm light clients on IBC (08-wasm) (#2068)" This reverts commit ee5e29f. * fix: remove v2.1.0 upgrade handler * chore: update changelog for v2 EVM release * fix: revert testnet-1 chain id to 7210 * fix: revert wasmvm to v1.5.0 * feat(ibc): add back 08-wasm client * chore: minor refactors to resemble main branch --------- Signed-off-by: Unique-Divine <realuniquedivine@github.com> Signed-off-by: Unique-Divine <Unique-Divine@users.noreply.github.com> Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Unique-Divine <Unique-Divine@users.noreply.github.com> Co-authored-by: Unique-Divine <realuniquedivine@gmail.com> Co-authored-by: Matthias <md2022@matrixsystems.co> Co-authored-by: Matthias <97468149+matthiasmatt@users.noreply.github.com> Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com> Co-authored-by: Helder Moreira <helder-moreira@users.noreply.github.com> Co-authored-by: Segfault <5221072+Segfaultd@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Oleg Nikonychev <oleg.nikonychev@gmail.com>
* feat(inflation): add burn method * Update CHANGELOG.md
* chore(perp): remove perp * chore(perp): remove perp protos * chore(stablecoin): remove stablecoin * chore(spot): remove spot * chore: use large ubuntu runner for goreleaser workflow * fix(ledger): bump the hid package to v0.9.2 which fixes ledger on new… (#1649) * fix(ledger): bump the hid package to v0.9.2 which fixes ledger on new macos versions * chore: update changelog * chore: update changelog * feat(wasmbinding)!: whitelisted stargate queries for QueryRequest::Stargate: auth, bank, gov, tokenfactory, epochs, inflation, oracle, sudo, devgas (#1646) * fix(tokenfactory)!: Fix bug in MsgBurn on total supply tracking * chore: rm stablecoin. How does this keep getting merged lol * test: add export statements for the gRPC query service descriptions in each module * feat(wasmbinding): whitelisted stargate queries for QueryRequest::Stargate * changelog * fix changelog * refactor!: make the epoch infos name consistent * docs,test(stargate_query): leave an in-depth explainer above the function * refactor: pR comments: earlier return + remove duplicate hardcoded paths * test: proto package may have more than 3 'parts'. Use len - 1 instead * docs: fix small documentation typos * chore: reset module consensus versions * fix(inflation): enable inflationary NIBI (#1655) * chore(epochs): add day epoch and remove 15min epoch from default genesis * chore(epochs): remove 15min epoch from default genesis * fix(inflation): inflate strategic reserves to sudo root account * fix(inflation): test inflation amounts * chore: update changelog * fix(keeper): inflation keeper instantiation * feat(oracle): edit oracle params msg (#1658) * chore: update changelog * Update CHANGELOG.md * chore(oracle): curate default oracle whitelist (#1659) * chore(oracle): curate default oracle whitelist * update changelog * chore(deps): Bump github.com/CosmWasm/wasmvm from 1.4.1 to 1.5.0 (#1657) Bumps [github.com/CosmWasm/wasmvm](https://github.com/CosmWasm/wasmvm) from 1.4.1 to 1.5.0. - [Release notes](https://github.com/CosmWasm/wasmvm/releases) - [Changelog](https://github.com/CosmWasm/wasmvm/blob/main/CHANGELOG.md) - [Commits](CosmWasm/wasmvm@v1.4.1...v1.5.0) --- updated-dependencies: - dependency-name: github.com/CosmWasm/wasmvm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: Unique-Divine <realuniquedivine@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * chore(deps): Bump google.golang.org/grpc from 1.58.3 to 1.59.0 (#1643) * chore(deps): Bump google.golang.org/grpc from 1.58.3 to 1.59.0 Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.3 to 1.59.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.58.3...v1.59.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Updated changelog - dependabot --------- Signed-off-by: Unique-Divine <Unique-Divine@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> Co-authored-by: Unique-Divine <Unique-Divine@users.noreply.github.com> Co-authored-by: Unique-Divine <realuniquedivine@gmail.com> * chore(deps): Bump github.com/cosmos/ibc-go/v7 from 7.3.0 to 7.3.1 (#1647) * chore(oracle): remove bnb:usd from default whitelist * chore(epochs): add month default epoch * chore(wasm): bump wasmd dependency to v0.43.0 (#1660) * chore(wasm): bump wasmd dependency to v0.43.0 * Update CHANGELOG.md * fix: fix linter issues --------- Co-authored-by: Matthias <md2022@matrixsystems.co> * fix(epochs): fix epoch tests broken by adding month epoch into default genesis * feat: update wasmd to v0.44.0 (#1666) * feat: update wasmd to v0.44.0 * chore: lint * chore(inflation)!: remove x/inflation module (#1667) * chore(inflation): remove x/inflation and inflation proto files * fix: wasmbinding imports * chore(inflation): remove inflation from app keepers * update changelog * feat(inflation)!: make inflation follow a polynomial distribution (#1670) * feat: make inflation follow a polynomial distribution * chore: changelog * fix: fix inflation test * fix: fix epoch/period confusion * chore: update changelog * feat: add inflation events detailed distribution (#1695) * feat: add inflation events detailed distribution * chore: changelog * fix: improve error handling * fix: broken unit test + make x/sudo safer by making blank genesis invalid * refactor: run gofumpt formatter --------- Co-authored-by: Unique-Divine <realuniquedivine@gmail.com> * fix(inflation): fix default inflation allocation params (#1688) * fix: fix default inflation allocation * chore: changelog * fix: fix tests --------- Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * feat: add upgrade handler for inflation module (#1684) * upgrade handler * make lint * update changelog * fix changelog * use orderedModuleNames() function for upgrade --------- Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * fix: upgrade handler for v1.1.0 (#1706) * fix: upgrade handler for v1.1.0 * chore: update changelog * refactor(inflation): make inflation disabled by default (#1712) * refactor(inflation): make inflation disabled by default * chore: update changelog * chore: bump librocksdb to v8.9.1 (#1778) Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * chore: update changelog * ci: fix go mod * ci: remove go toolchain directive * feat: make inflation params a collection and add commands to update them (#1776) * feat: make inflation params a collection and add commands to update them * fix: more tests * chore: changelog * Update x/inflation/keeper/grpc_query.go Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * Update x/inflation/keeper/grpc_query.go Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * Update x/inflation/keeper/sudo.go Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * fix: fix tests and improve function * fix: add test for queryserver --------- Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> * ci: bump grocksdb to 1.8.12 * fix: remove verify-dist-temp * ci: use new goreleaser image * ci: update make build commands * fix(inflation): fix first epoch's inflation distribution (#1786) * fix: fix inflation start bug * fix: fix off by 2 on inflation start * fix: make test more random * chore: changelog * fix: use sdkmath.Int instead of sdk.Int * comments + var names --------- Co-authored-by: Unique-Divine <realuniquedivine@gmail.com> * ci: update goreleaser config file * feat: upgrade handler for v1.0.1 * feat(inflation): add inflation tx cmds (#1795) * feat(inflation): add toggle-inflation cli command * feat(inflation): add edit-params command and update validate-basic * chore: update changelog * feat: uncomment amino registering on register legacy amino codec for inflation module (#1792) * uncomment amino registering on register legacy amino codec * add changelog entry --------- Co-authored-by: Unique-Divine <realuniquedivine@gmail.com> * feat: handle case where skip epoch not aligned with epoch passed (#1796) * fix(inflation): num skipped epochs tracking (#1797) * fix: fix bug on inflation * chore: changelog * fix: add bool to see wether inflation ever started * fix: epoch off by one error * chore: unwire epochs keeper from inflation keeper * fix: off by one tests --------- Co-authored-by: Kevin Yang <5478483+k-yang@users.noreply.github.com> * chore: bump cosmos-sdk to v0.47.9 (#1808) * chore: bump cosmos-sdk to v0.47.9 * chore: update changelog * chore: add v1.0.2 upgrade handler * fix(inflation-docs): ① Document inflation + ② delete unused code + ③ fix CI (#1799) * refactor,docs(inflation): Document everything + delete unused code * changelog * feat(localnet): make perp and spot modules optional features * fix(e2e-wasm.yml-ci): Use consistent command runner * wip! move nibid to path after downlaoding release * wip! fix syntax error in localnet.sh * wip!: what version is running? * wip! try: simplify and use fresh build * wip! fix param space * wip!: fix source path in chaosnet and localnet * wip!: fix source path in chaosnet and localnet * wip!: fix source path in chaosnet and localnet * fix(localent.sh): missing prices in oralce genesis * wait a bit since localnet is fixed now * fix(deploy-wasm): using wrong binary name * ci: Runs well but needs a better name * ci: fix chaosnet build (#1806) * ci: fix chaosnet build * fix(scripts): use better current absolute path directory fn * refactor(e2e-localnet): remove unused script * fix(justfile): handle case where stop is called without anything running --------- Co-authored-by: Unique-Divine <realuniquedivine@gmail.com> * chore: bump cosmos-sdk to v0.47.9 (#1808) * chore: bump cosmos-sdk to v0.47.9 * chore: update changelog * feat: update default inflation rate (#1804) * feat: update default inflation rate * chore: changelog * fix: fix rounding issue * ci: remove go toolchain in go.mod file * ci: revert back to cosmos sdk v0.47.5 * ci: bump to cosmos-sdk v0.47.6 * ci: bump to cosmos-sdk v0.47.7 * ci: bump to cosmos-sdk v0.47.8 * ci: bump to cosmos-sdk v0.47.9 * ci: revert to cosmos sdk v0.47.5 * chore: bump cosmos-sdk to v0.47.10 * chore: add back v1.0.1 files * fix: add back v1.0.2 upgrade handler * fix: wasm ibc transaction panic (#1816) * fix wasm ibc transaction panic * include upgrade 1.0.3 * linter * update and fix changelog * feat: base64 decoder for cw3 wasm messages (#1731) * wip * feat: have a dirty funny looking solution * chore: changelog * fix: fix replace usage * Update cmd/nibid/cmd/decode_base64.go Co-authored-by: Kevin Yang <5478483+k-yang@users.noreply.github.com> * fix: turns out InterfaceRegistry.Resolve does the trick * chore: changelog * fix: remove unused import --------- Co-authored-by: Kevin Yang <5478483+k-yang@users.noreply.github.com> * refactor(decode-base64): clean code improvements and fn docs (#1754) * add date into changelog for release * chore: finalize v1.1.0 changelog * feat(inflation): add burn method (#1823) * feat(inflation): add burn method * Update CHANGELOG.md * chore: fix changelog (#1824) * test(inflation): add additional burn test cases (#1828) * test(inflation): add negative burn tests * test(inflation): add total supply check to burn tests * Update CHANGELOG.md * feat(tokenfactory): burn native method (#1832) * refactor: move Burn rpc method to x/tokenfactory * Update tx_msgs.go * feat: add burn native method to tokenfactory msg server * feat: add cli cmd * fix: validate msg * feat: add v1.2.0 upgrade handler * Update CHANGELOG.md * fix: register codec for MsgBurnNative * fix: test --------- Co-authored-by: Unique-Divine <realuniquedivine@gmail.com> * revert: remove x/inflation burn method * feat(ica): ICA Host / Controller integration (#1820) * ICA Host / Controller integration. Added upgrade constants. Added make format command * Fixed required message URLs * Code import fix * Fixed upgrade name * Fixed upgrade target * Changed version number * Update CHANGELOG.md --------- Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com> Co-authored-by: Kevin Yang <5478483+k-yang@users.noreply.github.com> * refactor(oracle): add oracle slashing events (#1859) * refactor(oracle): add oracle slashing events * Update CHANGELOG.md * fix(ica): add controller stack (#1864) * fix(ica): add controller stack * chore: update changelog * fix: linter issues * Update CHANGELOG.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat(wasm)!: increase contract size limit to 3MB (#1906) * feat(wasm): increase contract size limit to 3MB * chore: update changelog * feat: add pebbledb support (#1818) * chore: make default db backend PebbleDB * chore: update changelog * chore: add v1.4.0 upgrade handler * feat(ibc): add wasm stack to ibc router (#1931) * feat(ibc): add wasm stack to ibc router * Update CHANGELOG.md * feat: add v1.5.0 upgrade handler * chore: update changelog * feat: add pebbledb support * chore: remove wasmbinding folder and nibiru/v1 dependency * fix: remove extra overrideWasmVariables * fix: upgrades * fix: oracle keeper * fix: epochs tests * feat: add v2.0.0 upgrade handler * linter * fix: upgrade handlers had wrong function type * Revert "feat: enable wasm light clients on IBC (08-wasm) (#2068)" This reverts commit 362f957. * fix: remove v2.1.0 upgrade handler * chore: update changelog for v2 EVM release * fix: revert testnet-1 chain id to 7210 * fix: revert wasmvm to v1.5.0 * feat(ibc): add back 08-wasm client * chore: minor refactors to resemble main branch --------- Signed-off-by: Unique-Divine <realuniquedivine@github.com> Signed-off-by: Unique-Divine <Unique-Divine@users.noreply.github.com> Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Unique-Divine <Unique-Divine@users.noreply.github.com> Co-authored-by: Unique-Divine <realuniquedivine@gmail.com> Co-authored-by: Matthias <md2022@matrixsystems.co> Co-authored-by: Matthias <97468149+matthiasmatt@users.noreply.github.com> Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com> Co-authored-by: Helder Moreira <helder-moreira@users.noreply.github.com> Co-authored-by: Segfault <5221072+Segfaultd@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Oleg Nikonychev <oleg.nikonychev@gmail.com>
Purpose / Abstract
Allows x/inflation to burn any coin. We are currently missing this feature on Nibiru Chain.
There are plans to expose it on the native cosmos-sdk x/bank module, but it's not released yet.
Note that it requires adding the
authtypes.Burner
permission to theinflation
module account, since that's the account that receives the coins from the user and burns it.Summary by CodeRabbit