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

Neutrino upgrade #68

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 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
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
200 changes: 98 additions & 102 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,205 +14,201 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
with:
working-directory: integration-tests/
workspaces: integration_tests/
cache-on-failure: true
- name: Build Integration Tests
run: cd integration_tests && cargo check --all --verbose
native_token:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: jpribyl/[email protected]
continue-on-error: true
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
- name: Prune cache to keep the size down
run: docker builder prune -af && docker system prune -af
workspaces: integration_tests/
cache-on-failure: true
- name: Test the native token features of the EVM
run: tests/all-up-test.sh NATIVE_TOKEN
run: tests/all-up-test-ci.sh NATIVE_TOKEN
lockup:
runs-on: ubuntu-latest
needs: native_token
steps:
- uses: actions/checkout@v2
- uses: jpribyl/[email protected]
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Lock up the chain and ensure funds are not transferrable
run: tests/all-up-test.sh LOCKUP
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh LOCKUP
microtx_fees:
runs-on: ubuntu-latest
needs: native_token
steps:
- uses: actions/checkout@v2
- uses: jpribyl/[email protected]
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Assert that fees are collected by the microtx module
run: tests/all-up-test.sh MICROTX_FEES
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh MICROTX_FEES
erc20_conversion:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/[email protected]
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Test the erc20 module's token conversion functionality
run: tests/all-up-test.sh ERC20_CONVERSION
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh ERC20_CONVERSION
liquid_accounts:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/[email protected]
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Test the microtx module's liquid infrastructure accounts functions
run: tests/all-up-test.sh LIQUID_ACCOUNTS
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh LIQUID_ACCOUNTS
ica_host:
needs: native_token
#needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/[email protected]
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Test the interchain accounts host module on Althea-L1
run: tests/all-up-test.sh ICA_HOST
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh ICA_HOST
ONBOARDING_DEFAULT_PARAMS:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/[email protected]
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Starts the onboarding module with the default params
run: tests/all-up-test.sh ONBOARDING_DEFAULT_PARAMS
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh ONBOARDING_DEFAULT_PARAMS
ONBOARDING_DISABLED_WHITELISTED:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/[email protected]
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Starts the onboarding module disabled with a whitelisted channel
run: tests/all-up-test.sh ONBOARDING_DISABLED_WHITELISTED
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh ONBOARDING_DISABLED_WHITELISTED
ONBOARDING_DISABLE_AFTER:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/[email protected]
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Starts the onboarding module permissively, but disables it after a transfer
run: tests/all-up-test.sh ONBOARDING_DISABLE_AFTER
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh ONBOARDING_DISABLE_AFTER
ONBOARDING_DELIST_AFTER:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/[email protected]
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Starts the onboarding module permissively, but removes the channel from the whilelist after a transfer
run: tests/all-up-test.sh ONBOARDING_DELIST_AFTER
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh ONBOARDING_DELIST_AFTER
DEX:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/[email protected]
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Performs basic DEX tests
run: tests/all-up-test.sh DEX
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh DEX
DEX_UPGRADE:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/[email protected]
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Tests the DEX callpath upgrade functionality
run: tests/all-up-test.sh DEX_UPGRADE
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh DEX_UPGRADE
DEX_SAFE_MODE:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/[email protected]
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Tests the DEX safe mode lockdown functionality
run: tests/all-up-test.sh DEX_SAFE_MODE
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh DEX_SAFE_MODE
DEX_OPS_PROPOSAL:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jpribyl/[email protected]
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
key: integration-test-cache-{hash}
restore-keys: |
integration-test-cache-
workspaces: integration_tests/
cache-on-failure: true
- name: Tests the nativedex OpsProposal function
run: tests/all-up-test.sh DEX_OPS_PROPOSAL
env:
NO_IMAGE_BUILD: True
run: tests/all-up-test-ci.sh DEX_OPS_PROPOSAL
EVM_FEE_BURNING:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
workspaces: integration_tests/
cache-on-failure: true
- name: Checks that evm fees are truly burned
run: tests/all-up-test-ci.sh EVM_FEE_BURNING
UPGRADE:
needs: native_token
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v5
- uses: Swatinem/rust-cache@v2
with:
workspaces: integration_tests/
cache-on-failure: true
- name: Tests the Neutrino upgrade
run: tests/run-upgrade-test.sh v1.4.0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ mytestnet
coverage.txt
profile.out
tests/dockerfile/althea.tar.gz
test-ready-to-run

