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

Merge duality neutron (CORRECT BRANCH) #341

Merged
merged 117 commits into from
Nov 27, 2023
Merged

Conversation

jcompagni10
Copy link
Contributor

Merge duality modules (dex, epochs, gmp, ibcswap & incentives) into neutron.

Julian Compagni Portis added 23 commits November 1, 2023 15:21
the version of packet-forward-middleware being used by neutron breaks duality's
swap-and-forward middleware due to a change in how receiever addresses are
handled.
cleanup KeeperTestHelper and re-use for dex testing

centralize event testing assertions

rename test suite to be more informative
duality code requires max gas to be set initChain panics
In order to simulate more realistic trade volume and avoid inadvertent failures due to ErrInvalidPositionSpread
all of the basic user operations (fundXXXBalance, assertXXXBalance, XXXLimitsSells, etc.) treat TokenA and TokenB
as BIG tokens with an exponent of 6. Ie. fundAliceBalance(10, 10) funds alices account with 10,000,000 small TokenA and TokenB.
For tests requiring more accuracy methods that take Ints (ie. assertXXXAccountBalancesInt, NewWithdrawlInt) are used
and assume that amount are being provided in terms of small tokens.

Example:
s.fundAliceBalances(10, 10)
s.assertAliceBalances(10, 10) ==> True
s.assertAliceBalancesInt(sdkmath.NewInt(10_000_000), sdkmath.NewInt(10_000_000)) ==> true
-typos,
-remove extra maccperms
-remove unused expected keepers
-incorrect module for burning coins for ibcswap
-adding minting restriction for dex
Julian Compagni Portis added 4 commits November 1, 2023 15:34
every sdk.Coin.Add happening in DepositCore results in multiple traversals over all coins
in sharesIssued , and also involves allocation of additional data structures, thus resulting in quadratic
scaling of the DepositCore runtime (because it invokes sdk.Coins Add() for each issued share).
Much better gas efficiency since we don't need to perform duplicate lookups for
each share issuance

Also add additional check for duplicate deposits. This should exist regardless
but also required for share math to work if we aren't issuing shares within the
deposit loop
x/dex/types/tx.pb.go Outdated Show resolved Hide resolved
Julian Compagni Portis and others added 24 commits November 17, 2023 10:50
Add simple gmp ibcswap test
@pr0n00gler
Copy link
Collaborator

revert PFM reversions. Disable PFM for ibcswap
@pr0n00gler pr0n00gler merged commit 519e274 into update-sdk47 Nov 27, 2023
6 checks passed
@pr0n00gler pr0n00gler deleted the merge_duality_neutron branch May 9, 2024 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants