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

Tethys upgrade #68

Closed
wants to merge 63 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
4437ab1
Update go, fedora in dockerfile
ChristianBorst Oct 2, 2024
85b8bd9
Upgrade SDK to v0.46.16, IBC to 6.3.1, Ethermint to v0.22, add upgrade
ChristianBorst Oct 1, 2024
ef43ff0
Configure block max gas in test env
ChristianBorst Oct 7, 2024
f764a69
Configure althea root cmd
ChristianBorst Oct 3, 2024
1b91186
Copy ERC20 module implementation from Canto repo
ChristianBorst Oct 7, 2024
ad0cfd0
Add contracts from Canto
ChristianBorst Oct 7, 2024
b190479
Add Multicall3 to test env
ChristianBorst Oct 7, 2024
b66792d
Run Integration tests natively in CI
jkilpatr Oct 8, 2024
46ec816
Advanced dex usage
ChristianBorst Nov 15, 2024
65a728b
Change testnet chain id to 6633438
ChristianBorst Nov 20, 2024
3fa9bdf
Fix contract deployment
ChristianBorst Nov 20, 2024
057d688
Update solidity-dex
ChristianBorst Nov 20, 2024
d24593c
Fix multicall deployment
ChristianBorst Nov 20, 2024
bae9262
Update solidity-dex
ChristianBorst Nov 20, 2024
5868a62
Add CONTRACTS_ROOT, DEX_CONTRACTS_ROOT env var support
ChristianBorst Nov 21, 2024
f0e389e
Add WETH contract to solidity folder, fix lots of DEX test issues
ChristianBorst Nov 21, 2024
6ca9dc5
Update solidity-dex
ChristianBorst Dec 9, 2024
a2220e7
Fix gasfree module tests
ChristianBorst Dec 9, 2024
c2877af
Mint DEX positions in base and quote quantities
ChristianBorst Dec 10, 2024
6c326a5
Improve DEX_ADVANCED test, calculate liq -> flows, add DEX_SWAP_MANY …
ChristianBorst Dec 13, 2024
7c69ee2
Implement evm fee burning test
ChristianBorst Dec 16, 2024
9bce867
Fix MsgEthereumTx support in lockup module
ChristianBorst Dec 17, 2024
4acdb8c
Update dex contracts for events
ChristianBorst Dec 19, 2024
1e6bcf2
Make two-script tests easier to run
ChristianBorst Dec 24, 2024
5a9267d
Add supply check to evm fee burning test
ChristianBorst Dec 24, 2024
8ad29a8
Migrate go contracts to solidity repo, fix compilation
ChristianBorst Dec 27, 2024
2c4768c
Fix DEX test liquidity initialization for testnet use
ChristianBorst Jan 3, 2025
4194030
Update solidity-dex
ChristianBorst Jan 3, 2025
ebb5936
Make two script tests even easier to run
ChristianBorst Jan 3, 2025
1ede53a
Add MsgEthereumTx testing to lockup unit test
ChristianBorst Jan 6, 2025
1c12f46
Add MsgEthereumTx testing to LOCKUP test
ChristianBorst Jan 6, 2025
1df03d1
Solidity: Update @openzeppelin/contracts to v5.1.0
ChristianBorst Jan 7, 2025
dd6ad1b
Solidity 0.8.28, update solidity contracts
ChristianBorst Jan 7, 2025
89ccaad
Solidity: Make ERC20s also ERC20Permit (EIP-2612)
ChristianBorst Jan 7, 2025
ea48dc2
Update LiquidInfrastructure contracts from contracts repo
ChristianBorst Jan 7, 2025
97e0359
Update LiquidInfrastructure contracts so they compile
ChristianBorst Jan 7, 2025
526479a
Make the testnet ERC20s EIP-2612 tokens
ChristianBorst Jan 7, 2025
7affe78
Add feegrant module
ChristianBorst Jan 8, 2025
e4c3e32
Neutrino -> Tethys, set distribution params in upgrade
ChristianBorst Jan 8, 2025
99318f5
Fix contract helper script, update compiled liquid infrastructure nft…
ChristianBorst Jan 8, 2025
75ece9e
Update upgrade test for Tethys
ChristianBorst Jan 8, 2025
905fbe3
Minor solidity changes
ChristianBorst Jan 8, 2025
5212ffe
Add solidity contract formatting step to make install
ChristianBorst Jan 9, 2025
8d61901
Set evm version to paris after solidity compiler update
ChristianBorst Jan 9, 2025
37cd2fd
Properly handle contract formatting in CI tests
ChristianBorst Jan 10, 2025
63d62bd
Manually add problematic ERC20Burnable JSON file to avoid CI issues
ChristianBorst Jan 10, 2025
aa2685f
Commit template contracts file for go embeds without bin code
ChristianBorst Jan 10, 2025
14583fc
WIP: Set problematic contracts to have a single 0 byte as bincode
ChristianBorst Jan 10, 2025
7fe31fe
Add missing Ops proposal registration to nativedex init()
ChristianBorst Jan 10, 2025
ac6ebbf
Fix DEX test by minting large ambient position
ChristianBorst Jan 10, 2025
3b0e0cb
Update IBC test chain in CI tests
ChristianBorst Jan 10, 2025
35a4a95
Make ERC20_CONVERSION more idempotent
ChristianBorst Jan 11, 2025
226b915
Improve test start logging
ChristianBorst Jan 11, 2025
effe346
Update solidity-dex
ChristianBorst Jan 11, 2025
332adb9
WIP: test modifications do not include
ChristianBorst Jan 11, 2025
cec8a32
Compile solidity folder for go CI tests
ChristianBorst Jan 11, 2025
e657546
Remove contract formatting for Go step in Makefile
ChristianBorst Jan 11, 2025
459bd80
Cargo clippy + audit fixes
ChristianBorst Jan 12, 2025
651dcdf
Rework go CI tests
ChristianBorst Jan 12, 2025
1dd932e
Lint fixes
ChristianBorst Jan 12, 2025
06be910
Fix: unknown method test
jkilpatr Jan 12, 2025
6f7b85a
Compile required contracts in CI
jkilpatr Jan 12, 2025
d368cb1
Fix: contracts prep in test container
jkilpatr Jan 12, 2025
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
WIP: test modifications do not include
ChristianBorst committed Jan 11, 2025
commit 332adb931b295c5e8f1e8e641744b466a5573f53
2 changes: 1 addition & 1 deletion tests/container-scripts/integration-tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
NODES=$1
TEST_TYPE=$2
set -eu
set -u

