Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: tm2 clean up against the latest main branch #1080

Merged
merged 4 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions .github/workflows/gnoland.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- gnokey
- gnoweb
- gnofaucet
- gnotxsync
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tm2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
go-version: [ "1.19.x", "1.20.x" ]
goarch: [ "amd64" ]
goos: [ "linux" ]
program: [ "./cmd/tm2txsync", "./pkg/amino/cmd/aminoscan", "./pkg/amino/cmd/goscan", "./pkg/autofile/cmd", "./pkg/iavl/cmd/iaviewer" ]
program: [ "./pkg/amino/cmd/aminoscan", "./pkg/amino/cmd/goscan", "./pkg/autofile/cmd", "./pkg/iavl/cmd/iaviewer" ]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
Expand All @@ -44,7 +44,6 @@ jobs:
- _test.pkg.amino
- _test.pkg.bft
- _test.pkg.others
- _test.cmds
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN go build -o ./build/gnokey ./gno.land/cmd/gnokey
RUN go build -o ./build/gnofaucet ./gno.land/cmd/gnofaucet
RUN go build -o ./build/gnoweb ./gno.land/cmd/gnoweb
RUN go build -o ./build/gno ./gnovm/cmd/gno
RUN go build -o ./build/tm2txsync ./tm2/cmd/tm2txsync
RUN go build -o ./build/gnotxsync ./gno.land/cmd/gnotxsync
RUN ls -la ./build
ADD . /opt/gno/src/
RUN rm -rf /opt/gno/src/.git
Expand Down Expand Up @@ -42,9 +42,9 @@ COPY --from=build /opt/build/build/gnofaucet /opt/gno/bin/
ENTRYPOINT ["gnofaucet"]
EXPOSE 5050

FROM runtime-tls AS tm2txsync-slim
COPY --from=build /opt/build/build/tm2txsync /opt/gno/bin/
ENTRYPOINT ["tm2txsync"]
FROM runtime-tls AS gnotxsync-slim
COPY --from=build /opt/build/build/gnotxsync /opt/gno/bin/
ENTRYPOINT ["gnotxsync"]

FROM runtime-tls AS gnoweb-slim
COPY --from=build /opt/build/build/gnoweb /opt/gno/bin/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Also, see the [quickstart guide](https://github.com/gnolang/gno/blob/master/exam
Developer commands:

* [gno](./gnovm/cmd/gno) - handy tool for developing gno packages & realms
* [tm2txsync](./tm2/cmd/tm2txsync) - importing/exporting transactions from local blockchain node storage
* [gnotxsync](./gno.land/cmd/gnotxsync) - importing/exporting transactions from local blockchain node storage
* [goscan](./misc/goscan) - dumps imports from specified file’s AST
* [genproto](./misc/genproto) - helper for generating .proto implementations
* [gnofaucet](./gno.land/cmd/gnofaucet) - serves GNOT faucet
Expand Down
2 changes: 1 addition & 1 deletion gno.land/cmd/gnoland/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"time"

"github.com/gnolang/gno/gno.land/pkg/gnoland"
vmm "github.com/gnolang/gno/gno.land/pkg/sdk/vm"
gno "github.com/gnolang/gno/gnovm/pkg/gnolang"
"github.com/gnolang/gno/gnovm/pkg/gnomod"
"github.com/gnolang/gno/tm2/pkg/amino"
Expand All @@ -21,7 +22,6 @@ import (
"github.com/gnolang/gno/tm2/pkg/crypto"
"github.com/gnolang/gno/tm2/pkg/log"
osm "github.com/gnolang/gno/tm2/pkg/os"
vmm "github.com/gnolang/gno/tm2/pkg/sdk/vm"
"github.com/gnolang/gno/tm2/pkg/std"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/gnolang/gno/tm2/pkg/commands"
"github.com/gnolang/gno/tm2/pkg/std"

_ "github.com/gnolang/gno/gno.land/pkg/sdk/vm"
_ "github.com/gnolang/gno/tm2/pkg/sdk/auth" // XXX better way?
_ "github.com/gnolang/gno/tm2/pkg/sdk/bank"
_ "github.com/gnolang/gno/tm2/pkg/sdk/vm"
)

type exportCfg struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"github.com/gnolang/gno/tm2/pkg/errors"
"github.com/gnolang/gno/tm2/pkg/std"

_ "github.com/gnolang/gno/gno.land/pkg/sdk/vm"
_ "github.com/gnolang/gno/tm2/pkg/sdk/auth" // XXX better way?
_ "github.com/gnolang/gno/tm2/pkg/sdk/bank"
_ "github.com/gnolang/gno/tm2/pkg/sdk/vm"
)

type importCfg struct {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion gno.land/cmd/gnoweb/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/gotuna/gotuna"

"github.com/gnolang/gno/gno.land/cmd/gnoweb/static" // for static files
"github.com/gnolang/gno/tm2/pkg/sdk/vm" // for error types
"github.com/gnolang/gno/gno.land/pkg/sdk/vm" // for error types
// "github.com/gnolang/gno/tm2/pkg/sdk" // for baseapp (info, status)
)

Expand Down
2 changes: 1 addition & 1 deletion gno.land/pkg/gnoland/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"path/filepath"
"strings"

