Skip to content

Commit

Permalink
Merge branch 'main' into update-axelar-spec
Browse files Browse the repository at this point in the history
  • Loading branch information
omerlavanet committed Sep 8, 2024
2 parents 8478b7a + 3571a14 commit af7edb2
Show file tree
Hide file tree
Showing 976 changed files with 5,447 additions and 4,744 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Protobuf
# Protobuf runs buf (https://buf.build/) lint and check-breakage
# This workflow is only run when a .proto file has been changed
on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read

jobs:
# lint:
# runs-on: ubuntu-latest
# timeout-minutes: 5
# steps:
# - uses: actions/checkout@v4
# - uses: bufbuild/[email protected]
# - uses: bufbuild/buf-lint-action@v1
# with:
# input: "proto"

break-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/[email protected]
- uses: bufbuild/buf-breaking-action@v1
with:
input: "proto"
against: "https://github.com/${{ github.repository }}.git#branch=${{ github.event.pull_request.base.ref }},ref=HEAD~1,subdir=proto"

validate-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.20.5

- name: export PATH
run: export PATH=$PATH:/go:/go/bin:$(go env GOPATH)/bin:/usr/local:`pwd`:/home/runner/work/lava/lava/
- name: export GOPATH
run: export GOPATH=$GOPATH:$(go env GOPATH):/go:/go/lava:/usr/local:`pwd`

- name: install grpc gateway
run: |
git clone https://github.com/grpc-ecosystem/grpc-gateway -b v1.16.0
cd grpc-gateway
go mod download
go install \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger \
github.com/golang/protobuf/protoc-gen-go
cd ..
rm -rf grpc-gateway
- name: install buf
run: |
BIN="/usr/local/bin" && \
VERSION="1.25.0" && \
curl -sSL \
"https://github.com/bufbuild/buf/releases/download/v${VERSION}/buf-$(uname -s)-$(uname -m)" \
-o "${BIN}/buf" && \
chmod +x "${BIN}/buf"
- name: install proto cosmos
run: |
git clone https://github.com/cosmos/gogoproto.git -b v1.4.9
cd gogoproto
go mod download
make install
cd ..
rm -rf gogoproto
- name: generate proto
run: |
./scripts/protocgen.sh
- name: Check for differences
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "Error: The generated .pb.go files are not up to date."
git diff
exit 1
fi
shell: bash



8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ ifeq (static,$(findstring static,$(LAVA_BUILD_OPTIONS)))
endif

ifeq (mask_consumer_logs,$(findstring mask_consumer_logs,$(LAVA_BUILD_OPTIONS)))
ldflags += -X github.com/lavanet/lava/v2/protocol/common.ReturnMaskedErrors=true
ldflags += -X github.com/lavanet/lava/v3/protocol/common.ReturnMaskedErrors=true
endif
ifeq (debug_mutex,$(findstring debug_mutex,$(LAVA_BUILD_OPTIONS)))
ldflags += -X github.com/lavanet/lava/v2/utils.TimeoutMutex=true
ldflags += -X github.com/lavanet/lava/v3/utils.TimeoutMutex=true
endif

ifeq (cleveldb,$(findstring cleveldb,$(LAVA_BUILD_OPTIONS)))
Expand All @@ -207,12 +207,12 @@ endif

ifeq (release,$(findstring release,$(LAVA_BUILD_OPTIONS)))
$(info Building With Production Flag)
ldflags += -X github.com/lavanet/lava/v2/utils.ExtendedLogLevel=production
ldflags += -X github.com/lavanet/lava/v3/utils.ExtendedLogLevel=production
endif

ifeq (debug_payment_e2e,$(findstring debug_payment_e2e,$(LAVA_BUILD_OPTIONS)))
$(info Building With Debug Payment E2E Flag. Making a month 2 minutes)
ldflags += -X github.com/lavanet/lava/v2/utils.DebugPaymentE2E=debug_payment_e2e
ldflags += -X github.com/lavanet/lava/v3/utils.DebugPaymentE2E=debug_payment_e2e
endif