echo "Waiting for /althea/test-ready-to-run to exist before starting the test"
while [ ! -f /althea/test-ready-to-run ];
2 changes: 1 addition & 1 deletion tests/container-scripts/setup-validators.sh
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ jq ".app_state.evm.params.evm_denom=\"${STAKING_TOKEN}\"" /genesis.json > tmp_ge
jq '.app_state.feemarket.params.min_gas_price = "0.000000000000000000"' /genesis.json > tmp_genesis.json && mv tmp_genesis.json /genesis.json

# a 120 second voting period to allow us to pass governance proposals in the tests
jq '.app_state.gov.voting_params.voting_period = "120s"' /genesis.json > tmp_genesis.json && mv tmp_genesis.json /genesis.json
jq '.app_state.gov.voting_params.voting_period = "20s"' /genesis.json > tmp_genesis.json && mv tmp_genesis.json /genesis.json

# rename base denom to aalthea
sed -i 's/stake/aalthea/g' /genesis.json
11 changes: 11 additions & 0 deletions tests/container-scripts/upgrade-test-internal.sh
Original file line number Diff line number Diff line change
@@ -50,8 +50,19 @@ tests/container-scripts/integration-tests.sh $NODES UPGRADE_PART_1
unset OLD_BINARY_LOCATION
# Run the new binary
pkill oldalthea || true # allowed to fail
pkill althea || true # allowed to fail
pkill gaiad || true # allowed to fail
tests/container-scripts/run-testnet.sh $NODES

sleep 20

# Run the post-upgrade test
set +e
tests/container-scripts/integration-tests.sh $NODES UPGRADE_PART_2
popd
set -e

echo "Upgrade part 2 ran but may have failed, check the logs for more information"

sleep 6000000
echo "You waited too long, closing the container"
2 changes: 1 addition & 1 deletion tests/run-upgrade-test.sh
Original file line number Diff line number Diff line change
@@ -34,4 +34,4 @@ fi

# Run new test container instance
PORTS="-p 9090:9090 -p 26657:26657 -p 1317:1317 -p 8545:8545"
docker run --name althea_all_up_test_instance $PLATFORM_CMD --cap-add=NET_ADMIN $PORTS althea-base /bin/bash /althea/tests/container-scripts/upgrade-test-internal.sh $NODES $OLD_VERSION
docker run --name althea_all_up_test_instance $PLATFORM_CMD --cap-add=NET_ADMIN $PORTS althea-base /bin/bash /althea/tests/container-scripts/upgrade-test-internal.sh $NODES $OLD_VERSION

