From 629cdfaec639ccc12ed9f2603f86ddf3f8da5824 Mon Sep 17 00:00:00 2001 From: masih Date: Thu, 10 Sep 2026 11:00:54 +0000 Subject: [PATCH 1/3] Assert usei supply as deltas in mint and gov integration tests --- integration_test/gov_module/gov_proposal_test.yaml | 6 ++---- integration_test/mint_module/mint_test.yaml | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/integration_test/gov_module/gov_proposal_test.yaml b/integration_test/gov_module/gov_proposal_test.yaml index afb276b165..973d2067c8 100644 --- a/integration_test/gov_module/gov_proposal_test.yaml +++ b/integration_test/gov_module/gov_proposal_test.yaml @@ -142,8 +142,6 @@ - cmd: seid q bank total --denom usei --output json | jq -r .amount env: TOTAL_SUPPLY_AFTER_BURN verifiers: - # Check if the total supply is reduced or not to verify token burns + # The rejected proposal burns both deposits (10000000usei initial + 10000000usei top-up) - type: eval - expr: TOTAL_SUPPLY_BEFORE_BURN == 5000000000333333333333 - - type: eval - expr: TOTAL_SUPPLY_AFTER_BURN == 5000000000333313333333 + expr: TOTAL_SUPPLY_BEFORE_BURN - TOTAL_SUPPLY_AFTER_BURN == 20000000 diff --git a/integration_test/mint_module/mint_test.yaml b/integration_test/mint_module/mint_test.yaml index 52b7277989..149fb7c0cb 100644 --- a/integration_test/mint_module/mint_test.yaml +++ b/integration_test/mint_module/mint_test.yaml @@ -37,6 +37,6 @@ expr: LAST_MINT_AMOUNT == 333333333333 - type: eval expr: LAST_MINT_HEIGHT == 0 - # Total supply should have gone up by LAST_MINT_AMOUNT + # Genesis supply (5e21 usei) plus everything the schedule has minted so far - type: eval - expr: TOTAL_SUPPLY == 5000000000333333333333 + expr: TOTAL_SUPPLY == 5000000000000000000000 + TOTAL_MINT_AMOUNT - REMAINING_MINT_AMOUNT From 980caad424d3866e30830b7ba6a5ef1969525622 Mon Sep 17 00:00:00 2001 From: masih Date: Thu, 10 Sep 2026 11:18:35 +0000 Subject: [PATCH 2/3] Make the mint suite independent of how many daily mints have run --- .../gov_module/gov_proposal_test.yaml | 4 ---- integration_test/mint_module/mint_test.yaml | 17 +++++++++-------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/integration_test/gov_module/gov_proposal_test.yaml b/integration_test/gov_module/gov_proposal_test.yaml index 973d2067c8..1cd17a4e0a 100644 --- a/integration_test/gov_module/gov_proposal_test.yaml +++ b/integration_test/gov_module/gov_proposal_test.yaml @@ -135,10 +135,6 @@ # the expedited proposal auto-converts to regular; drive progress until it reaches a terminal status - cmd: seidbin=seid; chainid=sei; source integration_test/utils/_tx_helpers.sh && wait_for_proposal_status $PROPOSAL_ID PROPOSAL_STATUS_REJECTED admin env: PROPOSAL_STATUS - # Get the tally params again after proposal is passed - - cmd: seid q gov params --output json | jq -r .tally_params.expedited_quorum - env: NEW_PARAM - # Get the current tally params - cmd: seid q bank total --denom usei --output json | jq -r .amount env: TOTAL_SUPPLY_AFTER_BURN verifiers: diff --git a/integration_test/mint_module/mint_test.yaml b/integration_test/mint_module/mint_test.yaml index 149fb7c0cb..4f6946e6a6 100644 --- a/integration_test/mint_module/mint_test.yaml +++ b/integration_test/mint_module/mint_test.yaml @@ -17,26 +17,27 @@ env: LAST_MINT_AMOUNT - cmd: seid q mint minter --output --json | jq ".last_mint_date" -r env: LAST_MINT_DATE - - cmd: seid q mint minter --output --json | jq ".last_mint_height" -r - env: LAST_MINT_HEIGHT # Compare the total supply and make sure that it increased - cmd: seid q bank total --output json | jq -r -M ".supply[] | select(.denom==\"usei\").amount" env: TOTAL_SUPPLY + # Number of daily mints so far (one at genesis, plus one per UTC midnight the cluster has lived through) + - cmd: echo $(( (TOTAL_MINT_AMOUNT - REMAINING_MINT_AMOUNT) / LAST_MINT_AMOUNT )) + env: MINTS_SO_FAR verifiers: - type: eval expr: DENOM == "usei" - # Start date should be equal to last mint date since there's only one mint on the first day + # The schedule spans three days starting today; every mint so far lands inside it - type: eval - expr: START_DATE == LAST_MINT_DATE and END_DATE > START_DATE - # Total Mint Amount = Remaining Mint Amount + Last Mint Amount + expr: LAST_MINT_DATE >= START_DATE and END_DATE > LAST_MINT_DATE - type: eval expr: TOTAL_MINT_AMOUNT == 999999999999 - - type: eval - expr: REMAINING_MINT_AMOUNT == 666666666666 + # 999999999999 over three days releases exactly 333333333333 each day - type: eval expr: LAST_MINT_AMOUNT == 333333333333 - type: eval - expr: LAST_MINT_HEIGHT == 0 + expr: MINTS_SO_FAR >= 1 and MINTS_SO_FAR <= 3 + - type: eval + expr: MINTS_SO_FAR * LAST_MINT_AMOUNT + REMAINING_MINT_AMOUNT == TOTAL_MINT_AMOUNT # Genesis supply (5e21 usei) plus everything the schedule has minted so far - type: eval expr: TOTAL_SUPPLY == 5000000000000000000000 + TOTAL_MINT_AMOUNT - REMAINING_MINT_AMOUNT From a32b260b8442d8fc7f7ba2cabfe2bfe8163e92ec Mon Sep 17 00:00:00 2001 From: masih Date: Thu, 10 Sep 2026 11:26:56 +0000 Subject: [PATCH 3/3] Net out a daily mint landing between the two supply reads --- integration_test/gov_module/gov_proposal_test.yaml | 9 +++++++-- integration_test/mint_module/mint_test.yaml | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/integration_test/gov_module/gov_proposal_test.yaml b/integration_test/gov_module/gov_proposal_test.yaml index 1cd17a4e0a..1541a81a9e 100644 --- a/integration_test/gov_module/gov_proposal_test.yaml +++ b/integration_test/gov_module/gov_proposal_test.yaml @@ -121,6 +121,8 @@ # Get the current tally params - cmd: seid q bank total --denom usei --output json | jq -r .amount env: TOTAL_SUPPLY_BEFORE_BURN + - cmd: seid q mint minter --output json | jq -r '(.total_mint_amount|tonumber) - (.remaining_mint_amount|tonumber)' + env: MINTED_BEFORE # Make a new expedited proposal - cmd: seidbin=seid; chainid=sei; source integration_test/utils/_tx_helpers.sh && submit_gov_proposal admin "Gov Param Change Expedited" gov submit-proposal param-change ./integration_test/gov_module/proposal/expedited_proposal.json --fees 2000usei env: PROPOSAL_ID @@ -137,7 +139,10 @@ env: PROPOSAL_STATUS - cmd: seid q bank total --denom usei --output json | jq -r .amount env: TOTAL_SUPPLY_AFTER_BURN + - cmd: seid q mint minter --output json | jq -r '(.total_mint_amount|tonumber) - (.remaining_mint_amount|tonumber)' + env: MINTED_AFTER verifiers: - # The rejected proposal burns both deposits (10000000usei initial + 10000000usei top-up) + # The rejected proposal burns both deposits (10000000usei initial + 10000000usei top-up); + # a daily mint landing during the proposal is netted out - type: eval - expr: TOTAL_SUPPLY_BEFORE_BURN - TOTAL_SUPPLY_AFTER_BURN == 20000000 + expr: TOTAL_SUPPLY_BEFORE_BURN + MINTED_AFTER - MINTED_BEFORE - TOTAL_SUPPLY_AFTER_BURN == 20000000 diff --git a/integration_test/mint_module/mint_test.yaml b/integration_test/mint_module/mint_test.yaml index 4f6946e6a6..ddc70da0c9 100644 --- a/integration_test/mint_module/mint_test.yaml +++ b/integration_test/mint_module/mint_test.yaml @@ -20,6 +20,9 @@ # Compare the total supply and make sure that it increased - cmd: seid q bank total --output json | jq -r -M ".supply[] | select(.denom==\"usei\").amount" env: TOTAL_SUPPLY + # Re-read after the supply query so a mint landing between the two reads is accounted for + - cmd: seid q mint minter --output json | jq -r .remaining_mint_amount + env: REMAINING_AFTER_SUPPLY # Number of daily mints so far (one at genesis, plus one per UTC midnight the cluster has lived through) - cmd: echo $(( (TOTAL_MINT_AMOUNT - REMAINING_MINT_AMOUNT) / LAST_MINT_AMOUNT )) env: MINTS_SO_FAR @@ -40,4 +43,4 @@ expr: MINTS_SO_FAR * LAST_MINT_AMOUNT + REMAINING_MINT_AMOUNT == TOTAL_MINT_AMOUNT # Genesis supply (5e21 usei) plus everything the schedule has minted so far - type: eval - expr: TOTAL_SUPPLY == 5000000000000000000000 + TOTAL_MINT_AMOUNT - REMAINING_MINT_AMOUNT + expr: TOTAL_SUPPLY >= 5000000000000000000000 + TOTAL_MINT_AMOUNT - REMAINING_MINT_AMOUNT and TOTAL_SUPPLY <= 5000000000000000000000 + TOTAL_MINT_AMOUNT - REMAINING_AFTER_SUPPLY