-
Notifications
You must be signed in to change notification settings - Fork 6
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
cosmos v50.x upgrade [DRAFT] #179
base: main
Are you sure you want to change the base?
Conversation
fix dependencies fix build upgrade protogen image Co-authored-by: mmsqe <mavis@crypto.com> wait for block properly fix py-lint fix test fix py-lint
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Finishing Touches
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -9,7 +9,7 @@ | |||
from web3.middleware import geth_poa_middleware | |||
|
|||
from .cosmoscli import CosmosCLI | |||
from .utils import wait_for_port | |||
from .utils import supervisorctl, w3_wait_for_block, wait_for_port |
Check notice
Code scanning / CodeQL
Unused import Note test
@@ -3,14 +3,23 @@ | |||
import pytest | |||
from web3 import Web3 | |||
|
|||
from .network import setup_ethermint | |||
from .utils import ADDRS, send_transaction | |||
from .network import setup_custom_ethermint |
Check notice
Code scanning / CodeQL
Unused import Note test
} | ||
sended_hash_set = send_txs(w3, txs) | ||
for txhash in sended_hash_set: | ||
res = w3.eth.wait_for_transaction_receipt(txhash, timeout=10) |
Check warning
Code scanning / CodeQL
Variable defined multiple times Warning test
redefined
# wait_for_port, | ||
# ) | ||
import pytest | ||
from pystarport import ports |
Check notice
Code scanning / CodeQL
Unused import Note test
# ) | ||
import pytest | ||
from pystarport import ports | ||
from pystarport.cluster import SUPERVISOR_CONFIG_FILE |
Check notice
Code scanning / CodeQL
Unused import Note test
from pystarport import ports | ||
from pystarport.cluster import SUPERVISOR_CONFIG_FILE | ||
|
||
from .network import Ethermint, setup_custom_ethermint |
Check notice
Code scanning / CodeQL
Unused import Note test
from .utils import ( | ||
ADDRS, | ||
CONTRACTS, | ||
approve_proposal, | ||
deploy_contract, | ||
send_transaction, | ||
wait_for_block, | ||
wait_for_port, | ||
) |
Check notice
Code scanning / CodeQL
Unused import Note test
Import of 'wait_for_block' is not used.
Import of 'wait_for_port' is not used.
await t | ||
except asyncio.CancelledError: | ||
print("cancel") | ||
pass |
Check warning
Code scanning / CodeQL
Unnecessary pass Warning test
for _, m := range app.ModuleManager.Modules { | ||
if moduleWithName, ok := m.(module.HasName); ok { | ||
moduleName := moduleWithName.Name() | ||
if appModule, ok := moduleWithName.(appmodule.AppModule); ok { | ||
modules[moduleName] = appModule | ||
} | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { | ||
am.keeper.BeginBlock(ctx, req) | ||
func (am AppModule) BeginBlock(ctx context.Context) error { | ||
return am.keeper.BeginBlock(sdk.UnwrapSDKContext(ctx)) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
path flow from Begin/EndBlock to a panic call
if consParams != nil && consParams.Block.MaxGas > -1 { | ||
gasLimit = big.NewInt(consParams.Block.MaxGas) | ||
if consParams.Block == nil || consParams.Block.MaxGas <= -1 { | ||
panic(fmt.Sprintf("get invalid consensus params: %s", consParams)) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
store := k.storeService.OpenKVStore(ctx) | ||
bz, err := store.Get(types.ParamsKey) | ||
if err != nil { | ||
panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { | ||
am.keeper.BeginBlock(ctx, req) | ||
func (am AppModule) BeginBlock(ctx context.Context) error { | ||
return am.keeper.BeginBlock(sdk.UnwrapSDKContext(ctx)) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
path flow from Begin/EndBlock to a panic call
am.keeper.EndBlock(ctx, req) | ||
return []abci.ValidatorUpdate{} | ||
func (am AppModule) EndBlock(ctx context.Context) error { | ||
return am.keeper.EndBlock(sdk.UnwrapSDKContext(ctx)) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods Warning
No description provided.