ifeq (,$(findstring nostrip,$(LAVA_BUILD_OPTIONS)))
Expand Down
8 changes: 4 additions & 4 deletions app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth/ante"
"github.com/cosmos/cosmos-sdk/x/auth/signing"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
dualstakingante "github.com/lavanet/lava/v2/x/dualstaking/ante"
dualstakingkeeper "github.com/lavanet/lava/v2/x/dualstaking/keeper"
specante "github.com/lavanet/lava/v2/x/spec/ante"
"github.com/lavanet/lava/v2/x/spec/keeper"
dualstakingante "github.com/lavanet/lava/v3/x/dualstaking/ante"
dualstakingkeeper "github.com/lavanet/lava/v3/x/dualstaking/keeper"
specante "github.com/lavanet/lava/v3/x/spec/ante"
"github.com/lavanet/lava/v3/x/spec/keeper"
)

func NewAnteHandler(accountKeeper ante.AccountKeeper, bankKeeper authtypes.BankKeeper, dualstakingKeeper dualstakingkeeper.Keeper, signModeHandler signing.SignModeHandler, feegrantKeeper ante.FeegrantKeeper, specKeeper keeper.Keeper, sigGasConsumer ante.SignatureVerificationGasConsumer) sdk.AnteHandler {
Expand Down
99 changes: 50 additions & 49 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ 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/v2/utils"
"github.com/lavanet/lava/v2/x/fixationstore"
fixationkeeper "github.com/lavanet/lava/v2/x/fixationstore/keeper"
fixationtypes "github.com/lavanet/lava/v2/x/fixationstore/types"
"github.com/lavanet/lava/v2/x/timerstore"
timerstorekeeper "github.com/lavanet/lava/v2/x/timerstore/keeper"
timerstoretypes "github.com/lavanet/lava/v2/x/timerstore/types"
"github.com/lavanet/lava/v3/utils"
"github.com/lavanet/lava/v3/x/fixationstore"
fixationkeeper "github.com/lavanet/lava/v3/x/fixationstore/keeper"
fixationtypes "github.com/lavanet/lava/v3/x/fixationstore/types"
"github.com/lavanet/lava/v3/x/timerstore"
timerstorekeeper "github.com/lavanet/lava/v3/x/timerstore/keeper"
timerstoretypes "github.com/lavanet/lava/v3/x/timerstore/types"

"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward"
packetforwardkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper"
Expand Down Expand Up @@ -113,48 +113,48 @@ import (
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint"
"github.com/lavanet/lava/v2/app/keepers"
appparams "github.com/lavanet/lava/v2/app/params"
"github.com/lavanet/lava/v2/app/upgrades"
"github.com/lavanet/lava/v2/docs"
conflictmodule "github.com/lavanet/lava/v2/x/conflict"
conflictmodulekeeper "github.com/lavanet/lava/v2/x/conflict/keeper"
conflictmoduletypes "github.com/lavanet/lava/v2/x/conflict/types"
downtimemodule "github.com/lavanet/lava/v2/x/downtime"
downtimemodulekeeper "github.com/lavanet/lava/v2/x/downtime/keeper"
downtimemoduletypes "github.com/lavanet/lava/v2/x/downtime/types"
dualstakingmodule "github.com/lavanet/lava/v2/x/dualstaking"
dualstakingmodulekeeper "github.com/lavanet/lava/v2/x/dualstaking/keeper"
dualstakingmoduletypes "github.com/lavanet/lava/v2/x/dualstaking/types"
epochstoragemodule "github.com/lavanet/lava/v2/x/epochstorage"
epochstoragemodulekeeper "github.com/lavanet/lava/v2/x/epochstorage/keeper"
epochstoragemoduletypes "github.com/lavanet/lava/v2/x/epochstorage/types"
pairingmodule "github.com/lavanet/lava/v2/x/pairing"
pairingmoduleclient "github.com/lavanet/lava/v2/x/pairing/client"
pairingmodulekeeper "github.com/lavanet/lava/v2/x/pairing/keeper"
pairingmoduletypes "github.com/lavanet/lava/v2/x/pairing/types"
plansmodule "github.com/lavanet/lava/v2/x/plans"
plansmoduleclient "github.com/lavanet/lava/v2/x/plans/client"
plansmodulekeeper "github.com/lavanet/lava/v2/x/plans/keeper"
plansmoduletypes "github.com/lavanet/lava/v2/x/plans/types"
projectsmodule "github.com/lavanet/lava/v2/x/projects"
projectsmodulekeeper "github.com/lavanet/lava/v2/x/projects/keeper"
projectsmoduletypes "github.com/lavanet/lava/v2/x/projects/types"
protocolmodule "github.com/lavanet/lava/v2/x/protocol"
protocolmoduleclient "github.com/lavanet/lava/v2/x/protocol/client/cli"
protocolmodulekeeper "github.com/lavanet/lava/v2/x/protocol/keeper"
protocolmoduletypes "github.com/lavanet/lava/v2/x/protocol/types"
rewardsmodule "github.com/lavanet/lava/v2/x/rewards"
rewardsmoduleclient "github.com/lavanet/lava/v2/x/rewards/client/cli"
rewardsmodulekeeper "github.com/lavanet/lava/v2/x/rewards/keeper"
rewardsmoduletypes "github.com/lavanet/lava/v2/x/rewards/types"
specmodule "github.com/lavanet/lava/v2/x/spec"
specmoduleclient "github.com/lavanet/lava/v2/x/spec/client"
specmodulekeeper "github.com/lavanet/lava/v2/x/spec/keeper"
specmoduletypes "github.com/lavanet/lava/v2/x/spec/types"
subscriptionmodule "github.com/lavanet/lava/v2/x/subscription"
subscriptionmodulekeeper "github.com/lavanet/lava/v2/x/subscription/keeper"
subscriptionmoduletypes "github.com/lavanet/lava/v2/x/subscription/types"
"github.com/lavanet/lava/v3/app/keepers"
appparams "github.com/lavanet/lava/v3/app/params"
"github.com/lavanet/lava/v3/app/upgrades"
"github.com/lavanet/lava/v3/docs"
conflictmodule "github.com/lavanet/lava/v3/x/conflict"
conflictmodulekeeper "github.com/lavanet/lava/v3/x/conflict/keeper"
conflictmoduletypes "github.com/lavanet/lava/v3/x/conflict/types"
downtimemodule "github.com/lavanet/lava/v3/x/downtime"
downtimemodulekeeper "github.com/lavanet/lava/v3/x/downtime/keeper"
downtimemoduletypes "github.com/lavanet/lava/v3/x/downtime/types"
dualstakingmodule "github.com/lavanet/lava/v3/x/dualstaking"
dualstakingmodulekeeper "github.com/lavanet/lava/v3/x/dualstaking/keeper"
dualstakingmoduletypes "github.com/lavanet/lava/v3/x/dualstaking/types"
epochstoragemodule "github.com/lavanet/lava/v3/x/epochstorage"
epochstoragemodulekeeper "github.com/lavanet/lava/v3/x/epochstorage/keeper"
epochstoragemoduletypes "github.com/lavanet/lava/v3/x/epochstorage/types"
pairingmodule "github.com/lavanet/lava/v3/x/pairing"
pairingmoduleclient "github.com/lavanet/lava/v3/x/pairing/client"
pairingmodulekeeper "github.com/lavanet/lava/v3/x/pairing/keeper"
pairingmoduletypes "github.com/lavanet/lava/v3/x/pairing/types"
plansmodule "github.com/lavanet/lava/v3/x/plans"
plansmoduleclient "github.com/lavanet/lava/v3/x/plans/client"
plansmodulekeeper "github.com/lavanet/lava/v3/x/plans/keeper"
plansmoduletypes "github.com/lavanet/lava/v3/x/plans/types"
projectsmodule "github.com/lavanet/lava/v3/x/projects"
projectsmodulekeeper "github.com/lavanet/lava/v3/x/projects/keeper"
projectsmoduletypes "github.com/lavanet/lava/v3/x/projects/types"
protocolmodule "github.com/lavanet/lava/v3/x/protocol"
protocolmoduleclient "github.com/lavanet/lava/v3/x/protocol/client/cli"
protocolmodulekeeper "github.com/lavanet/lava/v3/x/protocol/keeper"
protocolmoduletypes "github.com/lavanet/lava/v3/x/protocol/types"
rewardsmodule "github.com/lavanet/lava/v3/x/rewards"
rewardsmoduleclient "github.com/lavanet/lava/v3/x/rewards/client/cli"
rewardsmodulekeeper "github.com/lavanet/lava/v3/x/rewards/keeper"
rewardsmoduletypes "github.com/lavanet/lava/v3/x/rewards/types"
specmodule "github.com/lavanet/lava/v3/x/spec"
specmoduleclient "github.com/lavanet/lava/v3/x/spec/client"
specmodulekeeper "github.com/lavanet/lava/v3/x/spec/keeper"
specmoduletypes "github.com/lavanet/lava/v3/x/spec/types"
subscriptionmodule "github.com/lavanet/lava/v3/x/subscription"
subscriptionmodulekeeper "github.com/lavanet/lava/v3/x/subscription/keeper"
subscriptionmoduletypes "github.com/lavanet/lava/v3/x/subscription/types"
"github.com/spf13/cast"
// this line is used by starport scaffolding # stargate/app/moduleImport
)
Expand Down Expand Up @@ -202,6 +202,7 @@ var Upgrades = []upgrades.Upgrade{
upgrades.Upgrade_2_5_0,
upgrades.Upgrade_3_0_0,
upgrades.Upgrade_3_0_1,
upgrades.Upgrade_3_1_0,
}

// this line is used by starport scaffolding # stargate/wasm/app/enabledProposals
Expand Down
2 changes: 1 addition & 1 deletion app/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/cosmos/cosmos-sdk/std"
"github.com/cosmos/cosmos-sdk/x/auth/tx"

"github.com/lavanet/lava/v2/app/params"
"github.com/lavanet/lava/v3/app/params"
)

