Skip to content

Commit

Permalink
Merge branch 'main' into CNS-749-allow-policy-delete-in-project
Browse files Browse the repository at this point in the history
  • Loading branch information
oren-lava committed Dec 25, 2023
2 parents f35d93f + 41bb701 commit 6db1ca2
Show file tree
Hide file tree
Showing 110 changed files with 5,104 additions and 541 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/consensus_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ jobs:
run: go test ./x/downtime/...

- name: lava rewards unit Tests
run: go test ./x/rewards/...
run: go test ./x/rewards/...
43 changes: 25 additions & 18 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ var (
subscriptionmoduletypes.ModuleName: {authtypes.Burner, authtypes.Staking},
string(rewardsmoduletypes.ValidatorsRewardsAllocationPoolName): {authtypes.Burner, authtypes.Staking},
string(rewardsmoduletypes.ValidatorsRewardsDistributionPoolName): {authtypes.Burner, authtypes.Staking},
string(rewardsmoduletypes.ProviderRewardsDistributionPool): {authtypes.Burner, authtypes.Staking},
string(rewardsmoduletypes.ProvidersRewardsAllocationPool): {authtypes.Burner, authtypes.Staking},
// this line is used by starport scaffolding # stargate/app/maccPerms
}
)
Expand Down Expand Up @@ -429,6 +431,10 @@ func New(
)
epochstorageModule := epochstoragemodule.NewAppModule(appCodec, app.EpochstorageKeeper, app.AccountKeeper, app.BankKeeper)

// downtime module
app.DowntimeKeeper = downtimemodulekeeper.NewKeeper(appCodec, keys[downtimemoduletypes.StoreKey], app.GetSubspace(downtimemoduletypes.ModuleName), app.EpochstorageKeeper)
downtimeModule := downtimemodule.NewAppModule(app.DowntimeKeeper)

// timerstore keeper
app.TimerStoreKeeper = timerstorekeeper.NewKeeper(appCodec)

Expand Down Expand Up @@ -473,6 +479,24 @@ func New(
)
dualstakingModule := dualstakingmodule.NewAppModule(appCodec, app.DualstakingKeeper, app.AccountKeeper, app.BankKeeper)

app.RewardsKeeper = *rewardsmodulekeeper.NewKeeper(
appCodec,
keys[rewardsmoduletypes.StoreKey],
keys[rewardsmoduletypes.MemStoreKey],
app.GetSubspace(rewardsmoduletypes.ModuleName),
app.BankKeeper,
app.AccountKeeper,
app.SpecKeeper,
app.EpochstorageKeeper,
app.DowntimeKeeper,
app.StakingKeeper,
app.DualstakingKeeper,
app.DistrKeeper,
authtypes.FeeCollectorName,
app.TimerStoreKeeper,
)
rewardsModule := rewardsmodule.NewAppModule(appCodec, app.RewardsKeeper, app.AccountKeeper, app.BankKeeper)

