Skip to content

Commit

Permalink
Merge branch 'main' into CNS-870-iprpc-pool-implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Yarom Swisa authored and Yarom Swisa committed Feb 28, 2024
2 parents e67137f + 70971bd commit c8d22db
Show file tree
Hide file tree
Showing 179 changed files with 7,724 additions and 2,981 deletions.
9 changes: 9 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"path/filepath"

"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/grpc/node"
"github.com/cosmos/cosmos-sdk/runtime"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
Expand All @@ -14,6 +15,7 @@ import (
v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
"github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types"
"github.com/lavanet/lava/utils"
"github.com/lavanet/lava/x/fixationstore"
fixationkeeper "github.com/lavanet/lava/x/fixationstore/keeper"
fixationtypes "github.com/lavanet/lava/x/fixationstore/types"
Expand Down Expand Up @@ -135,6 +137,7 @@ import (
projectsmodulekeeper "github.com/lavanet/lava/x/projects/keeper"
projectsmoduletypes "github.com/lavanet/lava/x/projects/types"
protocolmodule "github.com/lavanet/lava/x/protocol"
protocolmoduleclient "github.com/lavanet/lava/x/protocol/client/cli"
protocolmodulekeeper "github.com/lavanet/lava/x/protocol/keeper"
protocolmoduletypes "github.com/lavanet/lava/x/protocol/types"
rewardsmodule "github.com/lavanet/lava/x/rewards"
Expand Down Expand Up @@ -181,6 +184,7 @@ var Upgrades = []upgrades.Upgrade{
upgrades.Upgrade_0_32_3,
upgrades.Upgrade_0_33_0,
upgrades.Upgrade_0_34_0,
upgrades.Upgrade_0_35_0,
}

// this line is used by starport scaffolding # stargate/wasm/app/enabledProposals
Expand All @@ -200,6 +204,7 @@ func getGovProposalHandlers() []govclient.ProposalHandler {
plansmoduleclient.PlansDelProposalHandler,
pairingmoduleclient.PairingUnstakeProposal,
rewardsmoduleclient.SetIprpcDataProposalHandler,
protocolmoduleclient.SetProtocolVersionProposalHandler,
// this line is used by starport scaffolding # stargate/app/govProposalHandler
)

Expand Down Expand Up @@ -332,6 +337,9 @@ func New(
cdc := encodingConfig.Amino
interfaceRegistry := encodingConfig.InterfaceRegistry

level := appOpts.Get(flags.FlagLogLevel)
utils.SetGlobalLoggingLevel(cast.ToString(level))

bApp := baseapp.NewBaseApp(Name, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...)
bApp.SetCommitMultiStoreTracer(traceStore)
bApp.SetVersion(version.Version)
Expand Down Expand Up @@ -658,6 +666,7 @@ func New(
keys[protocolmoduletypes.StoreKey],
keys[protocolmoduletypes.MemStoreKey],
app.GetSubspace(protocolmoduletypes.ModuleName),
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
protocolModule := protocolmodule.NewAppModule(appCodec, app.ProtocolKeeper)

Expand Down
2 changes: 2 additions & 0 deletions app/upgrades/upgrade_0_35_0.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/cosmos/gogoproto/proto"
ibctypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
"github.com/lavanet/lava/app/keepers"
protocoltypes "github.com/lavanet/lava/x/protocol/types"
spectypes "github.com/lavanet/lava/x/spec/types"
)

Expand All @@ -22,6 +23,7 @@ func v_35_0(

params := lk.SpecKeeper.GetParams(ctx)
params.AllowlistedExpeditedMsgs = []string{
proto.MessageName(&protocoltypes.MsgSetVersion{}),
proto.MessageName(&spectypes.SpecAddProposal{}),
proto.MessageName(&ibctypes.ClientUpdateProposal{}),
proto.MessageName(&ibctypes.UpgradeProposal{}),
Expand Down
5 changes: 5 additions & 0 deletions common/types/ascii.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type charRestrictionEnum string
const (
NAME_RESTRICTIONS charRestrictionEnum = "name"
DESCRIPTION_RESTRICTIONS charRestrictionEnum = "description"
INDEX_RESTRICTIONS charRestrictionEnum = "index"
)

func isCharDisallowed(c rune, disallowedChars []rune) bool {
Expand Down Expand Up @@ -59,6 +60,10 @@ func ValidateString(s string, restrictType charRestrictionEnum, disallowedChars
if !unicode.IsLetter(r) && r != ' ' && r != '_' && !unicode.IsDigit(r) {
return false
}
case INDEX_RESTRICTIONS:
if !unicode.IsLetter(r) && !unicode.IsDigit(r) {
return false
}
}
}
}
Expand Down
8 changes: 5 additions & 3 deletions config/consumer_examples/full_consumer_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ endpoints:
- chain-id: AGR
api-interface: grpc
network-address: 127.0.0.1:3387
- chain-id: KOIIT
api-interface: jsonrpc
network-address: 127.0.0.1:3388
- chain-id: AGR
api-interface: tendermintrpc
network-address: 127.0.0.1:3388
Expand All @@ -149,4 +146,9 @@ endpoints:
- chain-id: AGRT
api-interface: tendermintrpc
network-address: 127.0.0.1:3391
- chain-id: KOIIT
api-interface: jsonrpc
network-address: 127.0.0.1:3392
metrics-listen-address: ":7779"
# referer-be-address: "http://127.0.0.1:6500"
# reports-be-address: "http://127.0.0.1:6501"
2 changes: 0 additions & 2 deletions config/health_examples/health_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ consumer_endpoints:
- chain-id: ETH1
api-interface: jsonrpc
network-address: http://127.0.0.1:3333
addons:
- debug
- chain-id: LAV1
api-interface: rest
network-address: http://127.0.0.1:3360
Expand Down
18 changes: 18 additions & 0 deletions cookbook/specs/spec_add_agoric.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,15 @@
"expected_value": "agoric-3"
}
]
},
{
"name": "pruning",
"values": [
{
"latest_distance": 14400,
"severity": "Warning"
}
]
}
],
"extensions": [
Expand Down Expand Up @@ -329,6 +338,15 @@
"expected_value": "agoric-3"
}
]
},
{
"name": "pruning",
"values": [
{
"latest_distance": 14400,
"severity": "Warning"
}
]
}
],
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion cookbook/specs/spec_add_avalanche.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"imports": [
"ETH1"
],
"shares" : 1,
"shares" : 1,
"min_stake_provider": {
"denom": "ulava",
"amount": "50000000000"
Expand Down
Loading

0 comments on commit c8d22db

Please sign in to comment.