// makeEncodingConfig creates an EncodingConfig for an amino based test configuration.
Expand Down
26 changes: 13 additions & 13 deletions app/keepers/lavaKeepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ import (
icahostkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/keeper"
ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
conflictmodulekeeper "github.com/lavanet/lava/v2/x/conflict/keeper"
downtimemodulekeeper "github.com/lavanet/lava/v2/x/downtime/keeper"
dualstakingmodulekeeper "github.com/lavanet/lava/v2/x/dualstaking/keeper"
epochstoragemodulekeeper "github.com/lavanet/lava/v2/x/epochstorage/keeper"
fixationkeeper "github.com/lavanet/lava/v2/x/fixationstore/keeper"
pairingmodulekeeper "github.com/lavanet/lava/v2/x/pairing/keeper"
plansmodulekeeper "github.com/lavanet/lava/v2/x/plans/keeper"
projectsmodulekeeper "github.com/lavanet/lava/v2/x/projects/keeper"
protocolmodulekeeper "github.com/lavanet/lava/v2/x/protocol/keeper"
rewardsmodulekeeper "github.com/lavanet/lava/v2/x/rewards/keeper"
specmodulekeeper "github.com/lavanet/lava/v2/x/spec/keeper"
subscriptionmodulekeeper "github.com/lavanet/lava/v2/x/subscription/keeper"
timerstorekeeper "github.com/lavanet/lava/v2/x/timerstore/keeper"
conflictmodulekeeper "github.com/lavanet/lava/v3/x/conflict/keeper"
downtimemodulekeeper "github.com/lavanet/lava/v3/x/downtime/keeper"
dualstakingmodulekeeper "github.com/lavanet/lava/v3/x/dualstaking/keeper"
epochstoragemodulekeeper "github.com/lavanet/lava/v3/x/epochstorage/keeper"
fixationkeeper "github.com/lavanet/lava/v3/x/fixationstore/keeper"
pairingmodulekeeper "github.com/lavanet/lava/v3/x/pairing/keeper"
plansmodulekeeper "github.com/lavanet/lava/v3/x/plans/keeper"
projectsmodulekeeper "github.com/lavanet/lava/v3/x/projects/keeper"
protocolmodulekeeper "github.com/lavanet/lava/v3/x/protocol/keeper"
rewardsmodulekeeper "github.com/lavanet/lava/v3/x/rewards/keeper"
specmodulekeeper "github.com/lavanet/lava/v3/x/spec/keeper"
subscriptionmodulekeeper "github.com/lavanet/lava/v3/x/subscription/keeper"
timerstorekeeper "github.com/lavanet/lava/v3/x/timerstore/keeper"
// this line is used by starport scaffolding # stargate/app/moduleImport
)

