Skip to content

Commit

Permalink
fix: modify module name to lfb-sdk (Finschia#230)
Browse files Browse the repository at this point in the history
* fix: modify module name to lfb-sdk

* fix: github action
  • Loading branch information
Woosang Son authored Jun 9, 2021
1 parent 7a4fbf8 commit 034c4f2
Show file tree
Hide file tree
Showing 1,532 changed files with 12,869 additions and 12,884 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ jobs:
excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')"
excludelist+=" $(find ./ -type f -path './tests/mocks/*.go')"
for filename in ${excludelist}; do
filename=$(echo $filename | sed 's/^./github.com\/line\/lbm-sdk\/v2/g')
filename=$(echo $filename | sed 's/^./github.com\/line\/lfb-sdk/g')
echo "Excluding ${filename} from coverage report..."
sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt
done
Expand Down
76 changes: 38 additions & 38 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,52 @@
## [Unreleased]

### Features
* (global) [\#97](https://github.com/line/lbm-sdk/pull/97) Add codespace to query error
* (config) [\#114](https://github.com/line/lbm-sdk/pull/114) Add idle-timeout to rest server and rpc server config
* (x/wasm) [\#127](https://github.com/line/lbm-sdk/pull/127) Add wasm with Staragate migration completed.
* (x/wasm) [\#151](https://github.com/line/lbm-sdk/pull/151) Add contract access control.
* (x/wasm) [\#194](https://github.com/line/lbm-sdk/pull/194) Replace importing CosmWasm/wasmvm with line/wasmvm.
* (x/auth) [\#176](https://github.com/line/lbm-sdk/pull/176) Add MsgEmpty to auth module
* (metric) [\#184](https://github.com/line/lbm-sdk/pull/184) Add prometheus metrics for caches reverting telemetry metrics
* (global) [\#97](https://github.com/line/lfb-sdk/pull/97) Add codespace to query error
* (config) [\#114](https://github.com/line/lfb-sdk/pull/114) Add idle-timeout to rest server and rpc server config
* (x/wasm) [\#127](https://github.com/line/lfb-sdk/pull/127) Add wasm with Staragate migration completed.
* (x/wasm) [\#151](https://github.com/line/lfb-sdk/pull/151) Add contract access control.
* (x/wasm) [\#194](https://github.com/line/lfb-sdk/pull/194) Replace importing CosmWasm/wasmvm with line/wasmvm.
* (x/auth) [\#176](https://github.com/line/lfb-sdk/pull/176) Add MsgEmpty to auth module
* (metric) [\#184](https://github.com/line/lfb-sdk/pull/184) Add prometheus metrics for caches reverting telemetry metrics

### Improvements
* (bump-up) [\#93](https://github.com/line/lbm-sdk/pull/93) Adopt ostracon, line/tm-db and line/iavl
* (bump-up) [\#107](https://github.com/line/lbm-sdk/pull/107) Bump up tm-db, iavl and ostracon
* (script) [\#110](https://github.com/line/lbm-sdk/pull/110) Add script initializing simd
* (bump-up) [\#118](https://github.com/line/lbm-sdk/pull/118) Bump up tm-db and remove Domain() call
* (test) [\#128](https://github.com/line/lbm-sdk/pull/128) Allow creating new test network without init
* (db) [\#136](https://github.com/line/lbm-sdk/pull/136) Fix DB_BACKEND configuration
* (global) [\#140](https://github.com/line/lbm-sdk/pull/140) Modify default coin type, default address prefix
* (perf) [\#141](https://github.com/line/lbm-sdk/pull/141) Concurrent `checkTx`
* (perf) [\#142](https://github.com/line/lbm-sdk/pull/142) Implement `validateGasWanted()`
* (perf) [\#143](https://github.com/line/lbm-sdk/pull/143) Signature verification cache
* (global) [\#145](https://github.com/line/lbm-sdk/pull/145) Modify key type name
* (perf) [\#155](https://github.com/line/lbm-sdk/pull/155) Concurrent recheckTx
* (global) [\#158](https://github.com/line/lbm-sdk/pull/158) Remove tm-db dependency
* (x/wasm) [\#162](https://github.com/line/lbm-sdk/pull/162) Add missed UpdateContractStatusProposal types
* (perf) [\#164](https://github.com/line/lbm-sdk/pull/164) Sse fastcache
* (build) [\#181](https://github.com/line/lbm-sdk/pull/181) Raise codecov-action version to 1.5.0
* (build) [\#195](https://github.com/line/lbm-sdk/pull/195) Build properly when using libsecp256k1
* (perf) [\#198](https://github.com/line/lbm-sdk/pull/198) Caching paramset
* (global) [\#200](https://github.com/line/lbm-sdk/pull/200) Add a env prefix
* (store) [\#202](https://github.com/line/lbm-sdk/pull/202) param store doesn't use gas kv
* (bump-up) [\#93](https://github.com/line/lfb-sdk/pull/93) Adopt ostracon, line/tm-db and line/iavl
* (bump-up) [\#107](https://github.com/line/lfb-sdk/pull/107) Bump up tm-db, iavl and ostracon
* (script) [\#110](https://github.com/line/lfb-sdk/pull/110) Add script initializing simd
* (bump-up) [\#118](https://github.com/line/lfb-sdk/pull/118) Bump up tm-db and remove Domain() call
* (test) [\#128](https://github.com/line/lfb-sdk/pull/128) Allow creating new test network without init
* (db) [\#136](https://github.com/line/lfb-sdk/pull/136) Fix DB_BACKEND configuration
* (global) [\#140](https://github.com/line/lfb-sdk/pull/140) Modify default coin type, default address prefix
* (perf) [\#141](https://github.com/line/lfb-sdk/pull/141) Concurrent `checkTx`
* (perf) [\#142](https://github.com/line/lfb-sdk/pull/142) Implement `validateGasWanted()`
* (perf) [\#143](https://github.com/line/lfb-sdk/pull/143) Signature verification cache
* (global) [\#145](https://github.com/line/lfb-sdk/pull/145) Modify key type name
* (perf) [\#155](https://github.com/line/lfb-sdk/pull/155) Concurrent recheckTx
* (global) [\#158](https://github.com/line/lfb-sdk/pull/158) Remove tm-db dependency
* (x/wasm) [\#162](https://github.com/line/lfb-sdk/pull/162) Add missed UpdateContractStatusProposal types
* (perf) [\#164](https://github.com/line/lfb-sdk/pull/164) Sse fastcache
* (build) [\#181](https://github.com/line/lfb-sdk/pull/181) Raise codecov-action version to 1.5.0
* (build) [\#195](https://github.com/line/lfb-sdk/pull/195) Build properly when using libsecp256k1
* (perf) [\#198](https://github.com/line/lfb-sdk/pull/198) Caching paramset
* (global) [\#200](https://github.com/line/lfb-sdk/pull/200) Add a env prefix
* (store) [\#202](https://github.com/line/lfb-sdk/pull/202) param store doesn't use gas kv

### Bug Fixes
* (test) [\#92](https://github.com/line/lbm-sdk/pull/92) Fix SendToModuleAccountTest
* (store) [\#105](https://github.com/line/lbm-sdk/pull/105) Check `store == nil`
* (test) [\#133](https://github.com/line/lbm-sdk/pull/133) Fix `Test_runImportCmd()`
* (config) [\#138](https://github.com/line/lbm-sdk/pull/138) Fix getting coin type at running cmd
* (race) [\#159](https://github.com/line/lbm-sdk/pull/159) Fix test-race failure
* (test) [\#193](https://github.com/line/lbm-sdk/pull/193) Allow to add new validator in test network
* (test) [\#92](https://github.com/line/lfb-sdk/pull/92) Fix SendToModuleAccountTest
* (store) [\#105](https://github.com/line/lfb-sdk/pull/105) Check `store == nil`
* (test) [\#133](https://github.com/line/lfb-sdk/pull/133) Fix `Test_runImportCmd()`
* (config) [\#138](https://github.com/line/lfb-sdk/pull/138) Fix getting coin type at running cmd
* (race) [\#159](https://github.com/line/lfb-sdk/pull/159) Fix test-race failure
* (test) [\#193](https://github.com/line/lfb-sdk/pull/193) Allow to add new validator in test network

### Breaking Changes
* (global) [\#90](https://github.com/line/lbm-sdk/pull/90) Revise module path to `github.com/line/lbm-sdk/v2`
* (rpc) [\#97](https://github.com/line/lbm-sdk/pull/97) Send response with 404 status when quering non-exist account
* (proto) [\#106](https://github.com/line/lbm-sdk/pull/106) Rename package of proto files
* (api) [\#130](https://github.com/line/lbm-sdk/pull/130) Rename rest apis
* (global) [\#90](https://github.com/line/lfb-sdk/pull/90) Revise module path to `github.com/line/lfb-sdk`
* (rpc) [\#97](https://github.com/line/lfb-sdk/pull/97) Send response with 404 status when quering non-exist account
* (proto) [\#106](https://github.com/line/lfb-sdk/pull/106) Rename package of proto files
* (api) [\#130](https://github.com/line/lfb-sdk/pull/130) Rename rest apis

## [cosmos-sdk v0.42.1] - 2021-03-15
Initial lbm-sdk is based on the cosmos-sdk v0.42.1
Initial lfb-sdk is based on the cosmos-sdk v0.42.1

* (cosmos-sdk) [v0.42.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.1).

Expand Down
26 changes: 13 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
- [Point Release Procedure](#point-release-procedure)
- [Code Owner Membership](#code-owner-membership)

Thank you for considering making contributions to lbm-sdk and related
Thank you for considering making contributions to lfb-sdk and related
repositories!

Contributing to this repo can mean many things such as participating in
discussion or proposing code changes. To ensure a smooth workflow for all
contributors, the general procedure for contributing has been established:

1. Either [open](https://github.com/line/lbm-sdk/issues/new/choose) or
[find](https://github.com/line/lbm-sdk/issues) an issue you'd like to help with
1. Either [open](https://github.com/line/lfb-sdk/issues/new/choose) or
[find](https://github.com/line/lfb-sdk/issues) an issue you'd like to help with
2. Participate in thoughtful discussion on that issue
3. If you would like to contribute:
1. If the issue is a proposal, ensure that the proposal has been accepted
Expand Down Expand Up @@ -89,7 +89,7 @@ All PRs require two Reviews before merge (except docs changes, or variable name-

### Updating Documentation

If you open a PR on the LBM SDK, it is mandatory to update the relevant documentation in /docs.
If you open a PR on the LFB SDK, it is mandatory to update the relevant documentation in /docs.

- If your change relates to the core SDK (baseapp, store, ...), please update the `docs/basics/`, `docs/core/` and/or `docs/building-modules/` folders.
- If your changes relate to the core of the CLI or Light-client (not specifically to module's CLI/Rest), please modify the `docs/interfaces/` folder.
Expand All @@ -98,20 +98,20 @@ If you open a PR on the LBM SDK, it is mandatory to update the relevant document
## Forking

Please note that Go requires code to live under absolute paths, which complicates forking.
While my fork lives at `https://github.com/someone/lbm-sdk`,
the code should never exist at `$GOPATH/src/github.com/someone/lbm-sdk`.
While my fork lives at `https://github.com/someone/lfb-sdk`,
the code should never exist at `$GOPATH/src/github.com/someone/lfb-sdk`.
Instead, we use `git remote` to add the fork as a new remote for the original repo,
`$GOPATH/src/github.com/line/lbm-sdk`, and do all the work there.
`$GOPATH/src/github.com/line/lfb-sdk`, and do all the work there.

For instance, to create a fork and work on a branch of it, I would:

- Create the fork on github, using the fork button.
- Go to the original repo checked out locally (i.e. `$GOPATH/src/github.com/line/lbm-sdk`)
- Go to the original repo checked out locally (i.e. `$GOPATH/src/github.com/line/lfb-sdk`)
- `git remote rename origin upstream`
- `git remote add origin git@github.com:someone/lbm-sdk.git`
- `git remote add origin git@github.com:someone/lfb-sdk.git`

Now `origin` refers to my fork and `upstream` refers to the lbm-sdk version.
So I can `git push -u origin master` to update my fork, and make pull requests to lbm-sdk from there.
Now `origin` refers to my fork and `upstream` refers to the lfb-sdk version.
So I can `git push -u origin master` to update my fork, and make pull requests to lfb-sdk from there.
Of course, replace `someone` with your git handle.

To pull in updates from the origin repo, run
Expand All @@ -126,7 +126,7 @@ Please don't make Pull Requests from `master`.
We use [Go 1.15 Modules](https://github.com/golang/go/wiki/Modules) to manage
dependency versions.

The master branch of every LBM repository should just build with `go get`,
The master branch of every LFB repository should just build with `go get`,
which means they should be kept up-to-date with their dependencies, so we can
get away with telling people they can just `go get` our software.

Expand All @@ -135,7 +135,7 @@ build, in which case we can fall back on `go mod tidy -v`.

## Protobuf

We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along with [gogoproto](https://github.com/gogo/protobuf) to generate code for use in lbm-sdk.
We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along with [gogoproto](https://github.com/gogo/protobuf) to generate code for use in lfb-sdk.

For determinstic behavior around Protobuf tooling, everything is containerized using Docker. Make sure to have Docker installed on your machine, or head to [Docker's website](https://docs.docker.com/get-docker/) to install it.

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3
RUN apk add --no-cache $PACKAGES

# Set working directory for the build
WORKDIR /go/src/github.com/line/lbm-sdk
WORKDIR /go/src/github.com/line/lfb-sdk

# Add source files
COPY . .
Expand All @@ -37,7 +37,7 @@ RUN apk add --update ca-certificates
WORKDIR /root

# Copy over binaries from the build-env
COPY --from=build-env /go/src/github.com/line/lbm-sdk/build/simd /usr/bin/simd
COPY --from=build-env /go/src/github.com/line/lfb-sdk/build/simd /usr/bin/simd

EXPOSE 26656 26657 1317 9090

Expand Down
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BINDIR ?= $(GOPATH)/bin
BUILDDIR ?= $(CURDIR)/build
SIMAPP = ./simapp
MOCKS_DIR = $(CURDIR)/tests/mocks
HTTPS_GIT := https://github.com/line/lbm-sdk.git
HTTPS_GIT := https://github.com/line/lfb-sdk.git
DOCKER := $(shell which docker)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf

Expand Down Expand Up @@ -82,12 +82,12 @@ build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags))

# process linker flags

ldflags = -X github.com/line/lbm-sdk/v2/version.Name=sim \
-X github.com/line/lbm-sdk/v2/version.AppName=simd \
-X github.com/line/lbm-sdk/v2/version.Version=$(VERSION) \
-X github.com/line/lbm-sdk/v2/version.Commit=$(COMMIT) \
-X github.com/line/lbm-sdk/v2/types.DBBackend=$(DB_BACKEND) \
-X "github.com/line/lbm-sdk/v2/version.BuildTags=$(build_tags_comma_sep)"
ldflags = -X github.com/line/lfb-sdk/version.Name=sim \
-X github.com/line/lfb-sdk/version.AppName=simd \
-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)"

ifeq (,$(findstring nostrip,$(LBM_BUILD_OPTIONS)))
ldflags += -w -s
Expand Down Expand Up @@ -197,7 +197,7 @@ update-swagger-docs: statik
.PHONY: update-swagger-docs

godocs:
@echo "--> Wait a few seconds and visit http://localhost:6060/pkg/github.com/line/lbm-sdk/v2/types"
@echo "--> Wait a few seconds and visit http://localhost:6060/pkg/github.com/line/lfb-sdk/types"
godoc -http=:6060

# This builds a docs site for each branch/tag in `./docs/versions`
Expand Down Expand Up @@ -348,7 +348,7 @@ lint-fix:
format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs gofmt -w -s
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs misspell -w
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs goimports -w -local github.com/line/lbm-sdk/v2
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs goimports -w -local github.com/line/lfb-sdk
.PHONY: format

###############################################################################
Expand All @@ -358,12 +358,12 @@ format:
DEVDOC_SAVE = docker commit `docker ps -a -n 1 -q` devdoc:local

devdoc-init:
$(DOCKER) run -it -v "$(CURDIR):/go/src/github.com/line/lbm-sdk/v2" -w "/go/src/github.com/line/lbm-sdk/v2" tendermint/devdoc echo
$(DOCKER) run -it -v "$(CURDIR):/go/src/github.com/line/lfb-sdk" -w "/go/src/github.com/line/lfb-sdk" tendermint/devdoc echo
# TODO make this safer
$(call DEVDOC_SAVE)

devdoc:
$(DOCKER) run -it -v "$(CURDIR):/go/src/github.com/line/lbm-sdk/v2" -w "/go/src/github.com/line/lbm-sdk/v2" devdoc:local bash
$(DOCKER) run -it -v "$(CURDIR):/go/src/github.com/line/lfb-sdk" -w "/go/src/github.com/line/lfb-sdk" devdoc:local bash

devdoc-save:
# TODO make this safer
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
The LBM SDK is a framework for building blockchain applications in Golang.
It is being used to build [`LBM`](https://github.com/line/lbm), the first implementation of the LINE Blockchain Mainnet.
The LFB SDK is a framework for building blockchain applications in Golang.
It is being used to build [`LFB`](https://github.com/line/lfb), the first implementation of the LINE Financial Blockchain.
This is forked from [`cosmos-sdk`](https://github.com/cosmos/cosmos-sdk) at 2021-03-15.

**WARNING**: Breaking changes may occur because this repository is still in the pre-release development phase.

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

## What is the LBM SDK?
## What is the LFB SDK?

The [LBM SDK](https://github.com/line/lbm-sdk) is an open-source framework for building multi-asset public Proof-of-Stake (PoS) <df value="blockchain">blockchains</df>, as well as permissioned Proof-Of-Authority (PoA) blockchains. Blockchains built with the Cosmos SDK are generally referred to as **application-specific blockchains**.
The [LFB SDK](https://github.com/line/lfb-sdk) is an open-source framework for building multi-asset public Proof-of-Stake (PoS) <df value="blockchain">blockchains</df>, as well as permissioned Proof-Of-Authority (PoA) blockchains. Blockchains built with the Cosmos SDK are generally referred to as **application-specific blockchains**.

The purpose of `LBM SDK` is to succeed to [the objectives of `Cosmos sdk`](https://github.com/cosmos/cosmos-sdk/blob/master/docs/intro/overview.md) while helping develop blockchains that requires faster transaction processing to be applied to reality.
The purpose of `LFB SDK` is to succeed to [the objectives of `Cosmos sdk`](https://github.com/cosmos/cosmos-sdk/blob/master/docs/intro/overview.md) while helping develop blockchains that requires faster transaction processing to be applied to reality.

## Why the LBM SDK?
## Why the LFB SDK?

Cosmos-sdk, which created the philosophy of application-specific blockchain, established its status as a framework for various application blockchain development. `LBM SDK` inherited this `cosmos-sdk` philosophy, addressing slow transaction processing problem that was difficult for cosmos-sdk to apply in real financial system. Real financial systems require thousands of processing performance per second, with LBM SDK adding many performance improvements to meet that demand.
Cosmos-sdk, which created the philosophy of application-specific blockchain, established its status as a framework for various application blockchain development. `LFB SDK` inherited this `cosmos-sdk` philosophy, addressing slow transaction processing problem that was difficult for cosmos-sdk to apply in real financial system. Real financial systems require thousands of processing performance per second, with LFB SDK adding many performance improvements to meet that demand.
The following work was carried out to improve performance.

- Concurrent checkTx, deliverTx
Expand Down
10 changes: 5 additions & 5 deletions baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
"google.golang.org/grpc/codes"
grpcstatus "google.golang.org/grpc/status"

"github.com/line/lbm-sdk/v2/codec"
snapshottypes "github.com/line/lbm-sdk/v2/snapshots/types"
"github.com/line/lbm-sdk/v2/telemetry"
sdk "github.com/line/lbm-sdk/v2/types"
sdkerrors "github.com/line/lbm-sdk/v2/types/errors"
"github.com/line/lfb-sdk/codec"
snapshottypes "github.com/line/lfb-sdk/snapshots/types"
"github.com/line/lfb-sdk/telemetry"
sdk "github.com/line/lfb-sdk/types"
sdkerrors "github.com/line/lfb-sdk/types/errors"
)

// InitChain implements the ABCI interface. It runs the initialization logic
Expand Down
2 changes: 1 addition & 1 deletion baseapp/abci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/line/tm-db/v2/memdb"
"github.com/stretchr/testify/require"

sdk "github.com/line/lbm-sdk/v2/types"
sdk "github.com/line/lfb-sdk/types"
)

func TestGetBlockRentionHeight(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion baseapp/accountwgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package baseapp
import (
"sync"

sdk "github.com/line/lbm-sdk/v2/types"
sdk "github.com/line/lfb-sdk/types"
)

type AccountWGs struct {
Expand Down
Loading

0 comments on commit 034c4f2

Please sign in to comment.