Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

fix: use lbm-sdk #27

Merged
merged 2 commits into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ builds:
- -mod=readonly
- -tags=netgo ledger
ldflags:
- -X github.com/line/lfb-sdk/version.Name=lfb
- -X github.com/line/lfb-sdk/version.ServerName=lfb
- -X github.com/line/lfb-sdk/version.Version={{ .Version }}
- -X github.com/line/lfb-sdk/version.Commit={{ .FullCommit }}
- -X "github.com/line/lfb-sdk/version.BuildTags=netgo,ledger"
- -X github.com/line/lbm-sdk/version.Name=lfb
- -X github.com/line/lbm-sdk/version.ServerName=lfb
- -X github.com/line/lbm-sdk/version.Version={{ .Version }}
- -X github.com/line/lbm-sdk/version.Commit={{ .FullCommit }}
- -X "github.com/line/lbm-sdk/version.BuildTags=netgo,ledger"
archives:
-
builds: ['lfb']
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Breaking Changes
* (sdk) (auth) [\#16](https://github.com/line/lfb/pull/16) Introduce sig block height for the new replay protection
* (ostracon/sdk) [\#26](https://github.com/line/lfb/pull/26) Use vrf-based consensus, address string treatment
* (global) [\#27](https://github.com/line/lfb/pull/27) Use lbm-sdk instead of lfb-sdk

## [gaia v4.0.4] - 2021-03-15
Initial lfb is based on the tendermint v0.34.9+, cosmos-sdk v0.42.0+, gaia v4.0.4
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif

PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation')
LEDGER_ENABLED ?= false
SDK_PACK := $(shell go list -m github.com/line/lfb-sdk | sed 's/ /\@/g')
SDK_PACK := $(shell go list -m github.com/line/lbm-sdk | sed 's/ /\@/g')
OST_VERSION := $(shell go list -m github.com/line/ostracon | sed 's:.* ::') # grab everything after the space in "github.com/line/ostracon v0.34.7"
DOCKER := $(shell which docker)
BUILDDIR ?= $(CURDIR)/build
Expand Down Expand Up @@ -93,12 +93,12 @@ build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags))

# process linker flags

ldflags = -X github.com/line/lfb-sdk/version.Name=lfb \
-X github.com/line/lfb-sdk/version.AppName=lfb \
-X github.com/line/lfb-sdk/version.Version=$(VERSION) \
-X github.com/line/lfb-sdk/version.Commit=$(COMMIT) \
-X github.com/line/lfb-sdk/types.DBBackend=$(DB_BACKEND) \
-X "github.com/line/lfb-sdk/version.BuildTags=$(build_tags_comma_sep)" \
ldflags = -X github.com/line/lbm-sdk/version.Name=lfb \
-X github.com/line/lbm-sdk/version.AppName=lfb \
-X github.com/line/lbm-sdk/version.Version=$(VERSION) \
-X github.com/line/lbm-sdk/version.Commit=$(COMMIT) \
-X github.com/line/lbm-sdk/types.DBBackend=$(DB_BACKEND) \
-X "github.com/line/lbm-sdk/version.BuildTags=$(build_tags_comma_sep)" \
-X github.com/line/ostracon/version.TMCoreSemVer=$(OST_VERSION)

ifeq (,$(findstring nostrip,$(LFB_BUILD_OPTIONS)))
Expand Down Expand Up @@ -281,7 +281,7 @@ lint:
format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gofmt -w -s
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs misspell -w
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs goimports -w -local github.com/line/lfb-sdk
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs goimports -w -local github.com/line/lbm-sdk

###############################################################################
### Localnet ###
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![codecov](https://codecov.io/gh/line/lfb/branch/main/graph/badge.svg?token=JFFuUevpzJ)](https://codecov.io/gh/line/lfb)

This repository hosts `LFB(LINE Financial Blockchain)`. This repository is forked from [gaia](https://github.com/cosmos/gaia) at 2021-03-15. LFB is a mainnet app implementation using [lfb-sdk](https://github.com/line/lfb-sdk) and [ostracon](https://github.com/line/ostracon).
This repository hosts `LFB(LINE Financial Blockchain)`. This repository is forked from [gaia](https://github.com/cosmos/gaia) at 2021-03-15. LFB is a mainnet app implementation using [lbm-sdk](https://github.com/line/lbm-sdk) and [ostracon](https://github.com/line/ostracon).

**Node**: Requires [Go 1.15+](https://golang.org/dl/)

Expand Down
142 changes: 71 additions & 71 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,81 +17,81 @@ import (
ostproto "github.com/line/ostracon/proto/ostracon/types"
dbm "github.com/line/tm-db/v2"

"github.com/line/lfb-sdk/baseapp"
"github.com/line/lfb-sdk/client"
"github.com/line/lfb-sdk/client/grpc/tmservice"
"github.com/line/lfb-sdk/client/rpc"
"github.com/line/lfb-sdk/codec"
"github.com/line/lfb-sdk/codec/types"
"github.com/line/lfb-sdk/server/api"
"github.com/line/lfb-sdk/server/config"
servertypes "github.com/line/lfb-sdk/server/types"
"github.com/line/lfb-sdk/simapp"
sdk "github.com/line/lfb-sdk/types"
"github.com/line/lfb-sdk/types/module"
"github.com/line/lfb-sdk/version"
"github.com/line/lfb-sdk/x/auth"
"github.com/line/lfb-sdk/x/auth/ante"
authrest "github.com/line/lfb-sdk/x/auth/client/rest"
authkeeper "github.com/line/lfb-sdk/x/auth/keeper"
authsims "github.com/line/lfb-sdk/x/auth/simulation"
authtx "github.com/line/lfb-sdk/x/auth/tx"
authtypes "github.com/line/lfb-sdk/x/auth/types"
"github.com/line/lfb-sdk/x/auth/vesting"
"github.com/line/lfb-sdk/x/bank"
bankkeeper "github.com/line/lfb-sdk/x/bank/keeper"
banktypes "github.com/line/lfb-sdk/x/bank/types"
"github.com/line/lfb-sdk/x/capability"
capabilitykeeper "github.com/line/lfb-sdk/x/capability/keeper"
capabilitytypes "github.com/line/lfb-sdk/x/capability/types"
"github.com/line/lfb-sdk/x/crisis"
crisiskeeper "github.com/line/lfb-sdk/x/crisis/keeper"
crisistypes "github.com/line/lfb-sdk/x/crisis/types"
distr "github.com/line/lfb-sdk/x/distribution"
distrclient "github.com/line/lfb-sdk/x/distribution/client"
distrkeeper "github.com/line/lfb-sdk/x/distribution/keeper"
distrtypes "github.com/line/lfb-sdk/x/distribution/types"
"github.com/line/lfb-sdk/x/evidence"
evidencekeeper "github.com/line/lfb-sdk/x/evidence/keeper"
evidencetypes "github.com/line/lfb-sdk/x/evidence/types"
"github.com/line/lfb-sdk/x/genutil"
genutiltypes "github.com/line/lfb-sdk/x/genutil/types"
"github.com/line/lfb-sdk/x/gov"
govkeeper "github.com/line/lfb-sdk/x/gov/keeper"
govtypes "github.com/line/lfb-sdk/x/gov/types"
transfer "github.com/line/lfb-sdk/x/ibc/applications/transfer"
ibctransferkeeper "github.com/line/lfb-sdk/x/ibc/applications/transfer/keeper"
ibctransfertypes "github.com/line/lfb-sdk/x/ibc/applications/transfer/types"
ibc "github.com/line/lfb-sdk/x/ibc/core"
ibcclient "github.com/line/lfb-sdk/x/ibc/core/02-client"
porttypes "github.com/line/lfb-sdk/x/ibc/core/05-port/types"
ibchost "github.com/line/lfb-sdk/x/ibc/core/24-host"
ibckeeper "github.com/line/lfb-sdk/x/ibc/core/keeper"
"github.com/line/lfb-sdk/x/mint"
mintkeeper "github.com/line/lfb-sdk/x/mint/keeper"
minttypes "github.com/line/lfb-sdk/x/mint/types"
"github.com/line/lfb-sdk/x/params"
paramsclient "github.com/line/lfb-sdk/x/params/client"
paramskeeper "github.com/line/lfb-sdk/x/params/keeper"
paramstypes "github.com/line/lfb-sdk/x/params/types"
paramproposal "github.com/line/lfb-sdk/x/params/types/proposal"
"github.com/line/lfb-sdk/x/slashing"
slashingkeeper "github.com/line/lfb-sdk/x/slashing/keeper"
slashingtypes "github.com/line/lfb-sdk/x/slashing/types"
"github.com/line/lfb-sdk/x/staking"
stakingkeeper "github.com/line/lfb-sdk/x/staking/keeper"
stakingtypes "github.com/line/lfb-sdk/x/staking/types"
"github.com/line/lfb-sdk/x/upgrade"
upgradeclient "github.com/line/lfb-sdk/x/upgrade/client"
upgradekeeper "github.com/line/lfb-sdk/x/upgrade/keeper"
upgradetypes "github.com/line/lfb-sdk/x/upgrade/types"
"github.com/line/lfb-sdk/x/wasm"
wasmclient "github.com/line/lfb-sdk/x/wasm/client"
"github.com/line/lbm-sdk/baseapp"
"github.com/line/lbm-sdk/client"
"github.com/line/lbm-sdk/client/grpc/tmservice"
"github.com/line/lbm-sdk/client/rpc"
"github.com/line/lbm-sdk/codec"
"github.com/line/lbm-sdk/codec/types"
"github.com/line/lbm-sdk/server/api"
"github.com/line/lbm-sdk/server/config"
servertypes "github.com/line/lbm-sdk/server/types"
"github.com/line/lbm-sdk/simapp"
sdk "github.com/line/lbm-sdk/types"
"github.com/line/lbm-sdk/types/module"
"github.com/line/lbm-sdk/version"
"github.com/line/lbm-sdk/x/auth"
"github.com/line/lbm-sdk/x/auth/ante"
authrest "github.com/line/lbm-sdk/x/auth/client/rest"
authkeeper "github.com/line/lbm-sdk/x/auth/keeper"
authsims "github.com/line/lbm-sdk/x/auth/simulation"
authtx "github.com/line/lbm-sdk/x/auth/tx"
authtypes "github.com/line/lbm-sdk/x/auth/types"
"github.com/line/lbm-sdk/x/auth/vesting"
"github.com/line/lbm-sdk/x/bank"
bankkeeper "github.com/line/lbm-sdk/x/bank/keeper"
banktypes "github.com/line/lbm-sdk/x/bank/types"
"github.com/line/lbm-sdk/x/capability"
capabilitykeeper "github.com/line/lbm-sdk/x/capability/keeper"
capabilitytypes "github.com/line/lbm-sdk/x/capability/types"
"github.com/line/lbm-sdk/x/crisis"
crisiskeeper "github.com/line/lbm-sdk/x/crisis/keeper"
crisistypes "github.com/line/lbm-sdk/x/crisis/types"
distr "github.com/line/lbm-sdk/x/distribution"
distrclient "github.com/line/lbm-sdk/x/distribution/client"
distrkeeper "github.com/line/lbm-sdk/x/distribution/keeper"
distrtypes "github.com/line/lbm-sdk/x/distribution/types"
"github.com/line/lbm-sdk/x/evidence"
evidencekeeper "github.com/line/lbm-sdk/x/evidence/keeper"
evidencetypes "github.com/line/lbm-sdk/x/evidence/types"
"github.com/line/lbm-sdk/x/genutil"
genutiltypes "github.com/line/lbm-sdk/x/genutil/types"
"github.com/line/lbm-sdk/x/gov"
govkeeper "github.com/line/lbm-sdk/x/gov/keeper"
govtypes "github.com/line/lbm-sdk/x/gov/types"
transfer "github.com/line/lbm-sdk/x/ibc/applications/transfer"
ibctransferkeeper "github.com/line/lbm-sdk/x/ibc/applications/transfer/keeper"
ibctransfertypes "github.com/line/lbm-sdk/x/ibc/applications/transfer/types"
ibc "github.com/line/lbm-sdk/x/ibc/core"
ibcclient "github.com/line/lbm-sdk/x/ibc/core/02-client"
porttypes "github.com/line/lbm-sdk/x/ibc/core/05-port/types"
ibchost "github.com/line/lbm-sdk/x/ibc/core/24-host"
ibckeeper "github.com/line/lbm-sdk/x/ibc/core/keeper"
"github.com/line/lbm-sdk/x/mint"
mintkeeper "github.com/line/lbm-sdk/x/mint/keeper"
minttypes "github.com/line/lbm-sdk/x/mint/types"
"github.com/line/lbm-sdk/x/params"
paramsclient "github.com/line/lbm-sdk/x/params/client"
paramskeeper "github.com/line/lbm-sdk/x/params/keeper"
paramstypes "github.com/line/lbm-sdk/x/params/types"
paramproposal "github.com/line/lbm-sdk/x/params/types/proposal"
"github.com/line/lbm-sdk/x/slashing"
slashingkeeper "github.com/line/lbm-sdk/x/slashing/keeper"
slashingtypes "github.com/line/lbm-sdk/x/slashing/types"
"github.com/line/lbm-sdk/x/staking"
stakingkeeper "github.com/line/lbm-sdk/x/staking/keeper"
stakingtypes "github.com/line/lbm-sdk/x/staking/types"
"github.com/line/lbm-sdk/x/upgrade"
upgradeclient "github.com/line/lbm-sdk/x/upgrade/client"
upgradekeeper "github.com/line/lbm-sdk/x/upgrade/keeper"
upgradetypes "github.com/line/lbm-sdk/x/upgrade/types"
"github.com/line/lbm-sdk/x/wasm"
wasmclient "github.com/line/lbm-sdk/x/wasm/client"

appparams "github.com/line/lfb/app/params"

// unnamed import of statik for swagger UI support
_ "github.com/line/lfb-sdk/client/docs/statik"
_ "github.com/line/lbm-sdk/client/docs/statik"
)

const appName = "LFB"
Expand Down
2 changes: 1 addition & 1 deletion app/encoding.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package app

import (
"github.com/line/lfb-sdk/std"
"github.com/line/lbm-sdk/std"
"github.com/line/lfb/app/params"
)

Expand Down
10 changes: 5 additions & 5 deletions app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (

ostproto "github.com/line/ostracon/proto/ostracon/types"

servertypes "github.com/line/lfb-sdk/server/types"
sdk "github.com/line/lfb-sdk/types"
slashingtypes "github.com/line/lfb-sdk/x/slashing/types"
"github.com/line/lfb-sdk/x/staking"
stakingtypes "github.com/line/lfb-sdk/x/staking/types"
servertypes "github.com/line/lbm-sdk/server/types"
sdk "github.com/line/lbm-sdk/types"
slashingtypes "github.com/line/lbm-sdk/x/slashing/types"
"github.com/line/lbm-sdk/x/staking"
stakingtypes "github.com/line/lbm-sdk/x/staking/types"
)

// ExportAppStateAndValidators exports the state of the application for a genesis
Expand Down
4 changes: 2 additions & 2 deletions app/genesis_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package app
import (
"errors"

sdk "github.com/line/lfb-sdk/types"
authtypes "github.com/line/lfb-sdk/x/auth/types"
sdk "github.com/line/lbm-sdk/types"
authtypes "github.com/line/lbm-sdk/x/auth/types"
)

var _ authtypes.GenesisAccount = (*SimGenesisAccount)(nil)
Expand Down
6 changes: 3 additions & 3 deletions app/params/encoding.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package params

import (
"github.com/line/lfb-sdk/client"
"github.com/line/lfb-sdk/codec"
"github.com/line/lfb-sdk/codec/types"
"github.com/line/lbm-sdk/client"
"github.com/line/lbm-sdk/codec"
"github.com/line/lbm-sdk/codec/types"
)

// EncodingConfig specifies the concrete encoding types to use for a given app.
Expand Down
6 changes: 3 additions & 3 deletions app/params/proto.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package params

import (
"github.com/line/lfb-sdk/codec"
"github.com/line/lfb-sdk/codec/types"
"github.com/line/lfb-sdk/x/auth/tx"
"github.com/line/lbm-sdk/codec"
"github.com/line/lbm-sdk/codec/types"
"github.com/line/lbm-sdk/x/auth/tx"
)

// MakeEncodingConfig creates an EncodingConfig for an amino based test configuration.
Expand Down
14 changes: 7 additions & 7 deletions app/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"testing"

"github.com/line/lfb-sdk/store/cache"
"github.com/line/lbm-sdk/store/cache"
link "github.com/line/lfb/app"

"github.com/line/lfb/app/helpers"
Expand All @@ -15,19 +15,19 @@ import (
"github.com/line/tm-db/v2/memdb"
"github.com/stretchr/testify/require"

"github.com/line/lfb-sdk/baseapp"
"github.com/line/lfb-sdk/simapp"
"github.com/line/lfb-sdk/store"
simulation2 "github.com/line/lfb-sdk/types/simulation"
"github.com/line/lfb-sdk/x/simulation"
"github.com/line/lbm-sdk/baseapp"
"github.com/line/lbm-sdk/simapp"
"github.com/line/lbm-sdk/store"
simulation2 "github.com/line/lbm-sdk/types/simulation"
"github.com/line/lbm-sdk/x/simulation"
)

func init() {
simapp.GetSimulatorFlags()
}

// Profile with:
// /usr/local/go/bin/go test -benchmem -run=^$ github.com/line/lfb-sdk/LinkApp -bench ^BenchmarkFullAppSimulation$ -Commit=true -cpuprofile cpu.out
// /usr/local/go/bin/go test -benchmem -run=^$ github.com/line/lbm-sdk/LinkApp -bench ^BenchmarkFullAppSimulation$ -Commit=true -cpuprofile cpu.out
func BenchmarkFullAppSimulation(b *testing.B) {
config, db, dir, logger, _, err := simapp.SetupSimulation("goleveldb-app-sim", "Simulation")
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cli_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ go test -mod=readonly -v -p 4 `go list ./cli_test/...` -tags=cli_test

### Test Structure

This integration suite [uses a thin wrapper](https://github.com/line/lfb-sdk/tree/main/tests) over the [`os/exec`](https://golang.org/pkg/os/exec/) package. This allows the integration test to run against built binary (`lfb` is used) while being written in golang. This allows tests to take advantage of the various golang code we have for operations like marshal/unmarshal, crypto, etc...
This integration suite [uses a thin wrapper](https://github.com/line/lbm-sdk/tree/main/tests) over the [`os/exec`](https://golang.org/pkg/os/exec/) package. This allows the integration test to run against built binary (`lfb` is used) while being written in golang. This allows tests to take advantage of the various golang code we have for operations like marshal/unmarshal, crypto, etc...

> NOTE: The tests will use whatever `lfb` binary is available in your `$PATH`. You can check which binary will be run by the suite by running `which lfb`. If you have your `$GOPATH` properly setup they should be in `$GOPATH/bin/lfb`. This will ensure that your test uses the latest binary you have built

Expand Down
12 changes: 6 additions & 6 deletions cli_test/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import (
"testing"
"time"

"github.com/line/lfb-sdk/client/flags"
"github.com/line/lfb-sdk/crypto/keys/ed25519"
sdk "github.com/line/lfb-sdk/types"
"github.com/line/lfb-sdk/types/tx"
gov "github.com/line/lfb-sdk/x/gov/types"
minttypes "github.com/line/lfb-sdk/x/mint/types"
"github.com/line/lbm-sdk/client/flags"
"github.com/line/lbm-sdk/crypto/keys/ed25519"
sdk "github.com/line/lbm-sdk/types"
"github.com/line/lbm-sdk/types/tx"
gov "github.com/line/lbm-sdk/x/gov/types"
minttypes "github.com/line/lbm-sdk/x/mint/types"
"github.com/line/lfb/app"
osttypes "github.com/line/ostracon/types"
"github.com/stretchr/testify/require"
Expand Down
4 changes: 2 additions & 2 deletions cli_test/multi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/stretchr/testify/require"

cryptocodec "github.com/line/lfb-sdk/crypto/codec"
sdk "github.com/line/lfb-sdk/types"
cryptocodec "github.com/line/lbm-sdk/crypto/codec"
sdk "github.com/line/lbm-sdk/types"

"github.com/line/ostracon/privval"
)
Expand Down
Loading