This repository was archived by the owner on Jan 20, 2026. It is now read-only.
Add Support for Deferring Mints/Burns from the Module Accounts #63
Merged
BrandonWeng merged 1 commit intomainfrom Oct 25, 2022
Merged
Add Support for Deferring Mints/Burns from the Module Accounts #63BrandonWeng merged 1 commit intomainfrom
BrandonWeng merged 1 commit intomainfrom
Conversation
philipsu522
reviewed
Oct 21, 2022
types/deferred_bank_operations.go
Outdated
| } | ||
| } | ||
|
|
||
| func (m *DeferredBankOperationMapping) get(moduleAccount string) (Coins, bool) { |
Contributor
There was a problem hiding this comment.
these functions don't need locking?
Contributor
Author
There was a problem hiding this comment.
I made these private functions as they should only be called internally. let me add comments
Contributor
Author
There was a problem hiding this comment.
Actually, i just removed this. It's not really needed and adds more confusion
Merged
BrandonWeng
added a commit
that referenced
this pull request
Oct 24, 2022
## Describe your changes and provide context Refactors the code a bit and add necessary helpers for Tokenfactory mint and burn message types. * They both will deposit and withdraw from module accounts as they're used as intermediaries for storage For context, module accounts are a single source of the bottom neck when it comes to concurrency, so to remove this bottle neck, we avoid declaring them in the access ops, instead, we store an in-memory value protected by mutex locks and flush it to the AVL tree at the very end. This will ensure deterministic updates Follow-up PRs, still need to test concurrency: sei-protocol/sei-chain#331 #63 ## Testing performed to validate your change Mainly unit tests - will need to do some E2E testing once it's integrated with the sei-chain level chains. Will follow up with two more PRs Sanity check that bank sends aren't affected with the follow up PRs: 
b28f61a to
7770068
Compare
7770068 to
dc1736f
Compare
philipsu522
approved these changes
Oct 24, 2022
BrandonWeng
added a commit
that referenced
this pull request
Oct 27, 2022
## Describe your changes and provide context Refactors the code a bit and add necessary helpers for Tokenfactory mint and burn message types. * They both will deposit and withdraw from module accounts as they're used as intermediaries for storage For context, module accounts are a single source of the bottom neck when it comes to concurrency, so to remove this bottle neck, we avoid declaring them in the access ops, instead, we store an in-memory value protected by mutex locks and flush it to the AVL tree at the very end. This will ensure deterministic updates Follow-up PRs, still need to test concurrency: sei-protocol/sei-chain#331 #63 ## Testing performed to validate your change Mainly unit tests - will need to do some E2E testing once it's integrated with the sei-chain level chains. Will follow up with two more PRs Sanity check that bank sends aren't affected with the follow up PRs: 
BrandonWeng
added a commit
that referenced
this pull request
Oct 27, 2022
## Describe your changes and provide context sei-protocol/sei-chain#331 Adds helpers to support deferring mints and burn messages. Without this, we would need to define the module account as a dependency in the ACL mapping for concurrent TXs, and that would result in all mint/burns running sequentially, which is already the existing behavior. This keeps track of the mints and burns a mem-var and in sei-chain, at the end of delieverTx, they are written all at once ## Testing performed to validate your change See sei-protocol/sei-chain#331
masih
pushed a commit
to sei-protocol/sei-chain
that referenced
this pull request
Sep 29, 2025
## Describe your changes and provide context Refactors the code a bit and add necessary helpers for Tokenfactory mint and burn message types. * They both will deposit and withdraw from module accounts as they're used as intermediaries for storage For context, module accounts are a single source of the bottom neck when it comes to concurrency, so to remove this bottle neck, we avoid declaring them in the access ops, instead, we store an in-memory value protected by mutex locks and flush it to the AVL tree at the very end. This will ensure deterministic updates Follow-up PRs, still need to test concurrency: #331 sei-protocol/sei-cosmos#63 ## Testing performed to validate your change Mainly unit tests - will need to do some E2E testing once it's integrated with the sei-chain level chains. Will follow up with two more PRs Sanity check that bank sends aren't affected with the follow up PRs: 
masih
pushed a commit
to sei-protocol/sei-chain
that referenced
this pull request
Sep 30, 2025
## Describe your changes and provide context Refactors the code a bit and add necessary helpers for Tokenfactory mint and burn message types. * They both will deposit and withdraw from module accounts as they're used as intermediaries for storage For context, module accounts are a single source of the bottom neck when it comes to concurrency, so to remove this bottle neck, we avoid declaring them in the access ops, instead, we store an in-memory value protected by mutex locks and flush it to the AVL tree at the very end. This will ensure deterministic updates Follow-up PRs, still need to test concurrency: #331 sei-protocol/sei-cosmos#63 ## Testing performed to validate your change Mainly unit tests - will need to do some E2E testing once it's integrated with the sei-chain level chains. Will follow up with two more PRs Sanity check that bank sends aren't affected with the follow up PRs: 
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes and provide context
sei-protocol/sei-chain#331
Adds helpers to support deferring mints and burn messages. Without this, we would need to define the module account as a dependency in the ACL mapping for concurrent TXs, and that would result in all mint/burns running sequentially, which is already the existing behavior.
This keeps track of the mints and burns a mem-var and in sei-chain, at the end of delieverTx, they are written all at once
Testing performed to validate your change
See sei-protocol/sei-chain#331