Expand Down
2 changes: 1 addition & 1 deletion app/simulation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/simulation"
"github.com/cosmos/cosmos-sdk/x/simulation/client/cli"
"github.com/cosmos/ibc-go/v7/testing/simapp"
"github.com/lavanet/lava/v2/app"
"github.com/lavanet/lava/v3/app"
"github.com/stretchr/testify/require"
)

Expand Down
18 changes: 12 additions & 6 deletions app/upgrades/empty_upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"
icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types"
icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types"
"github.com/lavanet/lava/v2/app/keepers"
v1 "github.com/lavanet/lava/v2/x/downtime/v1"
dualstakingtypes "github.com/lavanet/lava/v2/x/dualstaking/types"
fixationtypes "github.com/lavanet/lava/v2/x/fixationstore/types"
protocoltypes "github.com/lavanet/lava/v2/x/protocol/types"
rewardstypes "github.com/lavanet/lava/v2/x/rewards/types"
"github.com/lavanet/lava/v3/app/keepers"
v1 "github.com/lavanet/lava/v3/x/downtime/v1"
dualstakingtypes "github.com/lavanet/lava/v3/x/dualstaking/types"
fixationtypes "github.com/lavanet/lava/v3/x/fixationstore/types"
protocoltypes "github.com/lavanet/lava/v3/x/protocol/types"
rewardstypes "github.com/lavanet/lava/v3/x/rewards/types"
)

