Skip to content

Commit

Permalink
Merge branch 'main' of github.com:line/lfb-sdk into shiki_tak/feat/me…
Browse files Browse the repository at this point in the history
…rge-wasmd-0.17.0-new
  • Loading branch information
shiki-tak committed Jul 20, 2021
2 parents 1730ddd + e6047cb commit 5601ab9
Show file tree
Hide file tree
Showing 150 changed files with 8,489 additions and 2,483 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,3 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Publish to Docker Hub
uses: docker/build-push-action@v2
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}
6 changes: 1 addition & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.TOKEN }}
run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com"
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v4
with:
Expand All @@ -31,5 +27,5 @@ jobs:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.28
args: --timeout 10m
github-token: ${{ secrets.github_token }}
github-token: ${{ secrets.GITHUB_TOKEN }}
if: env.GIT_DIFF
2 changes: 1 addition & 1 deletion .github/workflows/release-sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.TOKEN }}"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"

build:
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,12 @@ jobs:
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.TOKEN }}"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-sims')"
steps:
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.TOKEN }}
run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com"
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
Expand Down Expand Up @@ -56,10 +52,6 @@ jobs:
runs-on: ubuntu-latest
needs: [build, install-runsim]
steps:
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.TOKEN }}
run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com"
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
Expand All @@ -86,10 +78,6 @@ jobs:
runs-on: ubuntu-latest
needs: [build, install-runsim]
steps:
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.TOKEN }}
run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com"
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.TOKEN }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: "This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions."
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
with:
args: release --rm-dist --release-notes ./RELEASE_CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 1 addition & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.TOKEN }}"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/develop'"

