From 8e4d250f8463691debd6978948b8fbd74aade681 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Tue, 30 Jul 2024 15:03:58 +0900 Subject: [PATCH 1/2] bump opinit and cleanup github actions --- .github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md | 22 ------ .github/ISSUE_TEMPLATE/Release_notes.md | 50 -------------- .github/ISSUE_TEMPLATE/good_first_issue.md | 18 ----- .github/ISSUE_TEMPLATE/gui_issue.md | 8 --- .github/PULL_REQUEST_TEMPLATE.md | 78 +++++++++++++--------- .github/workflows/build-darwin-amd64.yml | 9 ++- .github/workflows/build-darwin-arm64.yml | 14 ++-- .github/workflows/build-linux-amd64.yml | 9 +-- .github/workflows/build-linux-arm64.yml | 10 +-- .github/workflows/docker.yml | 3 +- .github/workflows/lint.yml | 13 +--- .github/workflows/test.yml | 9 ++- Dockerfile | 2 +- app/ante/ante.go | 4 +- app/hook/move.go | 62 +++++++++++++++-- app/hook/move_test.go | 27 ++++++++ go.mod | 8 +-- go.sum | 12 ++-- images/README.md | 17 ----- images/private/Dockerfile | 59 ---------------- scripts/protocgen-pulsar.sh | 2 +- 21 files changed, 177 insertions(+), 259 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md delete mode 100644 .github/ISSUE_TEMPLATE/Release_notes.md delete mode 100644 .github/ISSUE_TEMPLATE/good_first_issue.md delete mode 100644 .github/ISSUE_TEMPLATE/gui_issue.md create mode 100644 app/hook/move_test.go delete mode 100644 images/README.md delete mode 100644 images/private/Dockerfile diff --git a/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md deleted file mode 100644 index dd047dc..0000000 --- a/.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/.github/ISSUE_TEMPLATE/Release_notes.md b/.github/ISSUE_TEMPLATE/Release_notes.md deleted file mode 100644 index c09f699..0000000 --- a/.github/ISSUE_TEMPLATE/Release_notes.md +++ /dev/null @@ -1,50 +0,0 @@ -Release Notes -================== - -Initia version 0.45.12 is now available from: - - - -This release includes new features, various bug fixes and performance -improvements, as well as updated translations. - -Please report bugs using the issue tracker at GitHub: - - - -To receive security and update notifications, please join our discord channel. - - -What's Changed -============== -### Initia -- upgrade to cosmos-sdk v0.45.12 by @zkst in #102 - -### RPC and other APIs - -- #25220 rpc: fix incorrect warning for address type p2sh-segwit in createmultisig -- #25237 rpc: Capture UniValue by ref for rpcdoccheck -- #25983 Prevent data race for pathHandlers -- #26275 Fix crash on deriveaddresses when index is 2147483647 (2^31-1) - -### Build system - -- #25201 windeploy: Renewed windows code signing certificate -- #25788 guix: patch NSIS to remove .reloc sections from installer stubs -- #25861 guix: use --build={arch}-guix-linux-gnu in cross toolchain -- #25985 Revert "build: Use Homebrew's sqlite package if it is available" - -### GUI - -- gui#631 Disallow encryption of watchonly wallets -- gui#680 Fixes MacOS 13 segfault by preventing certain notifications - -### Tests - -- #24454 tests: Fix calculation of external input weights - -### Miscellaneous - -- #26321 Adjust .tx/config for new Transifex CLI - -Full Changelog: Initia-node-v1.0.0...Initia-node-v1.0.1 [link] \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/good_first_issue.md b/.github/ISSUE_TEMPLATE/good_first_issue.md deleted file mode 100644 index 0b92506..0000000 --- a/.github/ISSUE_TEMPLATE/good_first_issue.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Good first issue -about: '(Regular devs only): Suggest a new good first issue' -title: '' -labels: '' -assignees: '' - ---- - - - - - - - -#### Useful skills: - - diff --git a/.github/ISSUE_TEMPLATE/gui_issue.md b/.github/ISSUE_TEMPLATE/gui_issue.md deleted file mode 100644 index 3bac53c..0000000 --- a/.github/ISSUE_TEMPLATE/gui_issue.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: An issue or feature request related to the GUI -about: Any report, issue or feature request related to the GUI should be reported to initia support team -title: Any report, issue or feature request related to the GUI should be reported to initia support team -labels: GUI -assignees: '' - ---- \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ee3a2d9..c371fee 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,32 +1,46 @@ - - - - - +# Description + +Closes: #XXXX + + + +--- + +## Author Checklist + +_All items are required. Please add a note to the item if the item is not applicable and +please add links to any relevant follow up issues._ + +I have... + +- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title, you can find examples of the prefixes below: + +- [ ] confirmed `!` in the type prefix if API or client breaking change +- [ ] targeted the correct branch +- [ ] provided a link to the relevant issue or specification +- [ ] reviewed "Files changed" and left comments if necessary +- [ ] included the necessary unit and integration tests +- [ ] updated the relevant documentation or specification, including comments for [documenting Go code](https://blog.golang.org/godoc) +- [ ] confirmed all CI checks have passed + +## Reviewers Checklist + +_All items are required. Please add a note if the item is not applicable and please add +your handle next to the items reviewed if you only reviewed selected items._ + +I have... + +- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title +- [ ] confirmed all author checklist items have been addressed +- [ ] reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage diff --git a/.github/workflows/build-darwin-amd64.yml b/.github/workflows/build-darwin-amd64.yml index fe14186..ce78f96 100644 --- a/.github/workflows/build-darwin-amd64.yml +++ b/.github/workflows/build-darwin-amd64.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.22.4' + go-version: "1.22.4" - name: Set environment variables run: | @@ -31,7 +31,7 @@ jobs: echo "VERSION=${VERSION}" >> $GITHUB_ENV echo "ARCH_NAME=x86_64" >> $GITHUB_ENV MOVEVM_VERSION=$(go list -m github.com/initia-labs/movevm | awk '{print $2}') - echo "MOVEVM_VERSION=${MOVEVM_VERSION}" >> $GITHUB_ENV + echo "MOVEVM_VERSION=${MOVEVM_VERSION}" >> $GITHUB_ENV - name: Ensure dependencies run: | @@ -57,9 +57,12 @@ jobs: && tar -czvf minimove_"$VERSION"_Darwin_"$ARCH_NAME".tar.gz minitiad libmovevm.dylib libcompiler.dylib \ && mv ./minimove_"$VERSION"_Darwin_"$ARCH_NAME".tar.gz $GITHUB_WORKSPACE/ \ && rm -rf ./libmovevm.dylib ./libcompiler.dylib ./minitiad - + - name: Release uses: softprops/action-gh-release@v2 with: files: | minimove_${{ env.VERSION }}_Darwin_${{ env.ARCH_NAME }}.tar.gz + env: + Version: ${{ env.VERSION }} + ARCH_NAME: ${{ env.ARCH_NAME }} diff --git a/.github/workflows/build-darwin-arm64.yml b/.github/workflows/build-darwin-arm64.yml index 3853919..9fab80a 100644 --- a/.github/workflows/build-darwin-arm64.yml +++ b/.github/workflows/build-darwin-arm64.yml @@ -1,4 +1,3 @@ - name: Build Darwin ARM64 on: @@ -15,7 +14,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.22.4' + go-version: "1.22.4" - name: Set environment variables run: | MINIMOVE_NETWORK_NAME="minimove-1" @@ -31,12 +30,12 @@ jobs: fi echo "VERSION=${VERSION}" >> $GITHUB_ENV echo "ARCH_NAME=aarch64" >> $GITHUB_ENV - + - name: Ensure dependencies run: | go mod tidy go get github.com/initia-labs/movevm@${MOVEVM_VERSION} - + - name: Print environment variables run: | echo "GOARCH=${GOARCH}" @@ -44,7 +43,7 @@ jobs: echo "VERSION=${VERSION}" echo "ARCH_NAME=${ARCH_NAME}" echo "MINIMOVE_NETWORK_NAME=${MINIMOVE_NETWORK_NAME}" - + - name: Build and Package for Darwin ARM64 run: | cd ../minimove \ @@ -55,9 +54,12 @@ jobs: && tar -czvf minimove_"$VERSION"_Darwin_"$ARCH_NAME".tar.gz minitiad libmovevm.dylib libcompiler.dylib \ && mv ./minimove_"$VERSION"_Darwin_"$ARCH_NAME".tar.gz $GITHUB_WORKSPACE/ \ && rm -rf ./libmovevm.dylib ./libcompiler.dylib ./minitiad - + - name: Release uses: softprops/action-gh-release@v2 with: files: | minimove_${{ env.VERSION }}_Darwin_${{ env.ARCH_NAME }}.tar.gz + env: + Version: ${{ env.VERSION }} + ARCH_NAME: ${{ env.ARCH_NAME }} diff --git a/.github/workflows/build-linux-amd64.yml b/.github/workflows/build-linux-amd64.yml index 2174add..ec8d137 100644 --- a/.github/workflows/build-linux-amd64.yml +++ b/.github/workflows/build-linux-amd64.yml @@ -1,8 +1,6 @@ - name: Build Linux AMD64 -on: - workflow_call +on: workflow_call jobs: build: @@ -14,7 +12,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.22.4' + go-version: "1.22.4" - name: Set environment variables run: | @@ -51,3 +49,6 @@ jobs: with: files: | ./build/minimove_${{ env.VERSION }}_Linux_${{ env.ARCH_NAME }}.tar.gz + env: + Version: ${{ env.VERSION }} + ARCH_NAME: ${{ env.ARCH_NAME }} diff --git a/.github/workflows/build-linux-arm64.yml b/.github/workflows/build-linux-arm64.yml index e940366..1c1c7f1 100644 --- a/.github/workflows/build-linux-arm64.yml +++ b/.github/workflows/build-linux-arm64.yml @@ -1,4 +1,3 @@ - name: Build Linux ARM64 on: @@ -32,7 +31,7 @@ jobs: fi echo "VERSION=${VERSION}" >> $GITHUB_ENV echo "ARCH_NAME=aarch64" >> $GITHUB_ENV - + - name: Build for ARM64 env: DOCKER_BUILDKIT: 1 @@ -71,9 +70,12 @@ jobs: - name: List files run: ls -l - + - name: Release uses: softprops/action-gh-release@v2 with: files: | - ./minimove_${{ env.VERSION }}_Linux_${{ env.ARCH_NAME }}.tar.gz + ./minimove_${{ env.VERSION }}_Linux_${{ env.ARCH_NAME }}.tar.gz + env: + Version: ${{ env.VERSION }} + ARCH_NAME: ${{ env.ARCH_NAME }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0884367..eea01e3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -51,8 +51,7 @@ jobs: - name: Build and push uses: docker/build-push-action@v4 with: - build-args: "GITHUB_ACCESS_TOKEN=${{ secrets.GH_READ_TOKEN }}" - file: images/private/Dockerfile + file: Dockerfile push: ${{ startsWith(github.ref, 'refs/tags') }} # push image only for tags tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b7f66a7..c722400 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,9 +23,6 @@ concurrency: jobs: golangci: env: - # for private repo access - GOPRIVATE: github.com/initia-labs - GITHUB_ACCESS_TOKEN: ${{ secrets.GH_READ_TOKEN }} GOLANGCI_LINT_VERSION: v1.59.1 name: golangci-lint runs-on: ubuntu-latest @@ -42,8 +39,6 @@ jobs: **/**.go go.mod go.sum - # for private repo access - - run: git config --global url.https://${GITHUB_ACCESS_TOKEN}:x-oauth-basic@github.com/.insteadOf https://github.com/ # install golangci-lint - run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} - name: run go linters (long) @@ -51,6 +46,8 @@ jobs: id: lint_long run: | make lint + env: + GIT_DIFF: ${{ env.GIT_DIFF }} - uses: technote-space/get-diff-action@v6.1.2 if: steps.lint_long.outcome == 'skipped' with: @@ -68,10 +65,6 @@ jobs: # Use --check or --exit-code when available (Go 1.19?) # https://github.com/golang/go/issues/27005 tidy: - env: - # for private repo access - GOPRIVATE: github.com/initia-labs,github.com/skip-mev/slinky - GITHUB_ACCESS_TOKEN: ${{ secrets.GH_READ_TOKEN }} runs-on: ubuntu-latest name: tidy steps: @@ -81,8 +74,6 @@ jobs: with: go-version: 1.22 check-latest: true - # for private repo access - - run: git config --global url.https://${GITHUB_ACCESS_TOKEN}:x-oauth-basic@github.com/.insteadOf https://github.com/ - run: | go mod tidy CHANGES_IN_REPO=$(git status --porcelain) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d8f335..fe8dfb5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,9 +22,6 @@ jobs: test-coverage-upload: name: Run test and upload codecov env: - # for private repo access - GOPRIVATE: github.com/initia-labs/* - GITHUB_ACCESS_TOKEN: ${{ secrets.GH_READ_TOKEN }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} runs-on: ubuntu-latest steps: @@ -40,8 +37,6 @@ jobs: **/**.go go.mod go.sum - # for private repo access - - run: git config --global url.https://${GITHUB_ACCESS_TOKEN}:x-oauth-basic@github.com/.insteadOf https://github.com/ - name: build run: | make build @@ -49,6 +44,8 @@ jobs: run: | go test ./... -mod=readonly -timeout 12m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' if: env.GIT_DIFF + env: + GIT_DIFF: ${{ env.GIT_DIFF }} # - name: filter out DONTCOVER # run: | # excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')" @@ -65,3 +62,5 @@ jobs: files: ./coverage.txt fail_ci_if_error: true if: env.GIT_DIFF + env: + GIT_DIFF: ${{ env.GIT_DIFF }} diff --git a/Dockerfile b/Dockerfile index 9721ea9..f3f160f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.22-alpine3.19 AS go-builder #ARG arch=x86_64 # See https://github.com/initia-labs/movevm/releases -ENV LIBMOVEVM_VERSION=v0.3.1 +ENV LIBMOVEVM_VERSION=v0.3.4 # this comes from standard alpine nightly file # https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile diff --git a/app/ante/ante.go b/app/ante/ante.go index dd1d236..56c4cf8 100644 --- a/app/ante/ante.go +++ b/app/ante/ante.go @@ -11,7 +11,7 @@ import ( opchildante "github.com/initia-labs/OPinit/x/opchild/ante" opchildtypes "github.com/initia-labs/OPinit/x/opchild/types" - initiaante "github.com/initia-labs/initia/app/ante" + accnumante "github.com/initia-labs/initia/app/ante/accnum" moveante "github.com/initia-labs/initia/x/move/ante" "github.com/skip-mev/block-sdk/v2/block" @@ -74,7 +74,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { } anteDecorators := []sdk.AnteDecorator{ - initiaante.NewAccountNumberDecorator(options.AccountKeeper), + accnumante.NewAccountNumberDecorator(options.AccountKeeper), ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), moveante.NewGasPricesDecorator(), diff --git a/app/hook/move.go b/app/hook/move.go index fc0c488..7e572eb 100644 --- a/app/hook/move.go +++ b/app/hook/move.go @@ -7,7 +7,6 @@ import ( "cosmossdk.io/core/address" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" movekeeper "github.com/initia-labs/initia/x/move/keeper" movetypes "github.com/initia-labs/initia/x/move/types" @@ -24,6 +23,41 @@ func NewMoveBridgeHook(ac address.Codec, moveKeeper *movekeeper.Keeper) MoveBrid } func (mbh MoveBridgeHook) Hook(ctx context.Context, sender sdk.AccAddress, msgBytes []byte) error { + isJSON, msgBytes, err := checkIsJSON(msgBytes) + if err != nil { + return err + } + + if isJSON { + return mbh.handleMsgExecuteJSON(ctx, sender, msgBytes) + } else { + return mbh.handleMsgExecute(ctx, sender, msgBytes) + } +} + +func checkIsJSON(msgBytes []byte) (bool, []byte, error) { + var jsonObj map[string]interface{} + err := json.Unmarshal(msgBytes, &jsonObj) + if err != nil { + return false, nil, err + } + + isJSON := false + if val, ok := jsonObj["is_json"]; ok && val == true { + isJSON = true + } + + // remove is_json field from json object for decoding + delete(jsonObj, "is_json") + bz, err := json.Marshal(jsonObj) + if err != nil { + return false, nil, err + } + + return isJSON, bz, nil +} + +func (mbh MoveBridgeHook) handleMsgExecute(ctx context.Context, sender sdk.AccAddress, msgBytes []byte) error { var msg movetypes.MsgExecute decoder := json.NewDecoder(strings.NewReader(string(msgBytes))) decoder.DisallowUnknownFields() @@ -32,11 +66,10 @@ func (mbh MoveBridgeHook) Hook(ctx context.Context, sender sdk.AccAddress, msgBy return err } - senderAddr, err := mbh.ac.StringToBytes(msg.Sender) + // overwrite sender with the actual sender + msg.Sender, err = mbh.ac.BytesToString(sender) if err != nil { return err - } else if !sender.Equals(sdk.AccAddress(senderAddr)) { - return sdkerrors.ErrUnauthorized } ms := movekeeper.NewMsgServerImpl(mbh.moveKeeper) @@ -44,3 +77,24 @@ func (mbh MoveBridgeHook) Hook(ctx context.Context, sender sdk.AccAddress, msgBy return err } + +func (mbh MoveBridgeHook) handleMsgExecuteJSON(ctx context.Context, sender sdk.AccAddress, msgBytes []byte) error { + var msg movetypes.MsgExecuteJSON + decoder := json.NewDecoder(strings.NewReader(string(msgBytes))) + decoder.DisallowUnknownFields() + err := decoder.Decode(&msg) + if err != nil { + return err + } + + // overwrite sender with the actual sender + msg.Sender, err = mbh.ac.BytesToString(sender) + if err != nil { + return err + } + + ms := movekeeper.NewMsgServerImpl(mbh.moveKeeper) + _, err = ms.ExecuteJSON(ctx, &msg) + + return err +} diff --git a/app/hook/move_test.go b/app/hook/move_test.go new file mode 100644 index 0000000..317b974 --- /dev/null +++ b/app/hook/move_test.go @@ -0,0 +1,27 @@ +package hook + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_checkIsJSON(t *testing.T) { + msgBz := []byte(`{"is_json": true, "hello": "world"}`) + isJSON, msgBz, err := checkIsJSON(msgBz) + require.NoError(t, err) + require.True(t, isJSON) + require.Equal(t, []byte(`{"hello":"world"}`), msgBz) + + msgBz = []byte(`{"is_json": false, "hello": "world"}`) + isJSON, msgBz, err = checkIsJSON(msgBz) + require.NoError(t, err) + require.False(t, isJSON) + require.Equal(t, []byte(`{"hello":"world"}`), msgBz) + + msgBz = []byte(`{"hello": "world"}`) + isJSON, msgBz, err = checkIsJSON(msgBz) + require.NoError(t, err) + require.False(t, isJSON) + require.Equal(t, []byte(`{"hello":"world"}`), msgBz) +} diff --git a/go.mod b/go.mod index 50db896..ad9a5e0 100644 --- a/go.mod +++ b/go.mod @@ -25,14 +25,14 @@ require ( github.com/cosmos/ibc-go/v8 v8.2.1 github.com/golang/mock v1.6.0 github.com/gorilla/mux v1.8.1 - github.com/initia-labs/OPinit v0.3.2 - github.com/initia-labs/initia v0.3.4 + github.com/initia-labs/OPinit v0.4.0 + github.com/initia-labs/initia v0.4.0 github.com/initia-labs/kvindexer v0.1.6 github.com/initia-labs/kvindexer/submodules/block v0.1.0 github.com/initia-labs/kvindexer/submodules/move-nft v0.1.4 github.com/initia-labs/kvindexer/submodules/pair v0.1.1 github.com/initia-labs/kvindexer/submodules/tx v0.1.0 - // we also need to update `LIBMOVEVM_VERSION` of images/private/Dockerfile#5 + // we also need to update `LIBMOVEVM_VERSION` of Dockerfile#5 github.com/initia-labs/movevm v0.3.4 github.com/noble-assets/forwarding/v2 v2.0.0-20240514101621-172acc02aac6 github.com/pkg/errors v0.9.1 @@ -162,7 +162,7 @@ require ( github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/initia-labs/OPinit/api v0.3.0 // indirect + github.com/initia-labs/OPinit/api v0.4.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/jsternberg/zap-logfmt v1.3.0 // indirect diff --git a/go.sum b/go.sum index 42727fd..f9bd5b5 100644 --- a/go.sum +++ b/go.sum @@ -792,16 +792,16 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/initia-labs/OPinit v0.3.2 h1:TeELD5GeSJJ9meY5b5YIXDdmCZt9kZOA2Chz+IwxUHc= -github.com/initia-labs/OPinit v0.3.2/go.mod h1:XlYsBFAKOFS6/wRIHB1vVbfonqX8QrC8cWK2GJvmX20= -github.com/initia-labs/OPinit/api v0.3.0 h1:OY8ijwmgZLoYwtw9LI1mSY3VC8PY+gtxJFitB6ZNFl4= -github.com/initia-labs/OPinit/api v0.3.0/go.mod h1:Xy/Nt3ubXLQ4zKn0m7RuQOM1sj8TVdlNNyek21TGYR0= +github.com/initia-labs/OPinit v0.4.0 h1:ICfZRbJ+KqgWt9z8seMl+6sRKbm40ELFvruvWh/KD40= +github.com/initia-labs/OPinit v0.4.0/go.mod h1:qu3h66dk3EF3Ehnr0bRuq0ezxzVKtQvy7G/waQFG9nM= +github.com/initia-labs/OPinit/api v0.4.0 h1:i3Cz5qPFpezeYh2R9TW2riPBb5tHwLOWOx3hrcWrM+o= +github.com/initia-labs/OPinit/api v0.4.0/go.mod h1:Xy/Nt3ubXLQ4zKn0m7RuQOM1sj8TVdlNNyek21TGYR0= github.com/initia-labs/cometbft v0.0.0-20240718082639-9128e8447bb7 h1:4HnN5bA8MP26KxP+NPgwLlA7NVlcM80gtzzO3sSK7KQ= github.com/initia-labs/cometbft v0.0.0-20240718082639-9128e8447bb7/go.mod h1:qGaJePRWAc2OL3OGNd//8fqgypCaFjmwZcy/cNner84= github.com/initia-labs/ibc-go/v8 v8.0.0-20240419124350-4275a05abe2c h1:FDwh5zZbm9v7C37ni4FytQQ9Os5XxYp1px5U7Nqdu2Y= github.com/initia-labs/ibc-go/v8 v8.0.0-20240419124350-4275a05abe2c/go.mod h1:wj3qx75iC/XNnsMqbPDCIGs0G6Y3E/lo3bdqCyoCy+8= -github.com/initia-labs/initia v0.3.4 h1:i2fwTx9WDwGp2nyX64r6jtdtgfJmRqKAXGdxbHBRg9s= -github.com/initia-labs/initia v0.3.4/go.mod h1:nwtnVe3obacErGb7w6tq8Ych3U0d2f59rsgpVUeMnmM= +github.com/initia-labs/initia v0.4.0 h1:iJeFK5uaHF90YFyKoPztUH2hem5eKDpz42kg2dqJYB8= +github.com/initia-labs/initia v0.4.0/go.mod h1:dWCjY44C38bLlyTPXdXxzdXLwh3X1bAsiARJ0jfVqDg= github.com/initia-labs/kvindexer v0.1.6 h1:RAnd89v/ZNtmsmBiD5ubBe1455UvIbH3dMxvPUYc5A8= github.com/initia-labs/kvindexer v0.1.6/go.mod h1:OV85HaQ9KVrg+zGPUlxT9RF9nAaM3Yq4/3MoHqGqhWk= github.com/initia-labs/kvindexer/submodules/block v0.1.0 h1:y+EXnksd/I2F96mzIoQA64nZUZON2P+99YrSzeLCLoY= diff --git a/images/README.md b/images/README.md deleted file mode 100644 index 071f555..0000000 --- a/images/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Specialized images for minitia - -## `private` - -Use a GitHub PAT (Personal Access Token) to access private git repos releases and git trees. -To be used for releases until repos become public. - -Build like: - -``` bash -docker build \ - -t minitiad \ - --build-arg LIBMOVEVM_VERSION=v1.0.0 \ - --build-arg GITHUB_ACCESS_TOKEN=$PAT \ - -f images/private/Dockerfile \ - . -``` diff --git a/images/private/Dockerfile b/images/private/Dockerfile deleted file mode 100644 index 31dcb67..0000000 --- a/images/private/Dockerfile +++ /dev/null @@ -1,59 +0,0 @@ -FROM golang:1.22-alpine3.19 AS go-builder -#ARG arch=x86_64 - -# See https://github.com/initia-labs/movevm/releases -ARG LIBMOVEVM_VERSION=v0.3.4 - -# this comes from standard alpine nightly file -# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile -# with some changes to support our toolchain, etc -RUN set -eux; apk add --no-cache ca-certificates build-base; - -RUN apk add git cmake -# NOTE: add these to run with LEDGER_ENABLED=true -# RUN apk add libusb-dev linux-headers - -WORKDIR /code -COPY . /code/ -# Install mimalloc -RUN git clone --depth 1 https://github.com/microsoft/mimalloc; cd mimalloc; mkdir build; cd build; cmake ..; make -j$(nproc); make install -ENV MIMALLOC_RESERVE_HUGE_OS_PAGES=4 - -# private ci access -ARG GITHUB_ACCESS_TOKEN -ENV GOPRIVATE=github.com/initia-labs/* -RUN git config --global url."https://${GITHUB_ACCESS_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/" - -# See https://github.com/initia-labs/movevm/releases -ADD https://github.com/gruntwork-io/fetch/releases/download/v0.4.6/fetch_linux_amd64 /usr/bin/fetch -RUN chmod +x /usr/bin/fetch -ENV GITHUB_OAUTH_TOKEN=$GITHUB_ACCESS_TOKEN -RUN fetch --repo="https://github.com/initia-labs/movevm" --tag="${LIBMOVEVM_VERSION}" --release-asset="libmovevm_muslc.*.a" /lib/ -RUN fetch --repo="https://github.com/initia-labs/movevm" --tag="${LIBMOVEVM_VERSION}" --release-asset="libcompiler_muslc.*.a" /lib/ -RUN cp /lib/libmovevm_muslc.`uname -m`.a /lib/libmovevm_muslc.a -RUN cp /lib/libcompiler_muslc.`uname -m`.a /lib/libcompiler_muslc.a - -# force it to use static lib (from above) not standard libmovevm.so and libcompiler.so file -RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LDFLAGS="-linkmode=external -extldflags \"-L/code/mimalloc/build -lmimalloc -Wl,-z,muldefs -static\"" make build - -FROM alpine:3.19 - -RUN addgroup minitia \ - && adduser -G minitia -D -h /minitia minitia - -WORKDIR /minitia - -COPY --from=go-builder /code/build/minitiad /usr/local/bin/minitiad - -USER minitia - -# rest server -EXPOSE 1317 -# grpc -EXPOSE 9090 -# tendermint p2p -EXPOSE 26656 -# tendermint rpc -EXPOSE 26657 - -CMD ["/usr/local/bin/minitiad", "version"] diff --git a/scripts/protocgen-pulsar.sh b/scripts/protocgen-pulsar.sh index 17b36ce..b453ac1 100644 --- a/scripts/protocgen-pulsar.sh +++ b/scripts/protocgen-pulsar.sh @@ -4,7 +4,7 @@ set -eo pipefail protoc_install_gopulsar() { go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1 } protoc_install_gopulsar From 34b2ce95b6e9245dfcaa1d6525f7e8ee5c2360a6 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Tue, 30 Jul 2024 15:12:09 +0900 Subject: [PATCH 2/2] update template --- .github/ISSUE_TEMPLATE/bug_report.md | 44 ++++++++--------------- .github/ISSUE_TEMPLATE/feature_request.md | 15 ++++---- 2 files changed, 22 insertions(+), 37 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d2c50df..4dbb73a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,38 +1,24 @@ --- name: Bug report -about: Create a report to help us improve (use this for suspected bugs only, if not sure, open a regular issue below) -title: '' -labels: Bug -assignees: '' +about: Create a report to help us improve +title: "" +labels: "" +assignees: "" --- - - - +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error **Expected behavior** +A clear and concise description of what you expected to happen. - - -**Actual behavior** - - - -**To reproduce** - - - -**System information** - - - - - - - - +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 2d56851..2bc5d5f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,20 +1,19 @@ --- name: Feature request about: Suggest an idea for this project -title: '' -labels: Feature -assignees: '' - +title: "" +labels: "" +assignees: "" --- **Is your feature request related to a problem? Please describe.** - +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** - +A clear and concise description of what you want to happen. **Describe alternatives you've considered** - +A clear and concise description of any alternative solutions or features you've considered. **Additional context** - +Add any other context or screenshots about the feature request here.