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: bump cosmos-sdk to v0.50.9 and ignite to v28.5.3 #1

Merged
merged 78 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
2ed4610
bump. ignite
Pantani Oct 1, 2024
a06c2e4
add missing queries
Pantani Oct 2, 2024
2a47525
fix wrong logic
Pantani Oct 2, 2024
7339325
fix ibc scoped keeper for testutil
Pantani Oct 2, 2024
5185311
fix some tests cases
Pantani Oct 2, 2024
a50b17f
remove. unused test cases
Pantani Oct 2, 2024
6a04528
fix some test cases
Pantani Oct 2, 2024
8cf3dde
add ibc. methods
Pantani Oct 5, 2024
6f29d54
fix. some tests
Pantani Oct 10, 2024
787a201
fix. some query tests
Pantani Oct 10, 2024
e6574ac
account prefix
Pantani Oct 14, 2024
7405fbf
fix reward_distribution
Pantani Oct 14, 2024
5563291
project genesis test
Pantani Oct 14, 2024
2ba349e
fix some error assert
Pantani Oct 14, 2024
28829ed
genesis. test
Pantani Oct 14, 2024
c6b54b0
fix some test assertions
Pantani Oct 14, 2024
702afec
fix error assertion for signer
Pantani Oct 16, 2024
514efc0
fix. params. test vars
Pantani Oct 16, 2024
f1557fc
set redudancy keepers
Pantani Oct 16, 2024
7552c70
use pointer for some keeper modules
Pantani Oct 16, 2024
35580b4
fix ibc keeper pointer
Pantani Oct 16, 2024
1f3c57e
error assertions
Pantani Oct 16, 2024
4ca2d1b
fix launch hooks
Pantani Oct 16, 2024
c3fda74
fix. hooks
Pantani Oct 16, 2024
10e5050
fix. query_verified_client_id_test
Pantani Oct 16, 2024
0e352f7
fix consensus. tests
Pantani Oct 16, 2024
400ff0c
fix accaddress parse
Pantani Oct 16, 2024
7a40546
remove test. case
Pantani Oct 16, 2024
d810ac1
app.go
Pantani Oct 17, 2024
79e2e3c
customgetsigners
Pantani Oct 17, 2024
e06f4ac
custom get signers
Pantani Oct 17, 2024
19e8ec6
fix custom signers
Pantani Oct 18, 2024
122b1c4
fix. deps
Pantani Oct 18, 2024
73bfddb
fix makefile
Pantani Oct 18, 2024
a008634
fix dep
Pantani Oct 18, 2024
e34a0af
remove unused error
Pantani Oct 18, 2024
10c10e4
fix test coverage
Pantani Oct 18, 2024
441f5a2
remove scripts
Pantani Oct 18, 2024
bc826dc
add. tests. and fix genesis tests
Pantani Oct 19, 2024
5b6c93c
fix auto cli wrong params
Pantani Oct 19, 2024
432b98c
fix wrong fundraising genesis var
Pantani Oct 19, 2024
338ae9e
fix wrong mint module and config vars
Pantani Oct 19, 2024
19c0f21
fix. config
Pantani Oct 19, 2024
cdf2d4b
sort genesis template for can be more easy to compare
Pantani Oct 19, 2024
166534c
move proto vars to snake case
Pantani Oct 20, 2024
18f9298
update genesis. templates
Pantani Oct 20, 2024
5aab01c
fix. local. test genesis
Pantani Oct 20, 2024
115ee03
fix keyring for python delegate scripts
Pantani Oct 20, 2024
75a10ab
fix coordinator creator flags
Pantani Oct 20, 2024
d6557f7
add comments to cli methods
Pantani Oct 20, 2024
744b8b0
add missing rpc methods
Pantani Oct 20, 2024
ebbb978
add trigger launch tx
Pantani Oct 20, 2024
ef83525
add trigger launch cli
Pantani Oct 20, 2024
52e8bdf
fix launch time parse
Pantani Oct 20, 2024
840cf5f
fix monitoring cmd
Pantani Oct 20, 2024
baa4af9
rollback validator state json
Pantani Oct 20, 2024
d45f768
fix python cmd scritp
Pantani Oct 20, 2024
1ae560f
fix genesis time script
Pantani Oct 20, 2024
8c4b31c
fix vs.yaml parse
Pantani Oct 21, 2024
603c9be
fix hermes command
Pantani Oct 21, 2024
bb12c50
fix k.InitializeConsumerClient
Pantani Oct 21, 2024
e16e95c
fix nodes configs
Pantani Oct 21, 2024
226a3c6
fix errors handler instead panic
Pantani Oct 21, 2024
8463ad8
fix unit test suite
Pantani Oct 21, 2024
1cf35a5
fix missing genesis import/export
Pantani Oct 21, 2024
c1d4ea6
gs.MonitoringInfo genesis populate
Pantani Oct 21, 2024
fbe7aba
add begin blocker for monitoring consumer
Pantani Oct 21, 2024
145d300
fix montotingg genesis tests
Pantani Oct 21, 2024
f7fcb31
fix missing ibc keepers
Pantani Oct 21, 2024
c5a9d96
fix monitoringp keeper
Pantani Oct 21, 2024
edbf81f
fix testnet scripts config
Pantani Oct 21, 2024
7a4f7e2
update keys
Pantani Oct 24, 2024
43ceb5a
fix python scripts
Pantani Oct 24, 2024
105a4f3
fix scripts and withdrawal delay
Pantani Oct 24, 2024
f7b46d2
bump modules repo
Pantani Oct 24, 2024
e597d3b
fix run auction and sale scripts
Pantani Oct 24, 2024
7ece84e
bump modules repo
Pantani Oct 24, 2024
6b1f531
fix changelog
Pantani Oct 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix python scripts
  • Loading branch information
