diff --git a/node/pkg/governor/mainnet_chains.go b/node/pkg/governor/mainnet_chains.go index e6e4dc597c..c2dce4defe 100644 --- a/node/pkg/governor/mainnet_chains.go +++ b/node/pkg/governor/mainnet_chains.go @@ -12,33 +12,33 @@ func chainList() []chainConfigEntry { return []chainConfigEntry{ {emitterChainID: vaa.ChainIDSolana, dailyLimit: 25_000_000, bigTransactionSize: 2_500_000}, {emitterChainID: vaa.ChainIDEthereum, dailyLimit: 50_000_000, bigTransactionSize: 5_000_000}, - {emitterChainID: vaa.ChainIDTerra, dailyLimit: 500_000, bigTransactionSize: 50_000}, + {emitterChainID: vaa.ChainIDTerra, dailyLimit: 150_000, bigTransactionSize: 15_000}, {emitterChainID: vaa.ChainIDBSC, dailyLimit: 5_000_000, bigTransactionSize: 500_000}, {emitterChainID: vaa.ChainIDPolygon, dailyLimit: 5_000_000, bigTransactionSize: 500_000}, {emitterChainID: vaa.ChainIDAvalanche, dailyLimit: 5_000_000, bigTransactionSize: 500_000}, - {emitterChainID: vaa.ChainIDOasis, dailyLimit: 500_000, bigTransactionSize: 50_000}, + {emitterChainID: vaa.ChainIDOasis, dailyLimit: 250_000, bigTransactionSize: 25_000}, {emitterChainID: vaa.ChainIDAlgorand, dailyLimit: 1_000_000, bigTransactionSize: 100_000}, - {emitterChainID: vaa.ChainIDAurora, dailyLimit: 500_000, bigTransactionSize: 50_000}, + {emitterChainID: vaa.ChainIDAurora, dailyLimit: 0, bigTransactionSize: 0}, {emitterChainID: vaa.ChainIDFantom, dailyLimit: 500_000, bigTransactionSize: 50_000}, - {emitterChainID: vaa.ChainIDKarura, dailyLimit: 500_000, bigTransactionSize: 50_000}, - {emitterChainID: vaa.ChainIDAcala, dailyLimit: 500_000, bigTransactionSize: 50_000}, + {emitterChainID: vaa.ChainIDKarura, dailyLimit: 150_000, bigTransactionSize: 15_000}, + {emitterChainID: vaa.ChainIDAcala, dailyLimit: 100_000, bigTransactionSize: 10_000}, {emitterChainID: vaa.ChainIDKlaytn, dailyLimit: 500_000, bigTransactionSize: 50_000}, {emitterChainID: vaa.ChainIDCelo, dailyLimit: 2_000_000, bigTransactionSize: 200_000}, - {emitterChainID: vaa.ChainIDNear, dailyLimit: 500_000, bigTransactionSize: 50_000}, + {emitterChainID: vaa.ChainIDNear, dailyLimit: 150_000, bigTransactionSize: 15_000}, {emitterChainID: vaa.ChainIDMoonbeam, dailyLimit: 5_000_000, bigTransactionSize: 500_000}, - {emitterChainID: vaa.ChainIDTerra2, dailyLimit: 500_000, bigTransactionSize: 50_000}, + {emitterChainID: vaa.ChainIDTerra2, dailyLimit: 100_000, bigTransactionSize: 10_000}, {emitterChainID: vaa.ChainIDInjective, dailyLimit: 500_000, bigTransactionSize: 50_000}, {emitterChainID: vaa.ChainIDSui, dailyLimit: 5_000_000, bigTransactionSize: 500_000}, {emitterChainID: vaa.ChainIDAptos, dailyLimit: 1_000_000, bigTransactionSize: 100_000}, {emitterChainID: vaa.ChainIDArbitrum, dailyLimit: 5_000_000, bigTransactionSize: 500_000}, {emitterChainID: vaa.ChainIDOptimism, dailyLimit: 5_000_000, bigTransactionSize: 500_000}, - {emitterChainID: vaa.ChainIDXpla, dailyLimit: 500_000, bigTransactionSize: 50_000}, + {emitterChainID: vaa.ChainIDXpla, dailyLimit: 50_000, bigTransactionSize: 5_000}, {emitterChainID: vaa.ChainIDBase, dailyLimit: 2_000_000, bigTransactionSize: 200_000}, {emitterChainID: vaa.ChainIDSei, dailyLimit: 5_000_000, bigTransactionSize: 500_000}, {emitterChainID: vaa.ChainIDScroll, dailyLimit: 500_000, bigTransactionSize: 50_000}, - {emitterChainID: vaa.ChainIDMantle, dailyLimit: 500_000, bigTransactionSize: 50_000}, - {emitterChainID: vaa.ChainIDBlast, dailyLimit: 500_000, bigTransactionSize: 50_000}, - {emitterChainID: vaa.ChainIDXLayer, dailyLimit: 500_000, bigTransactionSize: 50_000}, + {emitterChainID: vaa.ChainIDMantle, dailyLimit: 100_000, bigTransactionSize: 10_000}, + {emitterChainID: vaa.ChainIDBlast, dailyLimit: 100_000, bigTransactionSize: 10_000}, + {emitterChainID: vaa.ChainIDXLayer, dailyLimit: 100_000, bigTransactionSize: 10_000}, {emitterChainID: vaa.ChainIDWormchain, dailyLimit: 500_000, bigTransactionSize: 50_000}, {emitterChainID: vaa.ChainIDSnaxchain, dailyLimit: 500_000, bigTransactionSize: 50_000}, } diff --git a/node/pkg/governor/mainnet_chains_test.go b/node/pkg/governor/mainnet_chains_test.go index 71e5c8aeb0..5607c8a9c8 100644 --- a/node/pkg/governor/mainnet_chains_test.go +++ b/node/pkg/governor/mainnet_chains_test.go @@ -20,8 +20,11 @@ func TestChainListSize(t *testing.T) { func TestChainDailyLimitRange(t *testing.T) { chainConfigEntries := chainList() - /* This IS a hard limit, if daily limit is set to zero it would - basically mean no value movement is allowed for that chain*/ + /* + If a chain is deprecated, we want to make sure its still governed + in the case that it is used. This will effectively stall all + transfers for 24 hours on a deprecated chain. + */ min_daily_limit := uint64(0) /* This IS NOT a hard limit, we can adjust it up as we see fit, @@ -36,7 +39,7 @@ func TestChainDailyLimitRange(t *testing.T) { /* Assuming that a governed chains should always be more than zero and less than 50,000,001 */ for _, chainConfigEntry := range chainConfigEntries { t.Run(chainConfigEntry.emitterChainID.String(), func(t *testing.T) { - assert.Greater(t, chainConfigEntry.dailyLimit, min_daily_limit) + assert.GreaterOrEqual(t, chainConfigEntry.dailyLimit, min_daily_limit) assert.Less(t, chainConfigEntry.dailyLimit, max_daily_limit) }) } @@ -62,6 +65,13 @@ func TestChainListBigTransfers(t *testing.T) { chainConfigEntries := chainList() for _, e := range chainConfigEntries { + + // If the daily limit is 0 then both the big TX and daily limit should be 0. + if e.dailyLimit == 0 { + assert.Equal(t, e.bigTransactionSize, e.dailyLimit) + continue + } + // it's always ideal to have bigTransactionSize be less than dailyLimit assert.Less(t, e.bigTransactionSize, e.dailyLimit)