app.SubscriptionKeeper = *subscriptionmodulekeeper.NewKeeper(
appCodec,
keys[subscriptionmoduletypes.StoreKey],
Expand All @@ -485,16 +509,13 @@ func New(
app.ProjectsKeeper,
app.PlansKeeper,
app.DualstakingKeeper,
app.RewardsKeeper,
app.FixationStoreKeeper,
app.TimerStoreKeeper,
app.StakingKeeper,
)
subscriptionModule := subscriptionmodule.NewAppModule(appCodec, app.SubscriptionKeeper, app.AccountKeeper, app.BankKeeper)

// downtime module
app.DowntimeKeeper = downtimemodulekeeper.NewKeeper(appCodec, keys[downtimemoduletypes.StoreKey], app.GetSubspace(downtimemoduletypes.ModuleName), app.EpochstorageKeeper)
downtimeModule := downtimemodule.NewAppModule(app.DowntimeKeeper)

app.PairingKeeper = *pairingmodulekeeper.NewKeeper(
appCodec,
keys[pairingmoduletypes.StoreKey],
Expand All @@ -516,20 +537,6 @@ func New(
)
pairingModule := pairingmodule.NewAppModule(appCodec, app.PairingKeeper, app.AccountKeeper, app.BankKeeper)

app.RewardsKeeper = *rewardsmodulekeeper.NewKeeper(
appCodec,
keys[rewardsmoduletypes.StoreKey],
keys[rewardsmoduletypes.MemStoreKey],
app.GetSubspace(rewardsmoduletypes.ModuleName),
app.BankKeeper,
app.AccountKeeper,
app.DowntimeKeeper,
app.StakingKeeper,
authtypes.FeeCollectorName,
app.TimerStoreKeeper,
)
rewardsModule := rewardsmodule.NewAppModule(appCodec, app.RewardsKeeper, app.AccountKeeper, app.BankKeeper)

// register the proposal types
govRouter := v1beta1.NewRouter()
govRouter.AddRoute(govtypes.RouterKey, v1beta1.ProposalHandler).
Expand Down
4 changes: 3 additions & 1 deletion common/types/time.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package types

import "time"
import (
"time"
)

const (
TimeFormat = "2006-January-02 15:04:05"
Expand Down
2 changes: 2 additions & 0 deletions cookbook/backups/spec_add_optimism_fast_lookup.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 250,
"allowed_block_lag_for_qos_sync": 40,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -157,6 +158,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 250,
"allowed_block_lag_for_qos_sync": 40,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
1 change: 1 addition & 0 deletions cookbook/specs/spec_add_aptos.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"blocks_in_finalization_proof": 5,
"average_block_time": 200,
"allowed_block_lag_for_qos_sync": 50,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 2 additions & 0 deletions cookbook/specs/spec_add_arbitrum.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"blocks_in_finalization_proof": 3,
"average_block_time": 500,
"allowed_block_lag_for_qos_sync": 20,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -59,6 +60,7 @@
"blocks_in_finalization_proof": 3,
"average_block_time": 500,
"allowed_block_lag_for_qos_sync": 20,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
1 change: 1 addition & 0 deletions cookbook/specs/spec_add_avalanche.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"imports": [
"ETH1"
],
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 2 additions & 0 deletions cookbook/specs/spec_add_axelar.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 5000,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -2327,6 +2328,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 5000,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 2 additions & 0 deletions cookbook/specs/spec_add_base.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 2000,
"allowed_block_lag_for_qos_sync": 5,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -59,6 +60,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 2000,
"allowed_block_lag_for_qos_sync": 5,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 2 additions & 0 deletions cookbook/specs/spec_add_bsc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 3000,
"allowed_block_lag_for_qos_sync": 4,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -59,6 +60,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 3000,
"allowed_block_lag_for_qos_sync": 4,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
1 change: 1 addition & 0 deletions cookbook/specs/spec_add_canto.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 6500,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 2 additions & 0 deletions cookbook/specs/spec_add_celo.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"blocks_in_finalization_proof": 3,
"average_block_time": 5000,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -59,6 +60,7 @@
"blocks_in_finalization_proof": 3,
"average_block_time": 5000,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 2 additions & 0 deletions cookbook/specs/spec_add_cosmoshub.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 6500,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -106,6 +107,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 6500,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
1 change: 1 addition & 0 deletions cookbook/specs/spec_add_cosmossdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 6500,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
1 change: 1 addition & 0 deletions cookbook/specs/spec_add_cosmossdk_45.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 6500,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
1 change: 1 addition & 0 deletions cookbook/specs/spec_add_cosmossdk_full.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 6500,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
1 change: 1 addition & 0 deletions cookbook/specs/spec_add_cosmoswasm.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 6500,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 2 additions & 0 deletions cookbook/specs/spec_add_ethereum.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"blocks_in_finalization_proof": 3,
"average_block_time": 13000,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -1347,6 +1348,7 @@
"blocks_in_finalization_proof": 3,
"average_block_time": 13000,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 2 additions & 0 deletions cookbook/specs/spec_add_evmos.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 6500,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -1587,6 +1588,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 6500,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 2 additions & 0 deletions cookbook/specs/spec_add_fantom.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 1500,
"allowed_block_lag_for_qos_sync": 7,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -872,6 +873,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 1500,
"allowed_block_lag_for_qos_sync": 7,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
1 change: 1 addition & 0 deletions cookbook/specs/spec_add_fvm.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"blocks_in_finalization_proof": 3,
"average_block_time": 70000,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
1 change: 1 addition & 0 deletions cookbook/specs/spec_add_ibc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 6500,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 2 additions & 0 deletions cookbook/specs/spec_add_juno.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 6500,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -160,6 +161,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 6500,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
1 change: 1 addition & 0 deletions cookbook/specs/spec_add_lava.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 30000,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
1 change: 1 addition & 0 deletions cookbook/specs/spec_add_mantle.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"blocks_in_finalization_proof": 3,
"average_block_time": 5000,
"allowed_block_lag_for_qos_sync": 2,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
1 change: 1 addition & 0 deletions cookbook/specs/spec_add_moralis.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"blocks_in_finalization_proof": 1,
"average_block_time": 1000,
"allowed_block_lag_for_qos_sync": 1,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
2 changes: 2 additions & 0 deletions cookbook/specs/spec_add_near.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"blocks_in_finalization_proof": 3,
"average_block_time": 1200,
"allowed_block_lag_for_qos_sync": 8,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down Expand Up @@ -400,6 +401,7 @@
"blocks_in_finalization_proof": 3,
"average_block_time": 1200,
"allowed_block_lag_for_qos_sync": 8,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
Loading

0 comments on commit 6db1ca2

Please sign in to comment.