Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: scripts/tests.integration.sh
- name: Run e2e tests
shell: bash
run: scripts/run.sh 1.7.8
run: scripts/run.sh 1.7.10
env:
E2E: true
- name: Run GoReleaser for cross-platform builds
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ this to its logical conclusion).
[v0.0.1] [email protected]
[v0.0.2] [email protected]
[v0.0.3] [email protected]
[v0.0.4] [email protected]
```

## Introduction
Expand Down Expand Up @@ -628,23 +629,23 @@ If you have any questions, reach out to @\_patrickogrady on Twitter!

### Running a local network
[`scripts/run.sh`](scripts/run.sh) automatically installs [avalanchego], sets up a local network,
and creates a `spacesvm` genesis file. To build and run E2E tests, you need to set the variable `E2E` before it: `E2E=true ./scripts/run.sh 1.7.8`
and creates a `spacesvm` genesis file. To build and run E2E tests, you need to set the variable `E2E` before it: `E2E=true ./scripts/run.sh 1.7.10`

_See [`tests/e2e`](tests/e2e) and [`tests/runner`](tests/runner) to see how it's set up and how its client requests are made._

```bash
# to startup a local cluster (good for development)
cd ${HOME}/go/src/github.com/ava-labs/spacesvm
./scripts/run.sh 1.7.8
./scripts/run.sh 1.7.10

# to run full e2e tests and shut down cluster afterwards
cd ${HOME}/go/src/github.com/ava-labs/spacesvm
E2E=true ./scripts/run.sh 1.7.8
E2E=true ./scripts/run.sh 1.7.10
```

```bash
# inspect cluster endpoints when ready
cat /tmp/avalanchego-v1.7.8/output.yaml
cat /tmp/avalanchego-v1.7.10/output.yaml
<<COMMENT
endpoint: /ext/bc/2VCAhX6vE3UnXC6s1CBPE6jJ4c4cHWMfPgCptuWS59pQ9vbeLM
logsDir: ...
Expand Down
14 changes: 3 additions & 11 deletions cmd/spacesvm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/ava-labs/avalanchego/vms/rpcchainvm"
"github.com/ava-labs/spacesvm/cmd/spacesvm/version"
"github.com/ava-labs/spacesvm/vm"
"github.com/hashicorp/go-plugin"
log "github.com/inconshreveable/log15"
"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -54,17 +53,10 @@ func main() {
// TODO: serve separate endpoint for range query
// e.g., GET http://localhost/vm/foo returns "bar"
func runFunc(cmd *cobra.Command, args []string) error {
plugin.Serve(&plugin.ServeConfig{
HandshakeConfig: rpcchainvm.Handshake,
Plugins: map[string]plugin.Plugin{
"vm": rpcchainvm.New(&vm.VM{AirdropData: AirdropData}),
},
rpcchainvm.Serve(&vm.VM{AirdropData: AirdropData})

// A non-nil value here enables gRPC serving for this plugin...
GRPCServer: plugin.DefaultGRPCServer,
})

// Remove reference so VM can free when ready
// Remove airdrop reference so VM can free memory
AirdropData = nil

return nil
}
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ go 1.17
// go get -v github.com/onsi/ginkgo/[email protected]

require (
github.com/ava-labs/avalanchego v1.7.8
github.com/ava-labs/avalanchego v1.7.10
github.com/ethereum/go-ethereum v1.10.16
github.com/fatih/color v1.13.0
github.com/golang/mock v1.6.0
github.com/gorilla/rpc v1.2.0
github.com/hashicorp/go-plugin v1.4.3
github.com/inconshreveable/log15 v0.0.0-20201112154412-8562bdadbbac
github.com/onsi/ginkgo/v2 v2.1.0
github.com/onsi/gomega v1.17.0
Expand All @@ -28,7 +27,9 @@ require (
github.com/go-stack/stack v1.8.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/hashicorp/go-hclog v1.0.0 // indirect
github.com/hashicorp/go-plugin v1.4.3 // indirect
github.com/hashicorp/yamux v0.0.0-20200609203250-aecfd211c9ce // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/linxGnu/grocksdb v1.6.34 // indirect
Expand Down
Loading