# Vagrant
.vagrant/
Expand Down
2 changes: 1 addition & 1 deletion app/ante/charge_gasfree_fees_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,6 @@ func (suite *AnteTestSuite) TestChargeGasfreeFeesDecorator() {
// nolint: exhaustruct
suite.app.GasfreeKeeper.SetGasFreeMessageTypes(bothGasfreeCtx, []string{sdk.MsgTypeURL(&microtxtypes.MsgMicrotx{}), sdk.MsgTypeURL(&banktypes.MsgSend{})})

// Expect the error from the mempool fee decorator to contain something like "insufficient fees; got: x required: provided fee < minimum global feey"
// Expect the error from the mempool fee decorator to contain something like "insufficient fees; got: x required: provided fee < minimum global fee y"
suite.Require().NoError(runGasfreeTests(suite, gasfreeMicrotxCtx, gasfreeSendCtx, noGasfreeCtx, bothGasfreeCtx, msgMicrotxTx, msgSendTx, bothTx, addr, testDenom))
}
4 changes: 2 additions & 2 deletions app/ante/cosmos_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@
// nolint: exhaustruct
suite.app.GasfreeKeeper.SetGasFreeMessageTypes(bothGasfreeCtx, []string{sdk.MsgTypeURL(&microtxtypes.MsgMicrotx{}), sdk.MsgTypeURL(&banktypes.MsgSend{})})

// Expect the error from the mempool fee decorator to contain something like "insufficient fees; got: x required: provided fee < minimum global feey"
suite.Require().NoError(runBypassTest(suite, "insufficient fees; got:", gasfreeMicrotxCtx, gasfreeSendCtx, noGasfreeCtx, bothGasfreeCtx, msgMicrotxTx, msgSendTx, bothTx))
// Expect the error from the mempool fee decorator to contain something like "insufficient fees; got: x required: provided fee < minimum global fee"
suite.Require().NoError(runBypassTest(suite, "provided fee < minimum global fee", gasfreeMicrotxCtx, gasfreeSendCtx, noGasfreeCtx, bothGasfreeCtx, msgMicrotxTx, msgSendTx, bothTx))
}

// Checks that the MinGasPrices antedecorator is bypassed for applicable txs
Expand All @@ -126,7 +126,7 @@
suite.ctx = suite.ctx.WithIsCheckTx(false) // use checkTx false to avoid triggering mempool fee decorator
feemarketParams := suite.app.FeemarketKeeper.GetParams(suite.ctx)
feemarketParams.MinGasPrice = sdk.NewDec(100)
suite.app.FeemarketKeeper.SetParams(suite.ctx, feemarketParams) // Set the min gas price to trigger failure in the MinGasPricesDecorator

Check failure on line 129 in app/ante/cosmos_handler_test.go

View workflow job for this annotation

GitHub Actions / Lint

Error return value of `suite.app.FeemarketKeeper.SetParams` is not checked (errcheck)
privKey := suite.NewCosmosPrivkey()
addr := sdk.AccAddress(privKey.PubKey().Address().Bytes())
suite.FundAccount(suite.ctx, addr, big.NewInt(10000000000))
Expand Down Expand Up @@ -158,7 +158,7 @@
suite.ctx = suite.ctx.WithIsCheckTx(false) // use checkTx false to avoid triggering mempool fee decorator
feemarketParams := suite.app.FeemarketKeeper.GetParams(suite.ctx)
feemarketParams.MinGasPrice = sdk.NewDec(0)
suite.app.FeemarketKeeper.SetParams(suite.ctx, feemarketParams) // Set the min gas price to avoid failure from MinGasPricesDecorator

Check failure on line 161 in app/ante/cosmos_handler_test.go

View workflow job for this annotation

GitHub Actions / Lint

Error return value of `suite.app.FeemarketKeeper.SetParams` is not checked (errcheck)
privKey := suite.NewCosmosPrivkey()
addr := sdk.AccAddress(privKey.PubKey().Address().Bytes())
suite.FundAccount(suite.ctx, addr, big.NewInt(1))
Expand Down
13 changes: 0 additions & 13 deletions app/ante/eth_set_pubkey_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,19 +153,6 @@ func (suite *AnteTestSuite) TestEthSetPubkeyHandler() {
suite.Require().Error(err)
}
suite.Require().True(tc.correctPubKey(pubKey), "PubKey type incorrect after AnteHandler")

// Now check the old antehandler against the same Tx, see if it would create a pubkey
ctx, _ = suite.ctx.CacheContext()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this removed?

suite.testCaseSetup(ctx, addr, tc.startBaseAcc)
// nolint: errcheck
_, _ = suite.oldAnteHandler(ctx, tx, false)
acc = suite.app.AccountKeeper.GetAccount(ctx, addr)
pubKey = acc.GetPubKey()
if tc.expOldPubKey {
suite.Require().True(pubKey != nil && tc.correctPubKey(pubKey), "Old ante handler should have set a pubkey")
} else {
suite.Require().True(pubKey == nil, "Old ante handler should have set a pubkey")
}
})
}
}
Loading
Loading