-
Notifications
You must be signed in to change notification settings - Fork 608
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
Consensus min gas fee of .0025 uosmo #4244
Changes from 23 commits
dfe43ca
38946b7
c676d48
923b45e
7a82e14
125d59d
13679ce
295aebb
a374529
8c7f27d
e42e675
f40b0c7
b278a48
5db078c
a8b5c4c
275cfb8
e7db7e1
1896d2e
f3ffdcb
bf1b8bc
81ea3fd
efe1326
540eaff
63c07fa
af6f4a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ import ( | |
tmjson "github.com/tendermint/tendermint/libs/json" | ||
|
||
epochtypes "github.com/osmosis-labs/osmosis/v14/x/epochs/types" | ||
"github.com/osmosis-labs/osmosis/v14/x/gamm/pool-models/balancer" | ||
gammtypes "github.com/osmosis-labs/osmosis/v14/x/gamm/types" | ||
incentivestypes "github.com/osmosis-labs/osmosis/v14/x/incentives/types" | ||
minttypes "github.com/osmosis-labs/osmosis/v14/x/mint/types" | ||
|
@@ -27,6 +28,8 @@ import ( | |
twaptypes "github.com/osmosis-labs/osmosis/v14/x/twap/types" | ||
txfeestypes "github.com/osmosis-labs/osmosis/v14/x/txfees/types" | ||
|
||
types1 "github.com/cosmos/cosmos-sdk/codec/types" | ||
|
||
"github.com/osmosis-labs/osmosis/v14/tests/e2e/util" | ||
) | ||
|
||
|
@@ -52,6 +55,7 @@ const ( | |
AtomDenom = "uatom" | ||
OsmoIBCDenom = "ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518" | ||
StakeIBCDenom = "ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B7787" | ||
E2EFeeToken = "e2e-default-feetoken" | ||
MinGasPrice = "0.000" | ||
IbcSendAmount = 3300000000 | ||
ValidatorWalletName = "val" | ||
|
@@ -62,11 +66,13 @@ const ( | |
StakeBalanceA = 110000000000 | ||
StakeAmountA = 100000000000 | ||
// chainB | ||
ChainBID = "osmo-test-b" | ||
OsmoBalanceB = 500000000000 | ||
IonBalanceB = 100000000000 | ||
StakeBalanceB = 440000000000 | ||
StakeAmountB = 400000000000 | ||
ChainBID = "osmo-test-b" | ||
OsmoBalanceB = 500000000000 | ||
IonBalanceB = 100000000000 | ||
StakeBalanceB = 440000000000 | ||
StakeAmountB = 400000000000 | ||
GenesisFeeBalance = 100000000000 | ||
WalletFeeBalance = 100000000 | ||
|
||
EpochDuration = time.Second * 60 | ||
TWAPPruningKeepPeriod = EpochDuration / 4 | ||
|
@@ -84,6 +90,7 @@ var ( | |
StakeToken = sdk.NewInt64Coin(StakeDenom, IbcSendAmount) // 3,300ustake | ||
tenOsmo = sdk.Coins{sdk.NewInt64Coin(OsmoDenom, 10_000_000)} | ||
fiftyOsmo = sdk.Coins{sdk.NewInt64Coin(OsmoDenom, 50_000_000)} | ||
WalletFeeTokens = sdk.NewCoin(E2EFeeToken, sdk.NewInt(WalletFeeBalance)) | ||
) | ||
|
||
func addAccount(path, moniker, amountStr string, accAddr sdk.AccAddress, forkHeight int) error { | ||
|
@@ -97,6 +104,7 @@ func addAccount(path, moniker, amountStr string, accAddr sdk.AccAddress, forkHei | |
if err != nil { | ||
return fmt.Errorf("failed to parse coins: %w", err) | ||
} | ||
coins = coins.Add(sdk.NewCoin(E2EFeeToken, sdk.NewInt(GenesisFeeBalance))) | ||
|
||
balances := banktypes.Balance{Address: accAddr.String(), Coins: coins.Sort()} | ||
genAccount := authtypes.NewBaseAccount(accAddr, nil, 0, 0) | ||
|
@@ -347,10 +355,35 @@ func updateMintGenesis(mintGenState *minttypes.GenesisState) { | |
|
||
func updateTxfeesGenesis(txfeesGenState *txfeestypes.GenesisState) { | ||
txfeesGenState.Basedenom = OsmoDenom | ||
txfeesGenState.Feetokens = []txfeestypes.FeeToken{ | ||
{Denom: E2EFeeToken, PoolID: 1}, | ||
} | ||
} | ||
|
||
func updateGammGenesis(gammGenState *gammtypes.GenesisState) { | ||
gammGenState.Params.PoolCreationFee = tenOsmo | ||
// setup fee pool, between "e2e_default_fee_token" and "uosmo" | ||
feePoolParams := balancer.NewPoolParams(sdk.MustNewDecFromStr("0.01"), sdk.ZeroDec(), nil) | ||
feePoolAssets := []balancer.PoolAsset{ | ||
{ | ||
Weight: sdk.NewInt(100), | ||
Token: sdk.NewCoin("uosmo", sdk.NewInt(100000000000)), | ||
}, | ||
{ | ||
Weight: sdk.NewInt(100), | ||
Token: sdk.NewCoin(E2EFeeToken, sdk.NewInt(100000000000)), | ||
}, | ||
} | ||
pool1, err := balancer.NewBalancerPool(1, feePoolParams, feePoolAssets, "", time.Unix(0, 0)) | ||
if err != nil { | ||
panic(err) | ||
} | ||
anyPool, err := types1.NewAnyWithValue(&pool1) | ||
if err != nil { | ||
panic(err) | ||
} | ||
gammGenState.Pools = []*types1.Any{anyPool} | ||
gammGenState.NextPoolNumber = 2 | ||
Comment on lines
+365
to
+386
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we remove this and instead re-create this via CLI? This interferes with pool IDs that we are creating via CLI There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Two questions:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, for 2, it should be possible to create a pool with the fee via pool file, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The pool file doesn't contain the tx fee. (Adding something custom for the tx fee for initialization isn't really a big deal. It just has to come first, if you point me to where I do that, I can add it in relatively easily) |
||
} | ||
|
||
func updatePoolManagerGenesis(appGenState map[string]json.RawMessage) func(*poolmanagertypes.GenesisState) { | ||
|
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.
Why was this done?
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.
This was a driveby change to get the execution stack to have one entry point. (At the time I did this line, I thought I'd do the gas if statement in this method, ended up not doing that)
So can be reverted, but looks identical to the ExecTxCmd as far as I can tell?
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.
Yeah I think this is fine, was getting sidetracked by this but the change LGTM now.
I think I found the main problem. Should have the fix soon