Unchanged files with check annotations Beta

feePool.CommunityPool = feePool.CommunityPool.Add(scraps...)
app.DistrKeeper.SetFeePool(ctx, feePool)
app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator())

Check failure on line 116 in app/export.go

GitHub Actions / Lint

Error return value of `(github.com/cosmos/cosmos-sdk/x/distribution/keeper.Hooks).AfterValidatorCreated` is not checked (errcheck)
return false
})
if err != nil {
panic(err)
}
app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr)

Check failure on line 130 in app/export.go

GitHub Actions / Lint

Error return value of `(github.com/cosmos/cosmos-sdk/x/distribution/keeper.Hooks).BeforeDelegationCreated` is not checked (errcheck)
app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr)

Check failure on line 131 in app/export.go

GitHub Actions / Lint

Error return value of `(github.com/cosmos/cosmos-sdk/x/distribution/keeper.Hooks).AfterDelegationModified` is not checked (errcheck)
}
// reset context height
contractAddr := common.HexToAddress(pair.Erc20Address)
coins := sdk.NewCoins(sdk.NewCoin(cosmosTokenBase, sdk.NewInt(tc.mint)))
suite.app.BankKeeper.MintCoins(suite.ctx, types.ModuleName, coins)

Check failure on line 160 in x/erc20/keeper/evm_hooks_test.go

GitHub Actions / Lint

Error return value of `suite.app.BankKeeper.MintCoins` is not checked (errcheck)
suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, types.ModuleName, sender, coins)

Check failure on line 161 in x/erc20/keeper/evm_hooks_test.go

GitHub Actions / Lint

Error return value of `suite.app.BankKeeper.SendCoinsFromModuleToAccount` is not checked (errcheck)
convertCoin := types.NewMsgConvertCoin(
sdk.NewCoin(cosmosTokenBase, sdk.NewInt(tc.burn)),
},
{
"ok",
func() { contract, _ = suite.DeployContract("coin", "token", erc20Decimals) },

Check failure on line 30 in x/erc20/keeper/evm_test.go

GitHub Actions / Lint

Error return value of `suite.DeployContract` is not checked (errcheck)
true,
},
}
contract, err := suite.DeployContract("coin", "token", erc20Decimals)
suite.Require().NoError(err)
account := tests.GenerateAddress()
data, _ := erc20.Pack("", account)

Check failure on line 158 in x/erc20/keeper/evm_test.go

GitHub Actions / Lint

Error return value of `erc20.Pack` is not checked (errcheck)
return data, &contract
},
false,
contract, err := suite.DeployContract("coin", "token", erc20Decimals)
suite.Require().NoError(err)
account := tests.GenerateAddress()
data, _ := erc20.Pack("balanceOf", account)

Check failure on line 170 in x/erc20/keeper/evm_test.go

GitHub Actions / Lint

Error return value of `erc20.Pack` is not checked (errcheck)
return data, &contract
},
true,
"deploy",
types.ModuleAddress,
func() ([]byte, *common.Address) {
ctorArgs, _ := contracts.ERC20MinterBurnerDecimalsContract.ABI.Pack("", "test", "test", uint8(18))

Check failure on line 200 in x/erc20/keeper/evm_test.go

GitHub Actions / Lint

Error return value of `contracts.ERC20MinterBurnerDecimalsContract.ABI.Pack` is not checked (errcheck)
data := append(contracts.ERC20MinterBurnerDecimalsContract.Bin, ctorArgs...)
return data, nil
},
func() ([]byte, *common.Address) {
params := suite.app.EvmKeeper.GetParams(suite.ctx)
params.EnableCreate = false
suite.app.EvmKeeper.SetParams(suite.ctx, params)

Check failure on line 212 in x/erc20/keeper/evm_test.go

GitHub Actions / Lint

Error return value of `suite.app.EvmKeeper.SetParams` is not checked (errcheck)
ctorArgs, _ := contracts.ERC20MinterBurnerDecimalsContract.ABI.Pack("", "test", "test", uint8(18))
data := append(contracts.ERC20MinterBurnerDecimalsContract.Bin, ctorArgs...)
return data, nil