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

Parallelize Sudo Deposit #777

Merged
merged 6 commits into from
May 15, 2023
Merged

Parallelize Sudo Deposit #777

merged 6 commits into from
May 15, 2023

Conversation

BrandonWeng
Copy link
Contributor

Describe your changes and provide context

Optimize the sudo deposit calls and the message building

Testing performed to validate your change

Ran in the same loadtest cluster for the other contract optimizations

x/dex/contract/abci.go Fixed Show fixed Hide fixed
x/dex/contract/abci.go Dismissed Show dismissed Hide dismissed
Comment on lines +174 to +189
go func(index int, contract types.ContractInfoV2) {
defer wg.Done()
if !contract.NeedOrderMatching || !contractToProcess.Contains(contract.ContractAddr) {
return
}
typedContractAddr := types.ContractAddress(contract.ContractAddr)
msg := keeperWrapper.GetDepositSudoMsg(sdkCtx, typedContractAddr)
if msg.IsEmpty() {
return
}
resultChan <- struct {
int
types.SudoOrderPlacementMsg
}{index, msg}

}(index, contract)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
@BrandonWeng BrandonWeng merged commit 3c32aab into master May 15, 2023
27 checks passed
@BrandonWeng BrandonWeng deleted the bweng-handle-depost branch May 15, 2023 23:13
udpatil added a commit that referenced this pull request Jun 7, 2023
udpatil added a commit that referenced this pull request Jun 7, 2023
udpatil added a commit that referenced this pull request Jun 7, 2023
* Update sei-chain usages to remove some deferred operations

* Revert "Parallelize Sudo Deposit  (#777)"

This reverts commit 3c32aab.

* fix unit test
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.

None yet

3 participants