Skip to content

Commit

Permalink
Merge pull request #937 from zemyblue/backporting_main
Browse files Browse the repository at this point in the history
Backport main changes (#900, #911, #912, #922, #923, #934, #939, #933, #934, #938)
  • Loading branch information
zemyblue authored Mar 22, 2023
2 parents 11966d1 + a6ca9e7 commit 8bb999d
Show file tree
Hide file tree
Showing 104 changed files with 4,943 additions and 1,105 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
make release
env:
GORELEASER_MOUNT_CONFIG: true
GORELEASER_IMAGE: line/goreleaserx-wasm:1.0.0-0.10.0
GORELEASER_IMAGE: line/goreleaserx:1.13.1-1.19.3
GORELEASER_RELEASE: true
BUILD_TAGS: static
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59 changes: 59 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,62 @@ builds:
- amd64
env:
- CGO_ENABLED=1
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
flags:
- -mod=readonly
- -trimpath
- "-tags={{ .Env.BUILD_TAGS }}"
ldflags:
- "{{ .Env.BUILD_VARS }}"

- id: simd-linux-arm64
main: ./simapp/simd
binary: simd
goos:
- linux
goarch:
- arm64
env:
- CGO_ENABLED=1
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
flags:
- -mod=readonly
- -trimpath
- "-tags={{ .Env.BUILD_TAGS }}"
ldflags:
- "{{ .Env.BUILD_VARS }}"

- id: simd-darwin-amd64
main: ./simapp/simd
binary: simd
goos:
- darwin
goarch:
- amd64
env:
- CGO_ENABLED=1
- CC=o64-clang
- CXX=o64-clang++
flags:
- -mod=readonly
- -trimpath
- "-tags={{ .Env.BUILD_TAGS }}"
ldflags:
- "{{ .Env.BUILD_VARS }}"

- id: simd-darwin-arm64
main: ./simapp/simd
binary: simd
goos:
- darwin
goarch:
- arm64
env:
- CGO_ENABLED=1
- CC=oa64-clang
- CXX=oa64-clang++
flags:
- -mod=readonly
- -trimpath
Expand All @@ -23,6 +79,9 @@ archives:
id: bin-archive
builds:
- simd-linux-amd64
- simd-linux-arm64
- simd-darwin-amd64
- simd-darwin-arm64
format: tar.gz
name_template: "simd_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
wrap_in_directory: true
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,23 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Features

### Improvements
* (x/collection,token) [\#900](https://github.com/line/lbm-sdk/pull/900) Add uri for MsgModify and deprecate the old ones
* (x/foundation) [\#912](https://github.com/line/lbm-sdk/pull/912) Introduce censorship into x/foundation
* (x/foundation) [\#933](https://github.com/line/lbm-sdk/pull/933) Clean up x/foundation apis
* (x/collection) [\#938](https://github.com/line/lbm-sdk/pull/938) Add progress log into x/collection import-genesis

### Bug Fixes
* (swagger) [\#898](https://github.com/line/lbm-sdk/pull/898) fix a bug not added `lbm.tx.v1beta1.Service/GetBlockWithTxs` in swagger
* (x/collection) [\#911](https://github.com/line/lbm-sdk/pull/911) Add missing command(TxCmdModify) for CLI
* (x/foundation) [\#922](https://github.com/line/lbm-sdk/pull/922) Propagate events in x/foundation through sdk.Results

### Removed

### Breaking Changes
* (proto) [\#923](https://github.com/line/lbm-sdk/pull/923) deprecate broadcast mode `block`

### Build, CI
* (ci, build) [\#901](https://github.com/line/lbm-sdk/pull/901) Update release pipeline to match non-wasm env

### Document Updates
* (x/foundation) [\#934](https://github.com/line/lbm-sdk/pull/934) Update permlinks in x/foundation documents
11 changes: 1 addition & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,11 @@ COPY ./go.mod /go/src/github.com/line/lbm-sdk/go.mod
COPY ./go.sum /go/src/github.com/line/lbm-sdk/go.sum
RUN go mod download

# See https://github.com/line/wasmvm/releases
# See https://github.com/line/wasmvm/releases
ADD https://github.com/line/wasmvm/releases/download/v1.0.0-0.10.0/libwasmvm_static.x86_64.a /lib/libwasmvm_static.x86_64.a
ADD https://github.com/line/wasmvm/releases/download/v1.0.0-0.10.0/libwasmvm_static.aarch64.a /lib/libwasmvm_static.aarch64.a
RUN sha256sum /lib/libwasmvm_static.aarch64.a | grep bc3db72ba32f34ad88ceb1d20479411bd7f50ccd6a5ca50cc8ca462a561e6189
RUN sha256sum /lib/libwasmvm_static.x86_64.a | grep 352fa5de5f9dba66f0a38082541d3e63e21394fee3e577ea35e0906294c61276

RUN ln -s /lib/libwasmvm_static.${ARCH}.a /usr/lib/libwasmvm_static.a

# Add source files
COPY . .

# install simapp, remove packages
RUN BUILD_TAGS=static make build CGO_ENABLED=1
RUN make build CGO_ENABLED=1

# Final image
FROM alpine:edge
Expand Down
11 changes: 4 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ mocks: $(MOCKS_DIR)
mockgen -source=types/handler.go -package mocks -destination tests/mocks/types_handler.go
mockgen -package mocks -destination tests/mocks/grpc_server.go github.com/gogo/protobuf/grpc Server
mockgen -package mocks -destination tests/mocks/tendermint_tendermint_libs_log_DB.go github.com/line/ostracon/libs/log Logger
mockgen -source=x/stakingplus/expected_keepers.go -package testutil -destination x/stakingplus/testutil/expected_keepers_mocks.go
.PHONY: mocks

$(MOCKS_DIR):
Expand Down Expand Up @@ -576,14 +577,12 @@ libsodium:
GORELEASER_CONFIG ?= .goreleaser.yml

GORELEASER_BUILD_LDF = $(ldflags)
GORELEASER_BUILD_LDF += -linkmode=external -extldflags "-Wl,-z,muldefs -static"
GORELEASER_BUILD_LDF := $(strip $(GORELEASER_BUILD_LDF))

GORELEASER_SKIP_VALIDATE ?= false
GORELEASER_DEBUG ?= false
GORELEASER_IMAGE ?= line/goreleaserx-wasm:1.0.0-0.10.0
GORELEASER_IMAGE ?= line/goreleaserx:1.13.1-1.19.3
GORELEASER_RELEASE ?= false
#GO_MOD_NAME := $(shell go list -m 2>/dev/null)
GO_MOD_NAME := github.com/line/lbm-sdk

ifeq ($(GORELEASER_RELEASE),true)
Expand Down Expand Up @@ -613,6 +612,7 @@ release-snapshot:
--skip-validate=$(GORELEASER_SKIP_VALIDATE) \
--debug=$(GORELEASER_DEBUG) \
--rm-dist

release:
docker run --rm \
-e BUILD_TAGS="$(build_tags)" \
Expand All @@ -629,7 +629,4 @@ release:
--debug=$(GORELEASER_DEBUG) \
--rm-dist

build-static: go.sum
CGO_ENABLED=1 go build -mod=readonly -tags "$(build_tags)" -ldflags '$(GORELEASER_BUILD_LDF)' -trimpath -o ./build/ ./...

.PHONY: release-snapshot release build-static
.PHONY: release-snapshot release
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This is forked from [`cosmos-sdk`](https://github.com/cosmos/cosmos-sdk) at 2021

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 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 `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 require faster transaction processing to be applied to reality.

## Why the LBM SDK?

Expand Down Expand Up @@ -68,6 +68,6 @@ simd start --home ~/.simapp/simapp1
&nbsp;

## Follow Guide
You can refer the sample tx commands at [here](docs/sample-tx.md)
You can refer to the sample tx commands [here](docs/sample-tx.md).
Test different commands to get a broader understanding of lbm

2 changes: 1 addition & 1 deletion baseapp/testutil/messages.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (ctx Context) WithKeyringOptions(opts ...keyring.Option) Context {

// WithInput returns a copy of the context with an updated input.
func (ctx Context) WithInput(r io.Reader) Context {
// convert to a bufio.Reader to have a shared buffer between the keyring and the
// convert to a bufio.Reader to have a shared buffer between the keyring and
// the Commands, ensuring a read from one advance the read pointer for the other.
// see https://github.com/cosmos/cosmos-sdk/issues/9566.
ctx.Input = bufio.NewReader(r)
Expand Down
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading

0 comments on commit 8bb999d

Please sign in to comment.