"github.com/gnolang/gno/gno.land/pkg/sdk/vm"
"github.com/gnolang/gno/tm2/pkg/amino"
abci "github.com/gnolang/gno/tm2/pkg/bft/abci/types"
"github.com/gnolang/gno/tm2/pkg/crypto"
Expand All @@ -13,7 +14,6 @@ import (
"github.com/gnolang/gno/tm2/pkg/sdk"
"github.com/gnolang/gno/tm2/pkg/sdk/auth"
"github.com/gnolang/gno/tm2/pkg/sdk/bank"
"github.com/gnolang/gno/tm2/pkg/sdk/vm"
"github.com/gnolang/gno/tm2/pkg/std"
"github.com/gnolang/gno/tm2/pkg/store"
"github.com/gnolang/gno/tm2/pkg/store/dbadapter"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

var Package = amino.RegisterPackage(amino.NewPackage(
"github.com/gnolang/gno/tm2/pkg/sdk/vm",
"github.com/gnolang/gno/gno.land/pkg/sdk/vm",
"vm",
amino.GetCallersDirname(),
).WithDependencies(
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tm2/pkg/sdk/vm/vm.proto → gno.land/pkg/sdk/vm/vm.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package vm;

option go_package = "github.com/gnolang/gno/tm2/pkg/sdk/vm/pb";
option go_package = "github.com/gnolang/gno/gno.land/pkg/sdk/vm/pb";

// imports
import "github.com/gnolang/gno/tm2/pkg/std/std.proto";
Expand All @@ -28,4 +28,4 @@ message InvalidStmtError {
}

message InvalidExprError {
}
}
2 changes: 1 addition & 1 deletion gnovm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ GOTEST_FLAGS ?= -v -p 1 -timeout=30m

.PHONY: _test.cmd
_test.cmd:
go test ./cmd/... $(GOTEST_FLAGS)
go test ./cmd/gno/... $(GOTEST_FLAGS)
moul marked this conversation as resolved.
Show resolved Hide resolved

.PHONY: _test.pkg
_test.pkg:
Expand Down
2 changes: 1 addition & 1 deletion misc/docker-integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"time"

"github.com/gnolang/gno/gno.land/pkg/gnoland"
"github.com/gnolang/gno/gno.land/pkg/sdk/vm"
"github.com/gnolang/gno/tm2/pkg/amino"
"github.com/gnolang/gno/tm2/pkg/sdk/vm"
"github.com/gnolang/gno/tm2/pkg/std"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
Expand Down
2 changes: 1 addition & 1 deletion misc/genproto/genproto.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/gnolang/gno/tm2/pkg/commands"

// TODO: move these out.
"github.com/gnolang/gno/gno.land/pkg/sdk/vm"
gno "github.com/gnolang/gno/gnovm/pkg/gnolang"
abci "github.com/gnolang/gno/tm2/pkg/bft/abci/types"
"github.com/gnolang/gno/tm2/pkg/bft/blockchain"
Expand All @@ -25,7 +26,6 @@ import (
"github.com/gnolang/gno/tm2/pkg/crypto/multisig"
"github.com/gnolang/gno/tm2/pkg/sdk"
"github.com/gnolang/gno/tm2/pkg/sdk/bank"
"github.com/gnolang/gno/tm2/pkg/sdk/vm"
"github.com/gnolang/gno/tm2/pkg/std"
)

Expand Down
5 changes: 1 addition & 4 deletions tm2/Makefile
thehowl marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ help:
rundep=go run -modfile ../misc/devdeps/go.mod

.PHONY: build
build: _build.tm2txsync
_build.tools: _build.aminoscan _build.goscan _build.logjack _build.iaviewer

_build.tm2txsync:; go build -o build/tm2txsync ./cmd/tm2txsync
_build.aminoscan:; go build -o build/aminoscan ./pkg/amino/cmd/aminoscan
_build.goscan:; go build -o build/goscan ./pkg/amino/cmd/goscan
_build.logjack:; go build -o build/logjack ./pkg/autofile/cmd
Expand All @@ -36,7 +34,7 @@ lint:
########################################
# Test suite
.PHONY: test
test: _test.pkg.amino _test.pkg.bft _test.pkg.others _test.flappy _test.cmds
test: _test.pkg.amino _test.pkg.bft _test.pkg.others _test.flappy

_test.flappy:
# flappy tests should work "sometimes" (at least once).
Expand All @@ -48,4 +46,3 @@ GOTEST_FLAGS ?= -v -p 1 -timeout=30m
_test.pkg.others:; go test $(GOTEST_FLAGS) `go list ./pkg/... | grep -v pkg/amino/ | grep -v pkg/bft/`
_test.pkg.amino:; go test $(GOTEST_FLAGS) ./pkg/amino/...
_test.pkg.bft:; go test $(GOTEST_FLAGS) ./pkg/bft/...
_test.cmds:; go test $(GOTEST_FLAGS) ./cmd/...
2 changes: 1 addition & 1 deletion tm2/pkg/crypto/keys/client/addpkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"flag"
"fmt"

"github.com/gnolang/gno/gno.land/pkg/sdk/vm"
zivkovicmilos marked this conversation as resolved.
Show resolved Hide resolved
gno "github.com/gnolang/gno/gnovm/pkg/gnolang"
"github.com/gnolang/gno/tm2/pkg/amino"
"github.com/gnolang/gno/tm2/pkg/commands"
"github.com/gnolang/gno/tm2/pkg/crypto/keys"
"github.com/gnolang/gno/tm2/pkg/errors"
"github.com/gnolang/gno/tm2/pkg/sdk/vm"
"github.com/gnolang/gno/tm2/pkg/std"
)

Expand Down
2 changes: 1 addition & 1 deletion tm2/pkg/crypto/keys/client/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"flag"
"fmt"

"github.com/gnolang/gno/gno.land/pkg/sdk/vm"
"github.com/gnolang/gno/tm2/pkg/amino"
"github.com/gnolang/gno/tm2/pkg/commands"
"github.com/gnolang/gno/tm2/pkg/crypto/keys"
"github.com/gnolang/gno/tm2/pkg/errors"
"github.com/gnolang/gno/tm2/pkg/sdk/vm"
"github.com/gnolang/gno/tm2/pkg/std"
)

Expand Down
Loading