install-tparse:
Expand All @@ -40,10 +40,6 @@ jobs:
matrix:
go-arch: ["amd64", "arm", "arm64"]
steps:
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.TOKEN }}
run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com"
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
Expand All @@ -62,10 +58,6 @@ jobs:
# test-cosmovisor:
# runs-on: ubuntu-latest
# steps:
# - name: Configure git for private modules
# env:
# TOKEN: ${{ secrets.TOKEN }}
# run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com"
# - uses: actions/checkout@v2
# - uses: actions/setup-go@v2.1.3
# with:
Expand All @@ -88,10 +80,6 @@ jobs:
split-test-files:
runs-on: ubuntu-latest
steps:
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.TOKEN }}
run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com"
- uses: actions/checkout@v2
- name: Create a file with all the pkgs
run: go list ./... > pkgs.txt
Expand Down Expand Up @@ -123,10 +111,6 @@ jobs:
matrix:
part: ["00", "01", "02", "03"]
steps:
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.TOKEN }}
run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com"
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
Expand Down Expand Up @@ -204,10 +188,6 @@ jobs:
matrix:
part: ["00", "01", "02", "03"]
steps:
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.TOKEN }}
run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com"
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
Expand Down Expand Up @@ -274,10 +254,6 @@ jobs:
# runs-on: ubuntu-latest
# timeout-minutes: 10
# steps:
# - name: Configure git for private modules
# env:
# TOKEN: ${{ secrets.TOKEN }}
# run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com"
# - uses: actions/checkout@v2
# - uses: actions/setup-go@v2.1.3
# with:
Expand Down
36 changes: 35 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* (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
* (grpc) [\#291](https://github.com/line/lfb-sdk/pull/291) Add GRPC API the BlockByHash and BlockResultsByHeight, add prove parameter to GetTxsEvent

### Improvements
* (bump-up) [\#93](https://github.com/line/lfb-sdk/pull/93) Adopt ostracon, line/tm-db and line/iavl
Expand All @@ -32,6 +33,24 @@
* (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
* (store) [\#202](https://github.com/line/lfb-sdk/pull/202) Param store doesn't use gas kv
* (store) [\#203](https://github.com/line/lfb-sdk/pull/203) Remove transient store that is not used now
* (perf) [\#204](https://github.com/line/lfb-sdk/pull/204) Apply rw mutex to cachekv
* (perf) [\#208](https://github.com/line/lfb-sdk/pull/208) Use easyjson instead of amino when marshal abci logs
* (perf) [\#209](https://github.com/line/lfb-sdk/pull/209) Apply async reactor ostracon
* (proto) [\#212](https://github.com/line/lfb-sdk/pull/212) Reformat proto files and restore proto docs
* (perf) [\#216](https://github.com/line/lfb-sdk/pull/216) Memoize bech32 encoding and decoding
* (perf) [\#218](https://github.com/line/lfb-sdk/pull/218) Rootmulti store parallel commit
* (perf) [\#219](https://github.com/line/lfb-sdk/pull/219) Fix bech32 cache to get bech32 from proper cache
* (bump-up) [\#221](https://github.com/line/lfb-sdk/pull/221) Bump up iavl for parallel processing of batches
* (perf) [\#224](https://github.com/line/lfb-sdk/pull/224) Updated log time to have milliseconds
* (bump-up) [\#228](https://github.com/line/lfb-sdk/pull/228) Bump up ostracon to optimize checking the txs size
* (global) [\#230](https://github.com/line/lfb-sdk/pull/230) Modify module name to lfb-sdk
* (bump-up) [\#246](https://github.com/line/lfb-sdk/pull/246) Bump up ostracon to not flush wal when receive consensus msgs
* (wasm) [\#250](https://github.com/line/lfb-sdk/pull/250) Migrate linkwasmd to the latest commit
* (wasm) [\#253](https://github.com/line/lfb-sdk/pull/253) remove MaxGas const
* (wasm) [\#254](https://github.com/line/lfb-sdk/pull/254) Specify wasm event types
* (x) [\#255](https://github.com/line/lfb-sdk/pull/255) Remove legacy from modules

### Bug Fixes
* (test) [\#92](https://github.com/line/lfb-sdk/pull/92) Fix SendToModuleAccountTest
Expand All @@ -40,12 +59,27 @@
* (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/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
* (auth) [\#265](https://github.com/line/lfb-sdk/pull/265) Introduce sig block height for the new replay protection

### Build, CI
* (ci) [\#234](https://github.com/line/lfb-sdk/pull/234) Fix branch name in ci script
* (docker) [\#264](https://github.com/line/lfb-sdk/pull/264) Remove docker publish

### Document Updates
* (docs) [\#205](https://github.com/line/lfb-sdk/pull/205) Renewal docs for open source
* (docs) [\#207](https://github.com/line/lfb-sdk/pull/207) Fix license
* (docs) [\#211](https://github.com/line/lfb-sdk/pull/211) Remove codeowners
* (docs) [\#248](https://github.com/line/lfb-sdk/pull/248) Add PR procedure, apply main branch
* (docs) [\#256](https://github.com/line/lfb-sdk/pull/256) Modify copyright and contributing
* (docs) [\#259](https://github.com/line/lfb-sdk/pull/259) Modify copyright, verified from legal team
* (docs) [\#260](https://github.com/line/lfb-sdk/pull/260) Remove gov, ibc and readme of wasm module
* (docs) [\#262](https://github.com/line/lfb-sdk/pull/262) Fix link urls, remove invalid reference

## [cosmos-sdk v0.42.1] - 2021-03-15
Initial lfb-sdk is based on the cosmos-sdk v0.42.1
Expand Down
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ WORKDIR /go/src/github.com/line/lfb-sdk
COPY . .

# install simapp, remove packages
# TODO ebony: fix module download error in docker
RUN go env -w GOPRIVATE=github.com/line/*
RUN git config --global url."https://$GITHUB_TOKEN:x-oauth-basic@github.com/".insteadOf "https://github.com/"
RUN make build-linux


Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ proto-all: proto-format proto-lint proto-gen

proto-gen:
@echo "Generating Protobuf files"
$(DOCKER) run --rm -e GITHUB_TOKEN=$(GITHUB_TOKEN) -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh
$(DOCKER) run --rm -e -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh

proto-format:
@echo "Formatting Protobuf files"
Expand All @@ -407,7 +407,7 @@ proto-gen-any:
$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen-any.sh

proto-swagger-gen:
@./scripts/protoc-swagger-gen.sh
$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protoc-swagger-gen.sh

proto-lint:
@$(DOCKER_BUF) check lint --error-format=json
Expand Down
4 changes: 4 additions & 0 deletions baseapp/accountwgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ func (tx AccountLockTestTx) ValidateBasic() error {
return nil
}

func (tx AccountLockTestTx) GetSigBlockHeight() uint64 {
return 0
}

func newTestPrivKeys(num int) []*secp256k1.PrivKey {
privs := make([]*secp256k1.PrivKey, 0, num)
for i := 0; i < num; i++ {
Expand Down
5 changes: 3 additions & 2 deletions baseapp/baseapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,9 @@ func (tx *txTest) setFailOnHandler(fail bool) {
}

// Implements Tx
func (tx txTest) GetMsgs() []sdk.Msg { return tx.Msgs }
func (tx txTest) ValidateBasic() error { return nil }
func (tx txTest) GetMsgs() []sdk.Msg { return tx.Msgs }
func (tx txTest) ValidateBasic() error { return nil }
func (tx txTest) GetSigBlockHeight() uint64 { return 0 }

const (
routeMsgCounter = "msgCounter"
Expand Down
1 change: 0 additions & 1 deletion baseapp/msg_service_router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ func TestMsgService(t *testing.T) {
// Second round: all signer infos are set, so each signer can sign.
signerData := authsigning.SignerData{
ChainID: "test",
AccountNumber: 0,
Sequence: 0,
}
sigV2, err = tx.SignWithPrivKey(
Expand Down
4 changes: 2 additions & 2 deletions client/account_retriever.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
type Account interface {
GetAddress() sdk.AccAddress
GetPubKey() cryptotypes.PubKey // can return nil.
GetAccountNumber() uint64
GetSequence() uint64
}

Expand All @@ -18,7 +17,8 @@ type Account interface {
// for signing.
type AccountRetriever interface {
GetAccount(clientCtx Context, addr sdk.AccAddress) (Account, error)
GetLatestHeight(clientCtx Context) (uint64, error)
GetAccountWithHeight(clientCtx Context, addr sdk.AccAddress) (Account, int64, error)
EnsureExists(clientCtx Context, addr sdk.AccAddress) error
GetAccountNumberSequence(clientCtx Context, addr sdk.AccAddress) (accNum uint64, accSeq uint64, err error)
GetAccountSequence(clientCtx Context, addr sdk.AccAddress) (accSeq uint64, err error)
}
Loading

0 comments on commit 5601ab9

Please sign in to comment.