func defaultUpgradeHandler(
Expand Down Expand Up @@ -294,3 +294,9 @@ var Upgrade_3_0_1 = Upgrade{
CreateUpgradeHandler: defaultUpgradeHandler,
StoreUpgrades: store.StoreUpgrades{},
}

var Upgrade_3_1_0 = Upgrade{
UpgradeName: "v3.1.0",
CreateUpgradeHandler: defaultUpgradeHandler,
StoreUpgrades: store.StoreUpgrades{},
}
2 changes: 1 addition & 1 deletion app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/lavanet/lava/v2/app/keepers"
"github.com/lavanet/lava/v3/app/keepers"
)

type BaseAppParamManager interface {
Expand Down
6 changes: 3 additions & 3 deletions app/upgrades/upgrade_0_32_0.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/x/bank/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/lavanet/lava/v2/app/keepers"
dualstakingtypes "github.com/lavanet/lava/v2/x/dualstaking/types"
rewardstypes "github.com/lavanet/lava/v2/x/rewards/types"
"github.com/lavanet/lava/v3/app/keepers"
dualstakingtypes "github.com/lavanet/lava/v3/x/dualstaking/types"
rewardstypes "github.com/lavanet/lava/v3/x/rewards/types"
)

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

func v_35_0(
Expand Down
2 changes: 1 addition & 1 deletion cmd/common/warning_log_command_wrapper.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package common

import (
"github.com/lavanet/lava/v2/utils"
"github.com/lavanet/lava/v3/utils"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/lavad/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/lavanet/lava/v2/app"
"github.com/lavanet/lava/v3/app"
)

func InitSDKConfig() {
Expand Down
Loading

0 comments on commit af7edb2

Please sign in to comment.