Pantani committed Oct 24, 2024
commit 43ceb5a2d92fce4fe85cda464fcfdc2f4a81e09f
41 changes: 26 additions & 15 deletions localnet/initialize_rewards.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import argparse
from utils import cmd_devnull
import time
from utils import cmd

parser = argparse.ArgumentParser(description='Initialize the rewards on SPN for the testnet')
parser.add_argument('--last_block_height',
Expand All @@ -22,16 +23,22 @@


def initialize_rewards(lastBlockHeight, selfDelegationVal1, selfDelegationVal2, selfDelegationVal3):
cmd_devnull('networkd tx profile create-coordinator --from alice --chain-id spn-1 --keyring-backend test -y')
cmd_devnull(
time.sleep(2)
cmd('networkd tx profile create-coordinator --from alice --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)
cmd(
'networkd tx launch create-chain orbit-1 orbit.com 0xaaa --from alice --chain-id spn-1 --keyring-backend test -y')
cmd_devnull(
time.sleep(2)
cmd(
'networkd tx project create-project orbit 1000000orbit --from alice --chain-id spn-1 --keyring-backend test -y')
cmd_devnull(
'networkd tx project mint-vouchers 1 50000orbit --from alice --chain-id spn-1 --keyring-backend test -y')
cmd_devnull(
'networkd tx reward set-rewards 1 50000v/1/orbit {} --from alice --chain-id spn-1 --keyring-backend test -y'.format(
time.sleep(2)
cmd(
'networkd tx project mint-vouchers 0 50000orbit --from alice --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)
cmd(
'networkd tx reward set-rewards 0 50000v/1/orbit {} --from alice --chain-id spn-1 --keyring-backend test -y'.format(
lastBlockHeight))
time.sleep(2)

gentx1 = './testnet/node1/config/gentx/gentx.json'
gentx2 = './testnet/node2/config/gentx/gentx.json'
Expand All @@ -43,20 +50,24 @@ def initialize_rewards(lastBlockHeight, selfDelegationVal1, selfDelegationVal2,
val2 = 'spn1pkdk6m2nh77nlaep84cylmkhjder3arey7rll5'
val3 = 'spn1twckcceyw43da9j247pfs3yhqsv25j38grh68q'

cmd_devnull(
'networkd tx launch request-add-validator 1 {} {} {} aaa foo.com --validator-address {} --from alice --chain-id spn-1 --keyring-backend test -y'.format(
cmd(
'networkd tx launch request-add-validator 0 {} {} {} aaa foo.com --validator-address {} --from alice --chain-id spn-1 --keyring-backend test -y'.format(
gentx1, pub1, selfDelegationVal1, val1)),
cmd_devnull(
'networkd tx launch request-add-validator 1 {} {} {} aaa foo.com --validator-address {} --from alice --chain-id spn-1 --keyring-backend test -y'.format(
time.sleep(2)
cmd(
'networkd tx launch request-add-validator 0 {} {} {} aaa foo.com --validator-address {} --from alice --chain-id spn-1 --keyring-backend test -y'.format(
gentx2, pub2, selfDelegationVal2, val2)),
cmd_devnull(
'networkd tx launch request-add-validator 1 {} {} {} aaa foo.com --validator-address {} --from alice --chain-id spn-1 --keyring-backend test -y'.format(
time.sleep(2)
cmd(
'networkd tx launch request-add-validator 0 {} {} {} aaa foo.com --validator-address {} --from alice --chain-id spn-1 --keyring-backend test -y'.format(
gentx3, pub3, selfDelegationVal3, val3)),
time.sleep(2)

# Uncomment for testing incomplete validator set
# cmd_devnull('networkd tx launch request-add-validator 1 ./node3/config/gentx/gentx.json "FyTmyvZhwRjwqhY6eWykTfiE+0mwe+U0aSo3ti8DCW8=" 16000000stake aaa foo.com --validator-address spn1ezptsm3npn54qx9vvpah4nymre59ykr9exx2ul --from alice -y')

cmd_devnull('networkd tx launch trigger-launch 1 5s --from alice --chain-id spn-1 --keyring-backend test -y')
cmd('networkd tx launch trigger-launch 0 5s --from alice --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)


if __name__ == "__main__":
Expand Down
30 changes: 19 additions & 11 deletions localnet/run_auction.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import datetime
import time
from utils import cmd_devnull, cmd, initialize_project, date_f
from utils import cmd, initialize_project, date_f

auction_template_file = './auctions/auction_template.json'
auction_file = './auctions/auction.json'
Expand Down Expand Up @@ -32,25 +32,33 @@ def set_auction_json(selling_denom, selling_amount, paying_denom, start_price, m

# Fundraising
set_auction_json('v/1/orbit', '50000', 'uspn', '100', '50', date_f(start), date_f(end))
cmd('networkd tx fundraising create-batch-auction {} --from alice -y'.format(auction_file))
cmd('networkd tx fundraising create-batch-auction {} --from alice --chain-id spn-1 --keyring-backend test -y'.format(
auction_file))
time.sleep(2)
os.remove(auction_file)
cmd_devnull('networkd tx participation participate 1 4 --from bob -y')
cmd_devnull('networkd tx participation participate 1 4 --from carol -y')
cmd_devnull('networkd tx participation participate 1 4 --from dave -y')
cmd('networkd tx participation participate 0 4 --from bob --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)
cmd('networkd tx participation participate 0 4 --from carol --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)
cmd('networkd tx participation participate 0 4 --from dave --chain-id spn-1 --keyring-backend test -y')

# Wait auction start
print("waiting for auction start...")
time.sleep(15)

# Place bid
cmd('networkd tx fundraising bid 1 batch-many 120 10000v/1/orbit --from bob -y')
cmd('networkd tx fundraising bid 1 batch-many 80 20000v/1/orbit --from carol -y')
cmd('networkd tx fundraising bid 1 batch-many 140 20000v/1/orbit --from dave -y')
cmd('networkd tx fundraising place-bid 0 batch-many 120 10000v/1/orbit --from bob --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)
cmd('networkd tx fundraising place-bid 0 batch-many 80 20000v/1/orbit --from carol --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)
cmd('networkd tx fundraising place-bid 0 batch-many 140 20000v/1/orbit --from dave --chain-id spn-1 --keyring-backend test -y')

# Wait withdrawal delay
print("waiting for withdrawal delay...")
time.sleep(5)

cmd_devnull('networkd tx participation withdraw-allocations 1 --from bob -y')
cmd_devnull('networkd tx participation withdraw-allocations 1 --from carol -y')
cmd_devnull('networkd tx participation withdraw-allocations 1 --from dave -y')
cmd('networkd tx participation withdraw-allocations 0 --from bob --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)
cmd('networkd tx participation withdraw-allocations 0 --from carol --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)
cmd('networkd tx participation withdraw-allocations 0 --from dave --chain-id spn-1 --keyring-backend test -y')
8 changes: 5 additions & 3 deletions localnet/run_incentivized.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@

# Create verified IBC client on SPN
print('create verified client')
cmd('networkd q tendermint-validator-set 2 --node "tcp://localhost:26657" > vs.yaml')
cmd('networkd q ibc client self-consensus-state --height 2 --node "tcp://localhost:26657" > cs.yaml')
cmd('networkd tx monitoringc create-client 1 cs.yaml vs.yaml --unbonding-period {} --revision-height 2 --from alice --chain-id spn-1 --keyring-backend test -y'.format(
cmd('networkd q tendermint-validator-set 2 --node "tcp://localhost:26659" > vs.yaml')
cmd('networkd q ibc client self-consensus-state --height 2 --node "tcp://localhost:26659" > cs.yaml')
time.sleep(2)
cmd('networkd tx monitoringc create-client 0 cs.yaml vs.yaml --unbonding-period {} --revision-height 2 --from alice --chain-id spn-1 --keyring-backend test -y'.format(
unbondingTime))
time.sleep(2)

# Perform IBC connection
cmd('hermes --config ./hermes/config.toml create connection --a-chain spn-1 --a-client 07-tendermint-0 --b-client 07-tendermint-0')
Expand Down
35 changes: 22 additions & 13 deletions localnet/run_sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import datetime
import time
from utils import cmd_devnull, cmd, initialize_project, date_f
from utils import cmd, initialize_project, date_f

sale_template_file = './auctions/sale_template.json'
sale_file = './auctions/sale.json'
Expand All @@ -27,29 +27,38 @@ def set_sale_json(selling_denom, selling_amount, paying_denom, price, start_time
# Define auction start and end from current time
date_now = datetime.datetime.utcnow()
start = date_now + datetime.timedelta(seconds=15)
end = date_now + datetime.timedelta(seconds=40)
end = date_now + datetime.timedelta(seconds=55)

# Fundraising
set_sale_json('v/1/orbit', '50000', 'uspn', '100', date_f(start), date_f(end))
cmd_devnull('networkd tx fundraising create-fixed-price-auction {} --from alice -y'.format(sale_file))
set_sale_json('v/0/orbit', '50000', 'uspn', '100', date_f(start), date_f(end))
time.sleep(2)
cmd('networkd tx fundraising create-fixed-price-auction {} --from alice --chain-id spn-1 --keyring-backend test -y'.format(
sale_file))
os.remove(sale_file)
cmd_devnull('networkd tx participation participate 1 4 --from bob -y')
cmd_devnull('networkd tx participation participate 1 4 --from carol -y')
cmd_devnull('networkd tx participation participate 1 4 --from dave -y')
time.sleep(2)
cmd('networkd tx participation participate 0 4 --from bob --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)
cmd('networkd tx participation participate 0 4 --from carol --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)
cmd('networkd tx participation participate 0 4 --from dave --chain-id spn-1 --keyring-backend test -y')

# Wait auction start
print("waiting for auction start...")
time.sleep(15)

# Place bid
cmd('networkd tx fundraising bid 1 fixed-price 100 10000v/1/orbit --from bob -y')
cmd('networkd tx fundraising bid 1 fixed-price 100 20000v/1/orbit --from carol -y')
cmd('networkd tx fundraising bid 1 fixed-price 100 20000v/1/orbit --from dave -y')
cmd('networkd tx fundraising bid 0 fixed-price 100.0 10000v/0/orbit --from bob --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)
cmd('networkd tx fundraising bid 0 fixed-price 100.0 20000v/0/orbit --from carol --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)
cmd('networkd tx fundraising bid 0 fixed-price 100.0 20000v/0/orbit --from dave --chain-id spn-1 --keyring-backend test -y')

# Wait withdrawal delay
print("waiting for withdrawal delay...")
time.sleep(5)

cmd_devnull('networkd tx participation withdraw-allocations 1 --from bob -y')
cmd_devnull('networkd tx participation withdraw-allocations 1 --from carol -y')
cmd_devnull('networkd tx participation withdraw-allocations 1 --from dave -y')
cmd('networkd tx participation withdraw-allocations 0 --from bob --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)
cmd('networkd tx participation withdraw-allocations 0 --from carol --chain-id spn-1 --keyring-backend test -y')
time.sleep(2)
cmd('networkd tx participation withdraw-allocations 0 --from dave --chain-id spn-1 --keyring-backend test -y')
4 changes: 4 additions & 0 deletions localnet/spn/genesis_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
{
"amount": "200000000",
"denom": "uspn"
},
{
"amount": "200000000",
"denom": "v/0/orbit"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion x/monitoringc/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
MemStoreKey = "mem_monitoringc"

// Version defines the current version the IBC module supports
Version = "monitoringc-1"
Version = "monitoring-1"

// PortID is the default port id that module binds to
PortID = "monitoringc"
Expand Down
5 changes: 1 addition & 4 deletions x/monitoringp/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ const (
// ModuleName defines the module name
ModuleName = "monitoringp"

// FullModuleName defines the full module name used in interface like CLI to make it more explanatory
FullModuleName = "monitoring-provider"

// StoreKey defines the primary module store key
StoreKey = ModuleName

// MemStoreKey defines the in-memory store key
MemStoreKey = "mem_monitoringp"

// Version defines the current version the IBC module supports
Version = "monitoringp-1"
Version = "monitoring-1"

// PortID is the default port id that module binds to
PortID = "monitoringp"
Expand Down
Loading