forked from TrueCloudLab/neoneo-go
Compare commits
3 commits
master
...
vm-default
Author | SHA1 | Date | |
---|---|---|---|
|
950f35de34 | ||
|
c3705664c2 | ||
|
e95d87779b |
26 changed files with 1592 additions and 119 deletions
32
.github/workflows/tests.yml
vendored
32
.github/workflows/tests.yml
vendored
|
@ -150,6 +150,38 @@ jobs:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
verbose: true
|
verbose: true
|
||||||
|
|
||||||
|
check_config:
|
||||||
|
name: Check Configuration Files
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version-file: 'go.mod'
|
||||||
|
|
||||||
|
- name: Build NeoGo
|
||||||
|
run: |
|
||||||
|
echo "=> Building binary"
|
||||||
|
export GOGC=off
|
||||||
|
export CGO_ENABLED=0
|
||||||
|
VERSION=$(git describe --tags --always || echo "untagged")
|
||||||
|
COMMIT=$(git rev-parse HEAD)
|
||||||
|
BUILD_FLAGS="-X main.Version=$VERSION -X main.Commit=$COMMIT"
|
||||||
|
BINARY_PATH="./neo-go"
|
||||||
|
go build -trimpath -v -ldflags "$BUILD_FLAGS" -o ${BINARY_PATH} ./cli/main.go
|
||||||
|
|
||||||
|
- name: Generate Configurations
|
||||||
|
run: |
|
||||||
|
./neo-go config generate --all
|
||||||
|
|
||||||
|
- name: Check for configuration changes
|
||||||
|
run: |
|
||||||
|
git diff --exit-code ./config || (echo "::error ::Configuration mismatch detected. Please update the configuration files:" && git diff ./config)
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
name: Run tests
|
name: Run tests
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
25
README.md
25
README.md
|
@ -75,15 +75,28 @@ The resulting binary is `bin/neo-go.exe`.
|
||||||
|
|
||||||
## Running a node
|
## Running a node
|
||||||
|
|
||||||
A node needs to connect to some network, either local one (usually referred to
|
Before running a Neo node, you need to generate the necessary configuration files
|
||||||
as `privnet`) or public (like `mainnet` or `testnet`). Network configuration
|
for the network you wish to connect to, such as a local network (`privnet`), or
|
||||||
is stored in a file and NeoGo allows you to store multiple files in one
|
a public network like `mainnet` or `testnet`. NeoGo stores network configuration
|
||||||
directory (`./config` by default) and easily switch between them using network
|
files in a directory (`./config` by default) and allows you to easily switch
|
||||||
flags.
|
between them using network flags.
|
||||||
|
|
||||||
To start Neo node on a private network, use:
|
### Initial Setup
|
||||||
|
|
||||||
|
First, generate the configuration files for all available networks:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./bin/neo-go config generate --all
|
||||||
```
|
```
|
||||||
|
|
||||||
|
This command will create configuration files for each network in
|
||||||
|
the `./config` directory. You need to run this step only once before the first run.
|
||||||
|
|
||||||
|
### Starting the Node
|
||||||
|
|
||||||
|
To start a Neo node on a private network, use:
|
||||||
|
|
||||||
|
```bash
|
||||||
./bin/neo-go node
|
./bin/neo-go node
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
|
nodeconfig "github.com/nspcc-dev/neo-go/cli/config"
|
||||||
"github.com/nspcc-dev/neo-go/cli/query"
|
"github.com/nspcc-dev/neo-go/cli/query"
|
||||||
"github.com/nspcc-dev/neo-go/cli/server"
|
"github.com/nspcc-dev/neo-go/cli/server"
|
||||||
"github.com/nspcc-dev/neo-go/cli/smartcontract"
|
"github.com/nspcc-dev/neo-go/cli/smartcontract"
|
||||||
|
@ -37,5 +38,6 @@ func New() *cli.App {
|
||||||
ctl.Commands = append(ctl.Commands, vm.NewCommands()...)
|
ctl.Commands = append(ctl.Commands, vm.NewCommands()...)
|
||||||
ctl.Commands = append(ctl.Commands, util.NewCommands()...)
|
ctl.Commands = append(ctl.Commands, util.NewCommands()...)
|
||||||
ctl.Commands = append(ctl.Commands, query.NewCommands()...)
|
ctl.Commands = append(ctl.Commands, query.NewCommands()...)
|
||||||
|
ctl.Commands = append(ctl.Commands, nodeconfig.NewCommands()...)
|
||||||
return ctl
|
return ctl
|
||||||
}
|
}
|
||||||
|
|
121
cli/config/config.go
Normal file
121
cli/config/config.go
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
package config
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neo-go/cli/cmdargs"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/config"
|
||||||
|
"github.com/urfave/cli"
|
||||||
|
"gopkg.in/yaml.v3"
|
||||||
|
)
|
||||||
|
|
||||||
|
// NewCommands returns 'config' command.
|
||||||
|
func NewCommands() []cli.Command {
|
||||||
|
return []cli.Command{
|
||||||
|
{
|
||||||
|
Name: "config",
|
||||||
|
Usage: "NeoGo node configuration management",
|
||||||
|
Subcommands: []cli.Command{
|
||||||
|
{
|
||||||
|
Name: "generate",
|
||||||
|
Usage: "generate configuration files",
|
||||||
|
UsageText: "neo-go config generate [--privnet | --mainnet | --testnet | --unit_testnet | --mainnet_neofs | --testnet_neofs | --docker | --all] [--config-path path]",
|
||||||
|
Action: configGenerate,
|
||||||
|
Flags: []cli.Flag{
|
||||||
|
cli.BoolFlag{Name: "privnet, p", Usage: "generate private network configuration"},
|
||||||
|
cli.BoolFlag{Name: "mainnet, m", Usage: "generate mainnet network configuration"},
|
||||||
|
cli.BoolFlag{Name: "testnet, t", Usage: "generate testnet network configuration"},
|
||||||
|
cli.BoolFlag{Name: "unit_testnet", Usage: "generate unit test network configuration"},
|
||||||
|
cli.BoolFlag{Name: "mainnet_neofs", Usage: "generate mainnet NeoFS network configuration"},
|
||||||
|
cli.BoolFlag{Name: "testnet_neofs", Usage: "generate testnet NeoFS network configuration"},
|
||||||
|
cli.BoolFlag{Name: "docker", Usage: "generate Docker configuration"},
|
||||||
|
cli.BoolFlag{Name: "all", Usage: "generate all networks configurations"},
|
||||||
|
cli.StringFlag{Name: "config-path", Usage: "path to the directory where configuration files will be generated"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func configGenerate(ctx *cli.Context) error {
|
||||||
|
if err := cmdargs.EnsureNone(ctx); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
filesToGenerate := make(map[string]config.Config)
|
||||||
|
|
||||||
|
if ctx.Bool("all") {
|
||||||
|
filesToGenerate = map[string]config.Config{
|
||||||
|
"protocol.mainnet.yml": Mainnet,
|
||||||
|
"protocol.mainnet.neofs.yml": MainnetNeoFS,
|
||||||
|
"protocol.testnet.yml": Testnet,
|
||||||
|
"protocol.testnet.neofs.yml": TestnetNeoFS,
|
||||||
|
"protocol.unit_testnet.yml": UnitTestnet,
|
||||||
|
"protocol.unit_testnet.single.yml": UnitTestnetSingle,
|
||||||
|
"protocol.privnet.docker.one.yml": PrivnetDockerOne,
|
||||||
|
"protocol.privnet.docker.two.yml": PrivnetDockerTwo,
|
||||||
|
"protocol.privnet.docker.three.yml": PrivnetDockerThree,
|
||||||
|
"protocol.privnet.docker.four.yml": PrivnetDockerFour,
|
||||||
|
"protocol.privnet.docker.single.yml": PrivnetDockerSingle,
|
||||||
|
"protocol.privnet.yml": Privnet,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ctx.Bool("privnet") {
|
||||||
|
filesToGenerate["protocol.privnet.yml"] = Privnet
|
||||||
|
}
|
||||||
|
if ctx.Bool("mainnet") {
|
||||||
|
filesToGenerate["protocol.mainnet.yml"] = Mainnet
|
||||||
|
}
|
||||||
|
if ctx.Bool("testnet") {
|
||||||
|
filesToGenerate["protocol.testnet.yml"] = Testnet
|
||||||
|
}
|
||||||
|
if ctx.Bool("unit_testnet") {
|
||||||
|
filesToGenerate["protocol.unit_testnet.yml"] = UnitTestnet
|
||||||
|
filesToGenerate["protocol.unit_testnet.single.yml"] = UnitTestnetSingle
|
||||||
|
}
|
||||||
|
if ctx.Bool("mainnet_neofs") {
|
||||||
|
filesToGenerate["protocol.mainnet.neofs.yml"] = MainnetNeoFS
|
||||||
|
}
|
||||||
|
if ctx.Bool("testnet_neofs") {
|
||||||
|
filesToGenerate["protocol.testnet.neofs.yml"] = TestnetNeoFS
|
||||||
|
}
|
||||||
|
if ctx.Bool("docker") {
|
||||||
|
filesToGenerate["protocol.privnet.docker.one.yml"] = PrivnetDockerOne
|
||||||
|
filesToGenerate["protocol.privnet.docker.two.yml"] = PrivnetDockerTwo
|
||||||
|
filesToGenerate["protocol.privnet.docker.three.yml"] = PrivnetDockerThree
|
||||||
|
filesToGenerate["protocol.privnet.docker.four.yml"] = PrivnetDockerFour
|
||||||
|
filesToGenerate["protocol.privnet.docker.single.yml"] = PrivnetDockerSingle
|
||||||
|
}
|
||||||
|
}
|
||||||
|
configDir := ctx.String("config-path")
|
||||||
|
if configDir == "" {
|
||||||
|
configDir = "config"
|
||||||
|
}
|
||||||
|
if err := os.MkdirAll(configDir, 0755); err != nil {
|
||||||
|
return cli.NewExitError(fmt.Errorf("unable to create configuration directory: %w", err), 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
for fileName, cfg := range filesToGenerate {
|
||||||
|
if err := writeConfigToFile(cfg, filepath.Join(configDir, fileName)); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func writeConfigToFile(cfg config.Config, filename string) error {
|
||||||
|
file, err := os.Create(filename)
|
||||||
|
if err != nil {
|
||||||
|
return cli.NewExitError(fmt.Errorf("failed to create file %s: %w", filename, err), 1)
|
||||||
|
}
|
||||||
|
defer file.Close()
|
||||||
|
|
||||||
|
encoder := yaml.NewEncoder(file)
|
||||||
|
if err := encoder.Encode(cfg); err != nil {
|
||||||
|
return cli.NewExitError(fmt.Errorf("failed to encode configuration to file %s: %w", filename, err), 1)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
127
cli/config/mainnet.go
Normal file
127
cli/config/mainnet.go
Normal file
|
@ -0,0 +1,127 @@
|
||||||
|
package config
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/config"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/core/storage/dbconfig"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Mainnet is the configuration for the Neo N3 mainnet.
|
||||||
|
var Mainnet = config.Config{
|
||||||
|
ProtocolConfiguration: config.ProtocolConfiguration{
|
||||||
|
Magic: 860833102,
|
||||||
|
MaxTraceableBlocks: 2102400,
|
||||||
|
InitialGASSupply: 52000000,
|
||||||
|
TimePerBlock: 15 * time.Second,
|
||||||
|
MemPoolSize: 50000,
|
||||||
|
StandbyCommittee: []string{
|
||||||
|
"03b209fd4f53a7170ea4444e0cb0a6bb6a53c2bd016926989cf85f9b0fba17a70c",
|
||||||
|
"02df48f60e8f3e01c48ff40b9b7f1310d7a8b2a193188befe1c2e3df740e895093",
|
||||||
|
"03b8d9d5771d8f513aa0869b9cc8d50986403b78c6da36890638c3d46a5adce04a",
|
||||||
|
"02ca0e27697b9c248f6f16e085fd0061e26f44da85b58ee835c110caa5ec3ba554",
|
||||||
|
"024c7b7fb6c310fccf1ba33b082519d82964ea93868d676662d4a59ad548df0e7d",
|
||||||
|
"02aaec38470f6aad0042c6e877cfd8087d2676b0f516fddd362801b9bd3936399e",
|
||||||
|
"02486fd15702c4490a26703112a5cc1d0923fd697a33406bd5a1c00e0013b09a70",
|
||||||
|
"023a36c72844610b4d34d1968662424011bf783ca9d984efa19a20babf5582f3fe",
|
||||||
|
"03708b860c1de5d87f5b151a12c2a99feebd2e8b315ee8e7cf8aa19692a9e18379",
|
||||||
|
"03c6aa6e12638b36e88adc1ccdceac4db9929575c3e03576c617c49cce7114a050",
|
||||||
|
"03204223f8c86b8cd5c89ef12e4f0dbb314172e9241e30c9ef2293790793537cf0",
|
||||||
|
"02a62c915cf19c7f19a50ec217e79fac2439bbaad658493de0c7d8ffa92ab0aa62",
|
||||||
|
"03409f31f0d66bdc2f70a9730b66fe186658f84a8018204db01c106edc36553cd0",
|
||||||
|
"0288342b141c30dc8ffcde0204929bb46aed5756b41ef4a56778d15ada8f0c6654",
|
||||||
|
"020f2887f41474cfeb11fd262e982051c1541418137c02a0f4961af911045de639",
|
||||||
|
"0222038884bbd1d8ff109ed3bdef3542e768eef76c1247aea8bc8171f532928c30",
|
||||||
|
"03d281b42002647f0113f36c7b8efb30db66078dfaaa9ab3ff76d043a98d512fde",
|
||||||
|
"02504acbc1f4b3bdad1d86d6e1a08603771db135a73e61c9d565ae06a1938cd2ad",
|
||||||
|
"0226933336f1b75baa42d42b71d9091508b638046d19abd67f4e119bf64a7cfb4d",
|
||||||
|
"03cdcea66032b82f5c30450e381e5295cae85c5e6943af716cc6b646352a6067dc",
|
||||||
|
"02cd5a5547119e24feaa7c2a0f37b8c9366216bab7054de0065c9be42084003c8a",
|
||||||
|
},
|
||||||
|
ValidatorsCount: 7,
|
||||||
|
VerifyTransactions: false,
|
||||||
|
P2PSigExtensions: false,
|
||||||
|
Hardforks: map[string]uint32{
|
||||||
|
"Aspidochelone": 1730000,
|
||||||
|
"Basilisk": 4120000,
|
||||||
|
"Cockatrice": 5450000,
|
||||||
|
},
|
||||||
|
SeedList: []string{
|
||||||
|
"seed1.neo.org:10333",
|
||||||
|
"seed2.neo.org:10333",
|
||||||
|
"seed3.neo.org:10333",
|
||||||
|
"seed4.neo.org:10333",
|
||||||
|
"seed5.neo.org:10333",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
ApplicationConfiguration: config.ApplicationConfiguration{
|
||||||
|
Ledger: config.Ledger{
|
||||||
|
SkipBlockVerification: false,
|
||||||
|
},
|
||||||
|
// LogPath could be set up in case you need stdout logs to some proper file.
|
||||||
|
// LogPath: "./log/neogo.log"
|
||||||
|
DBConfiguration: dbconfig.DBConfiguration{
|
||||||
|
Type: dbconfig.LevelDB, // Other options: 'inmemory','boltdb'
|
||||||
|
// DB type options. Uncomment those you need in case you want to switch DB type.
|
||||||
|
LevelDBOptions: dbconfig.LevelDBOptions{
|
||||||
|
DataDirectoryPath: "./chains/mainnet",
|
||||||
|
// BoltDBOptions:
|
||||||
|
// FilePath: "./chains/mainnet.bolt"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
P2P: config.P2P{
|
||||||
|
Addresses: []string{":10333"}, // in form of "[host]:[port][:announcedPort]"
|
||||||
|
DialTimeout: 3000 * time.Millisecond,
|
||||||
|
ProtoTickInterval: 2000 * time.Millisecond,
|
||||||
|
PingInterval: 30000 * time.Millisecond,
|
||||||
|
PingTimeout: 90000 * time.Millisecond,
|
||||||
|
MaxPeers: 100,
|
||||||
|
MinPeers: 10,
|
||||||
|
AttemptConnPeers: 20,
|
||||||
|
},
|
||||||
|
Relay: true,
|
||||||
|
Consensus: config.Consensus{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/cn_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Oracle: config.OracleConfiguration{
|
||||||
|
Enabled: false,
|
||||||
|
AllowedContentTypes: []string{
|
||||||
|
"application/json",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
P2PNotary: config.P2PNotary{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/notary_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
RPC: config.RPC{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":10332"}},
|
||||||
|
MaxGasInvoke: 15,
|
||||||
|
EnableCORSWorkaround: false,
|
||||||
|
TLSConfig: config.TLS{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":10331"}},
|
||||||
|
CertFile: "serv.crt",
|
||||||
|
KeyFile: "serv.key",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Prometheus: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":2112"},
|
||||||
|
},
|
||||||
|
Pprof: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":2113"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
96
cli/config/mainnet_neofs.go
Normal file
96
cli/config/mainnet_neofs.go
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
package config
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/config"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/core/storage/dbconfig"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MainnetNeoFS is the configuration for the NeoFS mainnet.
|
||||||
|
var MainnetNeoFS = config.Config{
|
||||||
|
ProtocolConfiguration: config.ProtocolConfiguration{
|
||||||
|
Magic: 91414437,
|
||||||
|
MaxTraceableBlocks: 2102400,
|
||||||
|
InitialGASSupply: 52000000,
|
||||||
|
TimePerBlock: 15 * time.Second,
|
||||||
|
MemPoolSize: 50000,
|
||||||
|
StandbyCommittee: []string{
|
||||||
|
"026fa34ec057d74c2fdf1a18e336d0bd597ea401a0b2ad57340d5c220d09f44086",
|
||||||
|
"039a9db2a30942b1843db673aeb0d4fd6433f74cec1d879de6343cb9fcf7628fa4",
|
||||||
|
"0366d255e7ce23ea6f7f1e4bedf5cbafe598705b47e6ec213ef13b2f0819e8ab33",
|
||||||
|
"023f9cb7bbe154d529d5c719fdc39feaa831a43ae03d2a4280575b60f52fa7bc52",
|
||||||
|
"039ba959e0ab6dc616df8b803692f1c30ba9071b76b05535eb994bf5bbc402ad5f",
|
||||||
|
"035a2a18cddafa25ad353dea5e6730a1b9fcb4b918c4a0303c4387bb9c3b816adf",
|
||||||
|
"031f4d9c66f2ec348832c48fd3a16dfaeb59e85f557ae1e07f6696d0375c64f97b",
|
||||||
|
},
|
||||||
|
ValidatorsCount: 7,
|
||||||
|
VerifyTransactions: true,
|
||||||
|
P2PSigExtensions: true,
|
||||||
|
Hardforks: map[string]uint32{
|
||||||
|
"Aspidochelone": 3000000,
|
||||||
|
"Basilisk": 4500000,
|
||||||
|
"Cockatrice": 5800000,
|
||||||
|
},
|
||||||
|
SeedList: []string{
|
||||||
|
"morph1.fs.neo.org:40333",
|
||||||
|
"morph2.fs.neo.org:40333",
|
||||||
|
"morph3.fs.neo.org:40333",
|
||||||
|
"morph4.fs.neo.org:40333",
|
||||||
|
"morph5.fs.neo.org:40333",
|
||||||
|
"morph6.fs.neo.org:40333",
|
||||||
|
"morph7.fs.neo.org:40333",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
ApplicationConfiguration: config.ApplicationConfiguration{
|
||||||
|
DBConfiguration: dbconfig.DBConfiguration{
|
||||||
|
Type: dbconfig.LevelDB,
|
||||||
|
LevelDBOptions: dbconfig.LevelDBOptions{
|
||||||
|
DataDirectoryPath: "./chains/mainnet.neofs",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
P2P: config.P2P{
|
||||||
|
Addresses: []string{":40333"},
|
||||||
|
DialTimeout: 3 * time.Second,
|
||||||
|
ProtoTickInterval: 2 * time.Second,
|
||||||
|
PingInterval: 30 * time.Second,
|
||||||
|
PingTimeout: 90 * time.Second,
|
||||||
|
MaxPeers: 100,
|
||||||
|
MinPeers: 5,
|
||||||
|
AttemptConnPeers: 20,
|
||||||
|
},
|
||||||
|
Relay: true,
|
||||||
|
Consensus: config.Consensus{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/cn_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
RPC: config.RPC{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":40332"},
|
||||||
|
},
|
||||||
|
MaxGasInvoke: 15,
|
||||||
|
EnableCORSWorkaround: false,
|
||||||
|
TLSConfig: config.TLS{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":40331"},
|
||||||
|
},
|
||||||
|
CertFile: "serv.crt",
|
||||||
|
KeyFile: "serv.key",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Prometheus: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":2112"},
|
||||||
|
},
|
||||||
|
Pprof: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":2113"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
101
cli/config/privnet.go
Normal file
101
cli/config/privnet.go
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
package config
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/config"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/core/storage/dbconfig"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Privnet is the configuration for the Neo N3 privnet.
|
||||||
|
var Privnet = config.Config{
|
||||||
|
ProtocolConfiguration: config.ProtocolConfiguration{
|
||||||
|
Magic: 56753,
|
||||||
|
MaxTraceableBlocks: 200000,
|
||||||
|
TimePerBlock: 15 * time.Second,
|
||||||
|
MemPoolSize: 50000,
|
||||||
|
StandbyCommittee: []string{
|
||||||
|
"02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2",
|
||||||
|
"02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e",
|
||||||
|
"03d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee699",
|
||||||
|
"02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62",
|
||||||
|
},
|
||||||
|
ValidatorsCount: 4,
|
||||||
|
VerifyTransactions: true,
|
||||||
|
P2PSigExtensions: false,
|
||||||
|
SeedList: []string{
|
||||||
|
"localhost:20333",
|
||||||
|
"localhost:20334",
|
||||||
|
"localhost:20335",
|
||||||
|
"localhost:20336",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
ApplicationConfiguration: config.ApplicationConfiguration{
|
||||||
|
Ledger: config.Ledger{
|
||||||
|
SkipBlockVerification: false},
|
||||||
|
// LogPath could be set up in case you need stdout logs to some proper file.
|
||||||
|
// LogPath: "./log/neogo.log"
|
||||||
|
DBConfiguration: dbconfig.DBConfiguration{
|
||||||
|
Type: dbconfig.LevelDB,
|
||||||
|
// Other options: 'inmemory','boltdb'
|
||||||
|
// DB type options. Uncomment those you need in case you want to switch DB type.
|
||||||
|
LevelDBOptions: dbconfig.LevelDBOptions{
|
||||||
|
DataDirectoryPath: "./chains/privnet",
|
||||||
|
// BoltDBOptions:
|
||||||
|
// FilePath: "./chains/privnet.bolt"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
P2P: config.P2P{
|
||||||
|
Addresses: []string{":20332"}, // In form of "[host]:[port][:announcedPort]"
|
||||||
|
DialTimeout: 3 * time.Second,
|
||||||
|
ProtoTickInterval: 2 * time.Second,
|
||||||
|
PingInterval: 30 * time.Second,
|
||||||
|
PingTimeout: 90 * time.Second,
|
||||||
|
MaxPeers: 10,
|
||||||
|
AttemptConnPeers: 5,
|
||||||
|
MinPeers: 3,
|
||||||
|
},
|
||||||
|
Relay: true,
|
||||||
|
Consensus: config.Consensus{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/cn_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
P2PNotary: config.P2PNotary{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/notary_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
RPC: config.RPC{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":20331"},
|
||||||
|
},
|
||||||
|
MaxGasInvoke: 15,
|
||||||
|
EnableCORSWorkaround: false,
|
||||||
|
SessionEnabled: true,
|
||||||
|
SessionExpirationTime: 180, // Higher expiration time for manual requests and tests.
|
||||||
|
TLSConfig: config.TLS{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":20330"},
|
||||||
|
},
|
||||||
|
CertFile: "serv.crt",
|
||||||
|
KeyFile: "serv.key",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Prometheus: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":2112"},
|
||||||
|
},
|
||||||
|
Pprof: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":2113"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
492
cli/config/privnet_docker.go
Normal file
492
cli/config/privnet_docker.go
Normal file
|
@ -0,0 +1,492 @@
|
||||||
|
package config
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/config"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/core/storage/dbconfig"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PrivnetDockerOne is the configuration for the first node in the Dockerized private network.
|
||||||
|
var PrivnetDockerOne = config.Config{
|
||||||
|
ProtocolConfiguration: config.ProtocolConfiguration{
|
||||||
|
Magic: 56753,
|
||||||
|
MaxTraceableBlocks: 200000,
|
||||||
|
TimePerBlock: 15 * time.Second,
|
||||||
|
MemPoolSize: 50000,
|
||||||
|
StandbyCommittee: []string{
|
||||||
|
"02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2",
|
||||||
|
"02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e",
|
||||||
|
"03d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee699",
|
||||||
|
"02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62",
|
||||||
|
},
|
||||||
|
ValidatorsCount: 4,
|
||||||
|
VerifyTransactions: true,
|
||||||
|
P2PSigExtensions: false,
|
||||||
|
SeedList: []string{
|
||||||
|
"node_one:20333",
|
||||||
|
"node_two:20334",
|
||||||
|
"node_three:20335",
|
||||||
|
"node_four:20336",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
ApplicationConfiguration: config.ApplicationConfiguration{
|
||||||
|
Ledger: config.Ledger{SkipBlockVerification: false},
|
||||||
|
// LogPath: "./log/neogo.log"
|
||||||
|
DBConfiguration: dbconfig.DBConfiguration{
|
||||||
|
Type: dbconfig.LevelDB, // Change DB type if required. Other options: 'inmemory','boltdb'
|
||||||
|
LevelDBOptions: dbconfig.LevelDBOptions{
|
||||||
|
DataDirectoryPath: "/chains/one",
|
||||||
|
},
|
||||||
|
// BoltDBOptions: dbconfig.BoltDBOptions{
|
||||||
|
// FilePath: "./chains/privnet.bolt"
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
P2P: config.P2P{
|
||||||
|
Addresses: []string{":20333"}, // Standard port configuration for this environment
|
||||||
|
DialTimeout: 3 * time.Second,
|
||||||
|
ProtoTickInterval: 2 * time.Second,
|
||||||
|
PingInterval: 30 * time.Second,
|
||||||
|
PingTimeout: 90 * time.Second,
|
||||||
|
MaxPeers: 10,
|
||||||
|
AttemptConnPeers: 5,
|
||||||
|
MinPeers: 2,
|
||||||
|
},
|
||||||
|
Relay: true,
|
||||||
|
Oracle: config.OracleConfiguration{
|
||||||
|
Enabled: false,
|
||||||
|
AllowedContentTypes: []string{
|
||||||
|
"application/json",
|
||||||
|
},
|
||||||
|
Nodes: []string{
|
||||||
|
"http://node_one:30333",
|
||||||
|
"http://node_two:30334",
|
||||||
|
"http://node_three:30335",
|
||||||
|
"http://node_four:30336",
|
||||||
|
},
|
||||||
|
RequestTimeout: 5 * time.Second,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/wallet1.json",
|
||||||
|
Password: "one",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
RPC: config.RPC{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":30333"},
|
||||||
|
},
|
||||||
|
MaxGasInvoke: 15,
|
||||||
|
EnableCORSWorkaround: false,
|
||||||
|
SessionEnabled: true,
|
||||||
|
},
|
||||||
|
P2PNotary: config.P2PNotary{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/notary_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Prometheus: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":20001"},
|
||||||
|
},
|
||||||
|
Pprof: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":20011"},
|
||||||
|
},
|
||||||
|
Consensus: config.Consensus{
|
||||||
|
Enabled: true,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/wallet1.json",
|
||||||
|
Password: "one",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// PrivnetDockerTwo is the configuration for the second node in the Dockerized private network.
|
||||||
|
var PrivnetDockerTwo = config.Config{
|
||||||
|
ProtocolConfiguration: config.ProtocolConfiguration{
|
||||||
|
Magic: 56753,
|
||||||
|
MaxTraceableBlocks: 200000,
|
||||||
|
TimePerBlock: 15 * time.Second,
|
||||||
|
MemPoolSize: 50000,
|
||||||
|
StandbyCommittee: []string{
|
||||||
|
"02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2",
|
||||||
|
"02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e",
|
||||||
|
"03d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee699",
|
||||||
|
"02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62",
|
||||||
|
},
|
||||||
|
ValidatorsCount: 4,
|
||||||
|
SeedList: []string{
|
||||||
|
"node_one:20333",
|
||||||
|
"node_two:20334",
|
||||||
|
"node_three:20335",
|
||||||
|
"node_four:20336",
|
||||||
|
},
|
||||||
|
VerifyTransactions: true,
|
||||||
|
P2PSigExtensions: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
ApplicationConfiguration: config.ApplicationConfiguration{
|
||||||
|
Ledger: config.Ledger{SkipBlockVerification: false},
|
||||||
|
// LogPath could be set up in case you need stdout logs to some proper file.
|
||||||
|
// LogPath: "./log/neogo.log"
|
||||||
|
DBConfiguration: dbconfig.DBConfiguration{
|
||||||
|
Type: dbconfig.LevelDB, // other options: 'inmemory','boltdb'
|
||||||
|
// DB type options. Uncomment those you need in case you want to switch DB type.
|
||||||
|
LevelDBOptions: dbconfig.LevelDBOptions{
|
||||||
|
DataDirectoryPath: "/chains/two",
|
||||||
|
},
|
||||||
|
// BoltDBOptions:
|
||||||
|
// FilePath: "./chains/privnet.bolt"
|
||||||
|
},
|
||||||
|
P2P: config.P2P{
|
||||||
|
Addresses: []string{":20334"}, // in form of "[host]:[port][:announcedPort]"
|
||||||
|
DialTimeout: 3 * time.Second,
|
||||||
|
ProtoTickInterval: 2 * time.Second,
|
||||||
|
PingInterval: 30 * time.Second,
|
||||||
|
PingTimeout: 90 * time.Second,
|
||||||
|
MaxPeers: 10,
|
||||||
|
AttemptConnPeers: 5,
|
||||||
|
MinPeers: 2,
|
||||||
|
},
|
||||||
|
Relay: true,
|
||||||
|
Oracle: config.OracleConfiguration{
|
||||||
|
Enabled: false,
|
||||||
|
AllowedContentTypes: []string{
|
||||||
|
"application/json",
|
||||||
|
},
|
||||||
|
Nodes: []string{
|
||||||
|
"http://node_one:30333",
|
||||||
|
"http://node_two:30334",
|
||||||
|
"http://node_three:30335",
|
||||||
|
"http://node_four:30336",
|
||||||
|
},
|
||||||
|
RequestTimeout: 5 * time.Second,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/wallet2.json",
|
||||||
|
Password: "two",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
RPC: config.RPC{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":30334"}},
|
||||||
|
MaxGasInvoke: 15,
|
||||||
|
EnableCORSWorkaround: false,
|
||||||
|
SessionEnabled: true,
|
||||||
|
},
|
||||||
|
P2PNotary: config.P2PNotary{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/notary_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Prometheus: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":20002"},
|
||||||
|
},
|
||||||
|
Pprof: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":20012"},
|
||||||
|
},
|
||||||
|
Consensus: config.Consensus{
|
||||||
|
Enabled: true,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/wallet2.json",
|
||||||
|
Password: "two",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// PrivnetDockerThree is the configuration for the third node in the Dockerized private network.
|
||||||
|
var PrivnetDockerThree = config.Config{
|
||||||
|
ProtocolConfiguration: config.ProtocolConfiguration{
|
||||||
|
Magic: 56753,
|
||||||
|
MaxTraceableBlocks: 200000,
|
||||||
|
TimePerBlock: 15 * time.Second,
|
||||||
|
MemPoolSize: 50000,
|
||||||
|
StandbyCommittee: []string{
|
||||||
|
"02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2",
|
||||||
|
"02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e",
|
||||||
|
"03d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee699",
|
||||||
|
"02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62",
|
||||||
|
},
|
||||||
|
ValidatorsCount: 4,
|
||||||
|
VerifyTransactions: true,
|
||||||
|
P2PSigExtensions: false,
|
||||||
|
SeedList: []string{
|
||||||
|
"node_one:20333",
|
||||||
|
"node_two:20334",
|
||||||
|
"node_three:20335",
|
||||||
|
"node_four:20336",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
ApplicationConfiguration: config.ApplicationConfiguration{
|
||||||
|
Ledger: config.Ledger{
|
||||||
|
SkipBlockVerification: false},
|
||||||
|
// LogPath could be set up in case you need stdout logs to some proper file.
|
||||||
|
// LogPath: "./log/neogo.log"
|
||||||
|
DBConfiguration: dbconfig.DBConfiguration{
|
||||||
|
Type: dbconfig.LevelDB, // other options: 'inmemory','boltdb'
|
||||||
|
// DB type options. Uncomment those you need in case you want to switch DB type.
|
||||||
|
LevelDBOptions: dbconfig.LevelDBOptions{
|
||||||
|
DataDirectoryPath: "/chains/three",
|
||||||
|
},
|
||||||
|
// BoltDBOptions:
|
||||||
|
// FilePath: "./chains/privnet.bolt"
|
||||||
|
},
|
||||||
|
P2P: config.P2P{
|
||||||
|
Addresses: []string{":20335"}, // in form of "[host]:[port][:announcedPort]"
|
||||||
|
DialTimeout: 3 * time.Second,
|
||||||
|
ProtoTickInterval: 2 * time.Second,
|
||||||
|
PingInterval: 30 * time.Second,
|
||||||
|
PingTimeout: 90 * time.Second,
|
||||||
|
MaxPeers: 10,
|
||||||
|
AttemptConnPeers: 5,
|
||||||
|
MinPeers: 2,
|
||||||
|
},
|
||||||
|
Relay: true,
|
||||||
|
Oracle: config.OracleConfiguration{
|
||||||
|
Enabled: false,
|
||||||
|
AllowedContentTypes: []string{
|
||||||
|
"application/json",
|
||||||
|
},
|
||||||
|
Nodes: []string{
|
||||||
|
"http://node_one:30333",
|
||||||
|
"http://node_two:30334",
|
||||||
|
"http://node_three:30335",
|
||||||
|
"http://node_four:30336",
|
||||||
|
},
|
||||||
|
RequestTimeout: 5 * time.Second,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/wallet3.json",
|
||||||
|
Password: "three",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
RPC: config.RPC{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":30335"}},
|
||||||
|
MaxGasInvoke: 15,
|
||||||
|
EnableCORSWorkaround: false,
|
||||||
|
SessionEnabled: true,
|
||||||
|
},
|
||||||
|
P2PNotary: config.P2PNotary{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/notary_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Prometheus: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":20003"},
|
||||||
|
},
|
||||||
|
Pprof: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":20013"},
|
||||||
|
},
|
||||||
|
Consensus: config.Consensus{
|
||||||
|
Enabled: true,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/wallet3.json",
|
||||||
|
Password: "three",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// PrivnetDockerFour is the configuration for the fourth node in the Dockerized private network.
|
||||||
|
var PrivnetDockerFour = config.Config{
|
||||||
|
ProtocolConfiguration: config.ProtocolConfiguration{
|
||||||
|
Magic: 56753,
|
||||||
|
MaxTraceableBlocks: 200000,
|
||||||
|
TimePerBlock: 15 * time.Second,
|
||||||
|
MemPoolSize: 50000,
|
||||||
|
StandbyCommittee: []string{
|
||||||
|
"02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2",
|
||||||
|
"02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e",
|
||||||
|
"03d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee699",
|
||||||
|
"02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62",
|
||||||
|
},
|
||||||
|
ValidatorsCount: 4,
|
||||||
|
SeedList: []string{
|
||||||
|
"node_one:20333",
|
||||||
|
"node_two:20334",
|
||||||
|
"node_three:20335",
|
||||||
|
"node_four:20336",
|
||||||
|
},
|
||||||
|
VerifyTransactions: true,
|
||||||
|
P2PSigExtensions: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
ApplicationConfiguration: config.ApplicationConfiguration{
|
||||||
|
Ledger: config.Ledger{
|
||||||
|
SkipBlockVerification: false},
|
||||||
|
// LogPath could be set up in case you need stdout logs to some proper file.
|
||||||
|
// LogPath: "./log/neogo.log"
|
||||||
|
DBConfiguration: dbconfig.DBConfiguration{
|
||||||
|
Type: dbconfig.LevelDB, // other options: 'inmemory','boltdb'
|
||||||
|
// DB type options. Uncomment those you need in case you want to switch DB type.
|
||||||
|
LevelDBOptions: dbconfig.LevelDBOptions{
|
||||||
|
DataDirectoryPath: "/chains/four",
|
||||||
|
},
|
||||||
|
// BoltDBOptions:
|
||||||
|
// FilePath: "./chains/privnet.bolt"
|
||||||
|
},
|
||||||
|
P2P: config.P2P{
|
||||||
|
Addresses: []string{":20336"}, // in form of "[host]:[port][:announcedPort]"
|
||||||
|
DialTimeout: 3 * time.Second,
|
||||||
|
ProtoTickInterval: 2 * time.Second,
|
||||||
|
PingInterval: 30 * time.Second,
|
||||||
|
PingTimeout: 90 * time.Second,
|
||||||
|
MaxPeers: 10,
|
||||||
|
AttemptConnPeers: 5,
|
||||||
|
MinPeers: 2,
|
||||||
|
},
|
||||||
|
Relay: true,
|
||||||
|
Oracle: config.OracleConfiguration{
|
||||||
|
Enabled: false,
|
||||||
|
AllowedContentTypes: []string{
|
||||||
|
"application/json",
|
||||||
|
},
|
||||||
|
Nodes: []string{
|
||||||
|
"http://node_one:30333",
|
||||||
|
"http://node_two:30334",
|
||||||
|
"http://node_three:30335",
|
||||||
|
"http://node_four:30336",
|
||||||
|
},
|
||||||
|
RequestTimeout: 5 * time.Second,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/wallet4.json",
|
||||||
|
Password: "four",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
RPC: config.RPC{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":30336"}},
|
||||||
|
MaxGasInvoke: 15,
|
||||||
|
EnableCORSWorkaround: false,
|
||||||
|
SessionEnabled: true,
|
||||||
|
},
|
||||||
|
P2PNotary: config.P2PNotary{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/notary_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Prometheus: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":20004"},
|
||||||
|
},
|
||||||
|
Pprof: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":20014"},
|
||||||
|
},
|
||||||
|
Consensus: config.Consensus{
|
||||||
|
Enabled: true,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/wallet4.json",
|
||||||
|
Password: "four",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// PrivnetDockerSingle is the configuration for the single node in the Dockerized private network.
|
||||||
|
var PrivnetDockerSingle = config.Config{
|
||||||
|
ProtocolConfiguration: config.ProtocolConfiguration{
|
||||||
|
Magic: 56753,
|
||||||
|
MaxTraceableBlocks: 200000,
|
||||||
|
TimePerBlock: 1 * time.Second, // TimePerBlock adjusted to 1 second
|
||||||
|
MemPoolSize: 50000,
|
||||||
|
StandbyCommittee: []string{
|
||||||
|
"02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2",
|
||||||
|
},
|
||||||
|
ValidatorsCount: 1,
|
||||||
|
SeedList: []string{
|
||||||
|
"node_single:20333",
|
||||||
|
},
|
||||||
|
VerifyTransactions: true,
|
||||||
|
P2PSigExtensions: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
ApplicationConfiguration: config.ApplicationConfiguration{
|
||||||
|
Ledger: config.Ledger{
|
||||||
|
SkipBlockVerification: false},
|
||||||
|
// LogPath could be set up in case you need stdout logs to some proper file.
|
||||||
|
// LogPath: "./log/neogo.log"
|
||||||
|
DBConfiguration: dbconfig.DBConfiguration{
|
||||||
|
Type: dbconfig.LevelDB, // other options: 'inmemory','boltdb'
|
||||||
|
// DB type options. Uncomment those you need in case you want to switch DB type.
|
||||||
|
LevelDBOptions: dbconfig.LevelDBOptions{
|
||||||
|
DataDirectoryPath: "/chains/single",
|
||||||
|
},
|
||||||
|
// BoltDBOptions:
|
||||||
|
// FilePath: "./chains/privnet.bolt"
|
||||||
|
},
|
||||||
|
P2P: config.P2P{
|
||||||
|
Addresses: []string{":20333"}, // Standard port configuration for single-node
|
||||||
|
DialTimeout: 3 * time.Second,
|
||||||
|
ProtoTickInterval: 2 * time.Second,
|
||||||
|
PingInterval: 30 * time.Second,
|
||||||
|
PingTimeout: 90 * time.Second,
|
||||||
|
MaxPeers: 10,
|
||||||
|
AttemptConnPeers: 5,
|
||||||
|
MinPeers: 0,
|
||||||
|
},
|
||||||
|
Relay: true,
|
||||||
|
Oracle: config.OracleConfiguration{
|
||||||
|
Enabled: false,
|
||||||
|
AllowedContentTypes: []string{
|
||||||
|
"application/json",
|
||||||
|
},
|
||||||
|
Nodes: []string{
|
||||||
|
"http://node_single:30333",
|
||||||
|
},
|
||||||
|
RequestTimeout: 5 * time.Second,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/wallet1_solo.json",
|
||||||
|
Password: "one",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
RPC: config.RPC{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":30333"}},
|
||||||
|
MaxGasInvoke: 15,
|
||||||
|
EnableCORSWorkaround: false,
|
||||||
|
SessionEnabled: true,
|
||||||
|
},
|
||||||
|
P2PNotary: config.P2PNotary{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/notary_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Prometheus: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":20001"},
|
||||||
|
},
|
||||||
|
Pprof: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":20011"},
|
||||||
|
},
|
||||||
|
Consensus: config.Consensus{
|
||||||
|
Enabled: true,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/wallet1.json",
|
||||||
|
Password: "one",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
121
cli/config/testnet.go
Normal file
121
cli/config/testnet.go
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
package config
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/config"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/core/storage/dbconfig"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Testnet is the configuration for the Neo N3 testnet.
|
||||||
|
var Testnet = config.Config{
|
||||||
|
ProtocolConfiguration: config.ProtocolConfiguration{
|
||||||
|
Magic: 894710606,
|
||||||
|
MaxBlockSize: 2097152,
|
||||||
|
MaxBlockSystemFee: 150000000000,
|
||||||
|
MaxTraceableBlocks: 2102400,
|
||||||
|
MaxTransactionsPerBlock: 5000,
|
||||||
|
InitialGASSupply: 52000000,
|
||||||
|
TimePerBlock: 15 * time.Second,
|
||||||
|
MemPoolSize: 50000,
|
||||||
|
StandbyCommittee: []string{
|
||||||
|
"03408dcd416396f64783ac587ea1e1593c57d9fea880c8a6a1920e92a259477806",
|
||||||
|
"02a7834be9b32e2981d157cb5bbd3acb42cfd11ea5c3b10224d7a44e98c5910f1b",
|
||||||
|
"0214baf0ceea3a66f17e7e1e839ea25fd8bed6cd82e6bb6e68250189065f44ff01",
|
||||||
|
"030205e9cefaea5a1dfc580af20c8d5aa2468bb0148f1a5e4605fc622c80e604ba",
|
||||||
|
"025831cee3708e87d78211bec0d1bfee9f4c85ae784762f042e7f31c0d40c329b8",
|
||||||
|
"02cf9dc6e85d581480d91e88e8cbeaa0c153a046e89ded08b4cefd851e1d7325b5",
|
||||||
|
"03840415b0a0fcf066bcc3dc92d8349ebd33a6ab1402ef649bae00e5d9f5840828",
|
||||||
|
"026328aae34f149853430f526ecaa9cf9c8d78a4ea82d08bdf63dd03c4d0693be6",
|
||||||
|
"02c69a8d084ee7319cfecf5161ff257aa2d1f53e79bf6c6f164cff5d94675c38b3",
|
||||||
|
"0207da870cedb777fceff948641021714ec815110ca111ccc7a54c168e065bda70",
|
||||||
|
"035056669864feea401d8c31e447fb82dd29f342a9476cfd449584ce2a6165e4d7",
|
||||||
|
"0370c75c54445565df62cfe2e76fbec4ba00d1298867972213530cae6d418da636",
|
||||||
|
"03957af9e77282ae3263544b7b2458903624adc3f5dee303957cb6570524a5f254",
|
||||||
|
"03d84d22b8753cf225d263a3a782a4e16ca72ef323cfde04977c74f14873ab1e4c",
|
||||||
|
"02147c1b1d5728e1954958daff2f88ee2fa50a06890a8a9db3fa9e972b66ae559f",
|
||||||
|
"03c609bea5a4825908027e4ab217e7efc06e311f19ecad9d417089f14927a173d5",
|
||||||
|
"0231edee3978d46c335e851c76059166eb8878516f459e085c0dd092f0f1d51c21",
|
||||||
|
"03184b018d6b2bc093e535519732b3fd3f7551c8cffaf4621dd5a0b89482ca66c9",
|
||||||
|
},
|
||||||
|
ValidatorsCount: 7,
|
||||||
|
VerifyTransactions: false,
|
||||||
|
P2PSigExtensions: false,
|
||||||
|
Hardforks: map[string]uint32{
|
||||||
|
"Aspidochelone": 210000,
|
||||||
|
"Basilisk": 2680000,
|
||||||
|
"Cockatrice": 3967000,
|
||||||
|
},
|
||||||
|
SeedList: []string{
|
||||||
|
"seed1t5.neo.org:20333",
|
||||||
|
"seed2t5.neo.org:20333",
|
||||||
|
"seed3t5.neo.org:20333",
|
||||||
|
"seed4t5.neo.org:20333",
|
||||||
|
"seed5t5.neo.org:20333",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
ApplicationConfiguration: config.ApplicationConfiguration{
|
||||||
|
DBConfiguration: dbconfig.DBConfiguration{
|
||||||
|
Type: dbconfig.LevelDB,
|
||||||
|
LevelDBOptions: dbconfig.LevelDBOptions{
|
||||||
|
DataDirectoryPath: "./chains/testnet",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
P2P: config.P2P{
|
||||||
|
Addresses: []string{":20333"},
|
||||||
|
DialTimeout: 3 * time.Second,
|
||||||
|
ProtoTickInterval: 2 * time.Second,
|
||||||
|
PingInterval: 30 * time.Second,
|
||||||
|
PingTimeout: 90 * time.Second,
|
||||||
|
MaxPeers: 100,
|
||||||
|
MinPeers: 10,
|
||||||
|
AttemptConnPeers: 20,
|
||||||
|
},
|
||||||
|
Relay: true,
|
||||||
|
Consensus: config.Consensus{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/cn_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Oracle: config.OracleConfiguration{
|
||||||
|
Enabled: false,
|
||||||
|
AllowedContentTypes: []string{
|
||||||
|
"application/json",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
P2PNotary: config.P2PNotary{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/notary_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
RPC: config.RPC{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":20332"},
|
||||||
|
},
|
||||||
|
MaxGasInvoke: 15,
|
||||||
|
EnableCORSWorkaround: false,
|
||||||
|
TLSConfig: config.TLS{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":20331"},
|
||||||
|
},
|
||||||
|
CertFile: "serv.crt",
|
||||||
|
KeyFile: "serv.key",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Prometheus: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":2112"},
|
||||||
|
},
|
||||||
|
Pprof: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":2113"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
105
cli/config/testnet_neofs.go
Normal file
105
cli/config/testnet_neofs.go
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
package config
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/config"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/core/storage/dbconfig"
|
||||||
|
)
|
||||||
|
|
||||||
|
// TestnetNeoFS is the configuration for the NeoFS testnet.
|
||||||
|
var TestnetNeoFS = config.Config{
|
||||||
|
ProtocolConfiguration: config.ProtocolConfiguration{
|
||||||
|
Magic: 735783775,
|
||||||
|
MaxTraceableBlocks: 2102400,
|
||||||
|
InitialGASSupply: 52000000,
|
||||||
|
TimePerBlock: 15 * time.Second,
|
||||||
|
MemPoolSize: 50000,
|
||||||
|
StandbyCommittee: []string{
|
||||||
|
"0337f5f45e5be5aeae4a919d0787fcb743656560949061d5b8b05509b85ffbfd53",
|
||||||
|
"020b86534a9a264d28b79155b0ec36d555ed0068eb1b0c4d40c35cc7d2f04759b8",
|
||||||
|
"02c2efdc01181b0bc14fc19e0acb12281396c8c9ffe64458d621d781a1ded436b7",
|
||||||
|
"026f9b40a73f29787ef5b289ac845bc43c64680fdd42fc170b1171d3c57213a89f",
|
||||||
|
"0272350def90715494b857315c9b9c70181739eeec52d777424fef2891c3396cad",
|
||||||
|
"03a8cee2d3877bcce5b4595578714d77ca2d47673150b8b9cd4e391b7c73b6bda3",
|
||||||
|
"0215e735a657f6e23478728d1d0718d516bf50c06c2abd92ec7c00eba2bd7a2552",
|
||||||
|
},
|
||||||
|
ValidatorsCount: 7,
|
||||||
|
VerifyTransactions: true,
|
||||||
|
P2PSigExtensions: true,
|
||||||
|
SeedList: []string{
|
||||||
|
"morph1.t5.fs.neo.org:50333",
|
||||||
|
"morph2.t5.fs.neo.org:50333",
|
||||||
|
"morph3.t5.fs.neo.org:50333",
|
||||||
|
"morph4.t5.fs.neo.org:50333",
|
||||||
|
"morph5.t5.fs.neo.org:50333",
|
||||||
|
"morph6.t5.fs.neo.org:50333",
|
||||||
|
"morph7.t5.fs.neo.org:50333",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
ApplicationConfiguration: config.ApplicationConfiguration{
|
||||||
|
DBConfiguration: dbconfig.DBConfiguration{
|
||||||
|
Type: dbconfig.LevelDB,
|
||||||
|
LevelDBOptions: dbconfig.LevelDBOptions{
|
||||||
|
DataDirectoryPath: "./chains/testnet.neofs",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
P2P: config.P2P{
|
||||||
|
Addresses: []string{":50333"},
|
||||||
|
DialTimeout: 3 * time.Second,
|
||||||
|
ProtoTickInterval: 2 * time.Second,
|
||||||
|
PingInterval: 30 * time.Second,
|
||||||
|
PingTimeout: 90 * time.Second,
|
||||||
|
MaxPeers: 100,
|
||||||
|
MinPeers: 5,
|
||||||
|
AttemptConnPeers: 20,
|
||||||
|
},
|
||||||
|
Relay: true,
|
||||||
|
Consensus: config.Consensus{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/cn_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Oracle: config.OracleConfiguration{
|
||||||
|
Enabled: false,
|
||||||
|
AllowedContentTypes: []string{
|
||||||
|
"application/json",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
RPC: config.RPC{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":50332"},
|
||||||
|
},
|
||||||
|
MaxGasInvoke: 100,
|
||||||
|
EnableCORSWorkaround: false,
|
||||||
|
StartWhenSynchronized: false,
|
||||||
|
TLSConfig: config.TLS{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":50331"},
|
||||||
|
},
|
||||||
|
CertFile: "server.crt",
|
||||||
|
KeyFile: "server.key",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
P2PNotary: config.P2PNotary{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/notary_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Prometheus: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":2112"},
|
||||||
|
},
|
||||||
|
Pprof: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":2113"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
145
cli/config/unit_testnet.go
Normal file
145
cli/config/unit_testnet.go
Normal file
|
@ -0,0 +1,145 @@
|
||||||
|
package config
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/config"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/core/storage/dbconfig"
|
||||||
|
)
|
||||||
|
|
||||||
|
// UnitTestnet is the configuration for the unit test network with four validators.
|
||||||
|
var UnitTestnet = config.Config{
|
||||||
|
ProtocolConfiguration: config.ProtocolConfiguration{
|
||||||
|
Magic: 42,
|
||||||
|
MaxTraceableBlocks: 200000,
|
||||||
|
TimePerBlock: 15 * time.Second,
|
||||||
|
MemPoolSize: 50000,
|
||||||
|
StandbyCommittee: []string{
|
||||||
|
"02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2",
|
||||||
|
"02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e",
|
||||||
|
"03d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee699",
|
||||||
|
"02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62",
|
||||||
|
"02c429b3ea1aa486cb2edfd6e99d8055c1f81f1a9206664e2c40a586d187257557",
|
||||||
|
"02c4de32252c50fa171dbe25379e4e2d55cdc12f69e382c39f59a44573ecff2f9d",
|
||||||
|
},
|
||||||
|
ValidatorsCount: 4,
|
||||||
|
VerifyTransactions: true,
|
||||||
|
P2PSigExtensions: true,
|
||||||
|
Hardforks: map[string]uint32{
|
||||||
|
"Aspidochelone": 25,
|
||||||
|
},
|
||||||
|
SeedList: []string{
|
||||||
|
"127.0.0.1:20334",
|
||||||
|
"127.0.0.1:20335",
|
||||||
|
"127.0.0.1:20336",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
ApplicationConfiguration: config.ApplicationConfiguration{
|
||||||
|
Ledger: config.Ledger{
|
||||||
|
SkipBlockVerification: false},
|
||||||
|
// LogPath could be set up in case you need stdout logs to some proper file.
|
||||||
|
// LogPath: "./log/neogo.log"
|
||||||
|
DBConfiguration: dbconfig.DBConfiguration{
|
||||||
|
Type: dbconfig.InMemoryDB, // Utilizing in-memory database for unit testing
|
||||||
|
},
|
||||||
|
P2P: config.P2P{
|
||||||
|
Addresses: []string{":20333"}, // Standard port configuration for this unit test environment
|
||||||
|
DialTimeout: 3 * time.Second,
|
||||||
|
ProtoTickInterval: 2 * time.Second,
|
||||||
|
PingInterval: 30 * time.Second,
|
||||||
|
PingTimeout: 90 * time.Second,
|
||||||
|
MaxPeers: 50,
|
||||||
|
AttemptConnPeers: 5,
|
||||||
|
MinPeers: 0,
|
||||||
|
},
|
||||||
|
Relay: true,
|
||||||
|
RPC: config.RPC{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{"127.0.0.1:0"}},
|
||||||
|
MaxGasInvoke: 15,
|
||||||
|
EnableCORSWorkaround: false,
|
||||||
|
SessionEnabled: true,
|
||||||
|
SessionExpirationTime: 2,
|
||||||
|
MaxFindStorageResultItems: 2,
|
||||||
|
},
|
||||||
|
Prometheus: config.BasicService{
|
||||||
|
Enabled: false, // Disabled for unit tests
|
||||||
|
Addresses: []string{":2112"},
|
||||||
|
},
|
||||||
|
Pprof: config.BasicService{
|
||||||
|
Enabled: false, // Disabled for unit tests
|
||||||
|
Addresses: []string{":2113"},
|
||||||
|
},
|
||||||
|
Consensus: config.Consensus{
|
||||||
|
Enabled: true,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/wallet1.json",
|
||||||
|
Password: "one",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnitTestnetSingle is the configuration for the unit test network with one validator.
|
||||||
|
var UnitTestnetSingle = config.Config{
|
||||||
|
ProtocolConfiguration: config.ProtocolConfiguration{
|
||||||
|
Magic: 42,
|
||||||
|
MaxTraceableBlocks: 200000,
|
||||||
|
TimePerBlock: 100 * time.Millisecond,
|
||||||
|
MemPoolSize: 100,
|
||||||
|
StandbyCommittee: []string{
|
||||||
|
"02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2",
|
||||||
|
},
|
||||||
|
ValidatorsCount: 1,
|
||||||
|
VerifyTransactions: true,
|
||||||
|
P2PSigExtensions: true,
|
||||||
|
Hardforks: map[string]uint32{
|
||||||
|
"Aspidochelone": 25,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
ApplicationConfiguration: config.ApplicationConfiguration{
|
||||||
|
Ledger: config.Ledger{
|
||||||
|
SkipBlockVerification: false},
|
||||||
|
// LogPath could be set up in case you need stdout logs to some proper file.
|
||||||
|
// LogPath: "./log/neogo.log"
|
||||||
|
DBConfiguration: dbconfig.DBConfiguration{
|
||||||
|
Type: dbconfig.InMemoryDB,
|
||||||
|
},
|
||||||
|
P2P: config.P2P{
|
||||||
|
Addresses: []string{":0"},
|
||||||
|
DialTimeout: 3 * time.Second,
|
||||||
|
ProtoTickInterval: 2 * time.Second,
|
||||||
|
PingInterval: 30 * time.Second,
|
||||||
|
PingTimeout: 90 * time.Second,
|
||||||
|
MinPeers: 0,
|
||||||
|
MaxPeers: 10,
|
||||||
|
AttemptConnPeers: 5,
|
||||||
|
},
|
||||||
|
Relay: true,
|
||||||
|
Consensus: config.Consensus{
|
||||||
|
Enabled: true,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "../testdata/wallet1_solo.json",
|
||||||
|
Password: "one",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
RPC: config.RPC{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{"127.0.0.1:0"}},
|
||||||
|
MaxGasInvoke: 15,
|
||||||
|
EnableCORSWorkaround: false,
|
||||||
|
},
|
||||||
|
Prometheus: config.BasicService{
|
||||||
|
Enabled: false, // Disabled for unit tests
|
||||||
|
Addresses: []string{":2112"},
|
||||||
|
},
|
||||||
|
Pprof: config.BasicService{
|
||||||
|
Enabled: false, // Disabled for unit tests
|
||||||
|
Addresses: []string{":2113"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
101
cli/config/vm.go
Normal file
101
cli/config/vm.go
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
package config
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/config"
|
||||||
|
"github.com/nspcc-dev/neo-go/pkg/core/storage/dbconfig"
|
||||||
|
)
|
||||||
|
|
||||||
|
// VM is a default configuration for the chain-backed VM CLI.
|
||||||
|
var VM = config.Config{
|
||||||
|
ProtocolConfiguration: config.ProtocolConfiguration{
|
||||||
|
Magic: 56753,
|
||||||
|
MaxTraceableBlocks: 200000,
|
||||||
|
TimePerBlock: 15 * time.Second,
|
||||||
|
MemPoolSize: 50000,
|
||||||
|
StandbyCommittee: []string{
|
||||||
|
"02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2",
|
||||||
|
"02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e",
|
||||||
|
"03d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee699",
|
||||||
|
"02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62",
|
||||||
|
},
|
||||||
|
ValidatorsCount: 4,
|
||||||
|
VerifyTransactions: true,
|
||||||
|
P2PSigExtensions: false,
|
||||||
|
SeedList: []string{
|
||||||
|
"localhost:20333",
|
||||||
|
"localhost:20334",
|
||||||
|
"localhost:20335",
|
||||||
|
"localhost:20336",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
ApplicationConfiguration: config.ApplicationConfiguration{
|
||||||
|
Ledger: config.Ledger{
|
||||||
|
SkipBlockVerification: false},
|
||||||
|
// LogPath could be set up in case you need stdout logs to some proper file.
|
||||||
|
// LogPath: "./log/neogo.log"
|
||||||
|
DBConfiguration: dbconfig.DBConfiguration{
|
||||||
|
Type: dbconfig.InMemoryDB,
|
||||||
|
// Other options: 'leveldb','boltdb'
|
||||||
|
// DB type options. Uncomment those you need in case you want to switch DB type.
|
||||||
|
LevelDBOptions: dbconfig.LevelDBOptions{
|
||||||
|
DataDirectoryPath: "./chains/privnet",
|
||||||
|
// BoltDBOptions:
|
||||||
|
// FilePath: "./chains/privnet.bolt"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
P2P: config.P2P{
|
||||||
|
Addresses: []string{":20332"}, // In form of "[host]:[port][:announcedPort]"
|
||||||
|
DialTimeout: 3 * time.Second,
|
||||||
|
ProtoTickInterval: 2 * time.Second,
|
||||||
|
PingInterval: 30 * time.Second,
|
||||||
|
PingTimeout: 90 * time.Second,
|
||||||
|
MaxPeers: 10,
|
||||||
|
AttemptConnPeers: 5,
|
||||||
|
MinPeers: 3,
|
||||||
|
},
|
||||||
|
Relay: true,
|
||||||
|
Consensus: config.Consensus{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/cn_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
P2PNotary: config.P2PNotary{
|
||||||
|
Enabled: false,
|
||||||
|
UnlockWallet: config.Wallet{
|
||||||
|
Path: "/notary_wallet.json",
|
||||||
|
Password: "pass",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
RPC: config.RPC{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":20331"},
|
||||||
|
},
|
||||||
|
MaxGasInvoke: 15,
|
||||||
|
EnableCORSWorkaround: false,
|
||||||
|
SessionEnabled: true,
|
||||||
|
SessionExpirationTime: 180, // Higher expiration time for manual requests and tests.
|
||||||
|
TLSConfig: config.TLS{
|
||||||
|
BasicService: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":20330"},
|
||||||
|
},
|
||||||
|
CertFile: "serv.crt",
|
||||||
|
KeyFile: "serv.key",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Prometheus: config.BasicService{
|
||||||
|
Enabled: true,
|
||||||
|
Addresses: []string{":2112"},
|
||||||
|
},
|
||||||
|
Pprof: config.BasicService{
|
||||||
|
Enabled: false,
|
||||||
|
Addresses: []string{":2113"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -30,44 +30,44 @@ func NewCommands() []cli.Command {
|
||||||
queryTxFlags := append([]cli.Flag{
|
queryTxFlags := append([]cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "verbose, v",
|
Name: "verbose, v",
|
||||||
Usage: "Output full tx info and execution logs",
|
Usage: "output full tx info and execution logs",
|
||||||
},
|
},
|
||||||
}, options.RPC...)
|
}, options.RPC...)
|
||||||
return []cli.Command{{
|
return []cli.Command{{
|
||||||
Name: "query",
|
Name: "query",
|
||||||
Usage: "Query data from RPC node",
|
Usage: "query data from RPC node",
|
||||||
Subcommands: []cli.Command{
|
Subcommands: []cli.Command{
|
||||||
{
|
{
|
||||||
Name: "candidates",
|
Name: "candidates",
|
||||||
Usage: "Get candidates and votes",
|
Usage: "get candidates and votes",
|
||||||
UsageText: "neo-go query candidates -r endpoint [-s timeout]",
|
UsageText: "neo-go query candidates -r endpoint [-s timeout]",
|
||||||
Action: queryCandidates,
|
Action: queryCandidates,
|
||||||
Flags: options.RPC,
|
Flags: options.RPC,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "committee",
|
Name: "committee",
|
||||||
Usage: "Get committee list",
|
Usage: "get committee list",
|
||||||
UsageText: "neo-go query committee -r endpoint [-s timeout]",
|
UsageText: "neo-go query committee -r endpoint [-s timeout]",
|
||||||
Action: queryCommittee,
|
Action: queryCommittee,
|
||||||
Flags: options.RPC,
|
Flags: options.RPC,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "height",
|
Name: "height",
|
||||||
Usage: "Get node height",
|
Usage: "get node height",
|
||||||
UsageText: "neo-go query height -r endpoint [-s timeout]",
|
UsageText: "neo-go query height -r endpoint [-s timeout]",
|
||||||
Action: queryHeight,
|
Action: queryHeight,
|
||||||
Flags: options.RPC,
|
Flags: options.RPC,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "tx",
|
Name: "tx",
|
||||||
Usage: "Query transaction status",
|
Usage: "query transaction status",
|
||||||
UsageText: "neo-go query tx <hash> -r endpoint [-s timeout] [-v]",
|
UsageText: "neo-go query tx <hash> -r endpoint [-s timeout] [-v]",
|
||||||
Action: queryTx,
|
Action: queryTx,
|
||||||
Flags: queryTxFlags,
|
Flags: queryTxFlags,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "voter",
|
Name: "voter",
|
||||||
Usage: "Print NEO holder account state",
|
Usage: "print NEO holder account state",
|
||||||
UsageText: "neo-go query voter <address> -r endpoint [-s timeout]",
|
UsageText: "neo-go query voter <address> -r endpoint [-s timeout]",
|
||||||
Action: queryVoter,
|
Action: queryVoter,
|
||||||
Flags: options.RPC,
|
Flags: options.RPC,
|
||||||
|
|
|
@ -55,7 +55,7 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "out, o",
|
Name: "out, o",
|
||||||
Usage: "Output file (stdout if not given)",
|
Usage: "output file (stdout if not given)",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
var cfgCountInFlags = make([]cli.Flag, len(cfgWithCountFlags))
|
var cfgCountInFlags = make([]cli.Flag, len(cfgWithCountFlags))
|
||||||
|
@ -63,7 +63,7 @@ func NewCommands() []cli.Command {
|
||||||
cfgCountInFlags = append(cfgCountInFlags,
|
cfgCountInFlags = append(cfgCountInFlags,
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "in, i",
|
Name: "in, i",
|
||||||
Usage: "Input file (stdin if not given)",
|
Usage: "input file (stdin if not given)",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "dump",
|
Name: "dump",
|
||||||
|
@ -78,7 +78,7 @@ func NewCommands() []cli.Command {
|
||||||
copy(cfgHeightFlags, cfgFlags)
|
copy(cfgHeightFlags, cfgFlags)
|
||||||
cfgHeightFlags[len(cfgHeightFlags)-1] = cli.UintFlag{
|
cfgHeightFlags[len(cfgHeightFlags)-1] = cli.UintFlag{
|
||||||
Name: "height",
|
Name: "height",
|
||||||
Usage: "Height of the state to reset DB to",
|
Usage: "height of the state to reset DB to",
|
||||||
Required: true,
|
Required: true,
|
||||||
}
|
}
|
||||||
return []cli.Command{
|
return []cli.Command{
|
||||||
|
|
|
@ -16,21 +16,21 @@ import (
|
||||||
var generatorFlags = []cli.Flag{
|
var generatorFlags = []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "config, c",
|
Name: "config, c",
|
||||||
Usage: "Configuration file to use",
|
Usage: "configuration file to use",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "manifest, m",
|
Name: "manifest, m",
|
||||||
Required: true,
|
Required: true,
|
||||||
Usage: "Read contract manifest (*.manifest.json) file",
|
Usage: "read contract manifest (*.manifest.json) file",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "out, o",
|
Name: "out, o",
|
||||||
Required: true,
|
Required: true,
|
||||||
Usage: "Output of the compiled wrapper",
|
Usage: "output of the compiled wrapper",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "hash",
|
Name: "hash",
|
||||||
Usage: "Smart-contract hash. If not passed, the wrapper will be designed for dynamic hash usage",
|
Usage: "smart-contract hash. If not passed, the wrapper will be designed for dynamic hash usage",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ func NewCommands() []cli.Command {
|
||||||
testInvokeScriptFlags := []cli.Flag{
|
testInvokeScriptFlags := []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "in, i",
|
Name: "in, i",
|
||||||
Usage: "Input location of the .nef file that needs to be invoked",
|
Usage: "input location of the .nef file that needs to be invoked",
|
||||||
},
|
},
|
||||||
options.Historic,
|
options.Historic,
|
||||||
}
|
}
|
||||||
|
@ -98,11 +98,11 @@ func NewCommands() []cli.Command {
|
||||||
deployFlags := append(invokeFunctionFlags, []cli.Flag{
|
deployFlags := append(invokeFunctionFlags, []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "in, i",
|
Name: "in, i",
|
||||||
Usage: "Input file for the smart contract (*.nef)",
|
Usage: "input file for the smart contract (*.nef)",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "manifest, m",
|
Name: "manifest, m",
|
||||||
Usage: "Manifest input file (*.manifest.json)",
|
Usage: "manifest input file (*.manifest.json)",
|
||||||
},
|
},
|
||||||
}...)
|
}...)
|
||||||
manifestAddGroupFlags := append([]cli.Flag{
|
manifestAddGroupFlags := append([]cli.Flag{
|
||||||
|
@ -143,27 +143,27 @@ func NewCommands() []cli.Command {
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "in, i",
|
Name: "in, i",
|
||||||
Usage: "Input file for the smart contract to be compiled (*.go file or directory)",
|
Usage: "input file for the smart contract to be compiled (*.go file or directory)",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "out, o",
|
Name: "out, o",
|
||||||
Usage: "Output of the compiled contract",
|
Usage: "output of the compiled contract",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "verbose, v",
|
Name: "verbose, v",
|
||||||
Usage: "Print out additional information after a compiling",
|
Usage: "print out additional information after a compiling",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "debug, d",
|
Name: "debug, d",
|
||||||
Usage: "Emit debug info in a separate file",
|
Usage: "emit debug info in a separate file",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "manifest, m",
|
Name: "manifest, m",
|
||||||
Usage: "Emit contract manifest (*.manifest.json) file into separate file using configuration input file (*.yml)",
|
Usage: "emit contract manifest (*.manifest.json) file into separate file using configuration input file (*.yml)",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "config, c",
|
Name: "config, c",
|
||||||
Usage: "Configuration input file (*.yml)",
|
Usage: "configuration input file (*.yml)",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "no-standards",
|
Name: "no-standards",
|
||||||
|
@ -239,7 +239,7 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "testinvokescript",
|
Name: "testinvokescript",
|
||||||
Usage: "Invoke compiled AVM code in NEF format on the blockchain (test mode, not creating a transaction for it)",
|
Usage: "invoke compiled AVM code in NEF format on the blockchain (test mode, not creating a transaction for it)",
|
||||||
UsageText: "neo-go contract testinvokescript -r endpoint -i input.nef [--historic index/hash] [signers...]",
|
UsageText: "neo-go contract testinvokescript -r endpoint -i input.nef [--historic index/hash] [signers...]",
|
||||||
Description: `Executes given compiled AVM instructions in NEF format with the given set of
|
Description: `Executes given compiled AVM instructions in NEF format with the given set of
|
||||||
signers not included sender by default. See testinvokefunction documentation
|
signers not included sender by default. See testinvokefunction documentation
|
||||||
|
|
|
@ -38,7 +38,7 @@ var (
|
||||||
// ForceFlag is a flag used to force transaction send.
|
// ForceFlag is a flag used to force transaction send.
|
||||||
ForceFlag = cli.BoolFlag{
|
ForceFlag = cli.BoolFlag{
|
||||||
Name: "force",
|
Name: "force",
|
||||||
Usage: "Do not ask for a confirmation (and ignore errors)",
|
Usage: "do not ask for a confirmation (and ignore errors)",
|
||||||
}
|
}
|
||||||
// AwaitFlag is a flag used to wait for the transaction to be included in a block.
|
// AwaitFlag is a flag used to wait for the transaction to be included in a block.
|
||||||
AwaitFlag = cli.BoolFlag{
|
AwaitFlag = cli.BoolFlag{
|
||||||
|
|
|
@ -30,11 +30,11 @@ func NewCommands() []cli.Command {
|
||||||
return []cli.Command{
|
return []cli.Command{
|
||||||
{
|
{
|
||||||
Name: "util",
|
Name: "util",
|
||||||
Usage: "Various helper commands",
|
Usage: "various helper commands",
|
||||||
Subcommands: []cli.Command{
|
Subcommands: []cli.Command{
|
||||||
{
|
{
|
||||||
Name: "convert",
|
Name: "convert",
|
||||||
Usage: "Convert provided argument into other possible formats",
|
Usage: "convert provided argument into other possible formats",
|
||||||
UsageText: `convert <arg>
|
UsageText: `convert <arg>
|
||||||
|
|
||||||
<arg> is an argument which is tried to be interpreted as an item of different types
|
<arg> is an argument which is tried to be interpreted as an item of different types
|
||||||
|
@ -43,7 +43,7 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "sendtx",
|
Name: "sendtx",
|
||||||
Usage: "Send complete transaction stored in a context file",
|
Usage: "send complete transaction stored in a context file",
|
||||||
UsageText: "sendtx [-r <endpoint>] <file.in> [--await]",
|
UsageText: "sendtx [-r <endpoint>] <file.in> [--await]",
|
||||||
Description: `Sends the transaction from the given context file to the given RPC node if it's
|
Description: `Sends the transaction from the given context file to the given RPC node if it's
|
||||||
completely signed and ready. This command expects a ContractParametersContext
|
completely signed and ready. This command expects a ContractParametersContext
|
||||||
|
@ -56,7 +56,7 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "canceltx",
|
Name: "canceltx",
|
||||||
Usage: "Cancel transaction by sending conflicting transaction",
|
Usage: "cancel transaction by sending conflicting transaction",
|
||||||
UsageText: "canceltx <txid> -r <endpoint> --wallet <wallet> [--account <account>] [--wallet-config <path>] [--gas <gas>] [--await]",
|
UsageText: "canceltx <txid> -r <endpoint> --wallet <wallet> [--account <account>] [--wallet-config <path>] [--gas <gas>] [--await]",
|
||||||
Description: `Aims to prevent a transaction from being added to the blockchain by dispatching a more
|
Description: `Aims to prevent a transaction from being added to the blockchain by dispatching a more
|
||||||
prioritized conflicting transaction to the specified RPC node. The input for this command should
|
prioritized conflicting transaction to the specified RPC node. The input for this command should
|
||||||
|
@ -76,7 +76,7 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "txdump",
|
Name: "txdump",
|
||||||
Usage: "Dump transaction stored in file",
|
Usage: "dump transaction stored in file",
|
||||||
UsageText: "txdump [-r <endpoint>] <file.in>",
|
UsageText: "txdump [-r <endpoint>] <file.in>",
|
||||||
Action: txDump,
|
Action: txDump,
|
||||||
Flags: txDumpFlags,
|
Flags: txDumpFlags,
|
||||||
|
@ -89,7 +89,7 @@ func NewCommands() []cli.Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ops",
|
Name: "ops",
|
||||||
Usage: "Pretty-print VM opcodes of the given base64- or hex- encoded script (base64 is checked first). If the input file is specified, then the script is taken from the file.",
|
Usage: "pretty-print VM opcodes of the given base64- or hex- encoded script (base64 is checked first). If the input file is specified, then the script is taken from the file.",
|
||||||
UsageText: "ops <base64/hex-encoded script> [-i path-to-file] [--hex]",
|
UsageText: "ops <base64/hex-encoded script> [-i path-to-file] [--hex]",
|
||||||
Action: handleOps,
|
Action: handleOps,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
|
|
@ -72,7 +72,7 @@ const (
|
||||||
var (
|
var (
|
||||||
historicFlag = cli.IntFlag{
|
historicFlag = cli.IntFlag{
|
||||||
Name: historicFlagFullName,
|
Name: historicFlagFullName,
|
||||||
Usage: "Height for historic script invocation (for MPT-enabled blockchain configuration with KeepOnlyLatestState setting disabled). " +
|
Usage: "height for historic script invocation (for MPT-enabled blockchain configuration with KeepOnlyLatestState setting disabled). " +
|
||||||
"Assuming that block N-th is specified as an argument, the historic invocation is based on the storage state of height N and fake currently-accepting block with index N+1.",
|
"Assuming that block N-th is specified as an argument, the historic invocation is based on the storage state of height N and fake currently-accepting block with index N+1.",
|
||||||
}
|
}
|
||||||
gasFlag = cli.Int64Flag{
|
gasFlag = cli.Int64Flag{
|
||||||
|
@ -81,28 +81,28 @@ var (
|
||||||
}
|
}
|
||||||
hashFlag = cli.StringFlag{
|
hashFlag = cli.StringFlag{
|
||||||
Name: hashFlagFullName,
|
Name: hashFlagFullName,
|
||||||
Usage: "Smart-contract hash in LE form or address",
|
Usage: "smart-contract hash in LE form or address",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
var commands = []cli.Command{
|
var commands = []cli.Command{
|
||||||
{
|
{
|
||||||
Name: "exit",
|
Name: "exit",
|
||||||
Usage: "Exit the VM prompt",
|
Usage: "exit the VM prompt",
|
||||||
UsageText: "exit",
|
UsageText: "exit",
|
||||||
Description: "Exit the VM prompt.",
|
Description: "Exit the VM prompt.",
|
||||||
Action: handleExit,
|
Action: handleExit,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ip",
|
Name: "ip",
|
||||||
Usage: "Show current instruction",
|
Usage: "show current instruction",
|
||||||
UsageText: "ip",
|
UsageText: "ip",
|
||||||
Description: "Show current instruction.",
|
Description: "Show current instruction.",
|
||||||
Action: handleIP,
|
Action: handleIP,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "break",
|
Name: "break",
|
||||||
Usage: "Place a breakpoint",
|
Usage: "place a breakpoint",
|
||||||
UsageText: `break <ip>`,
|
UsageText: `break <ip>`,
|
||||||
Description: `<ip> is mandatory parameter.
|
Description: `<ip> is mandatory parameter.
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "jump",
|
Name: "jump",
|
||||||
Usage: "Jump to the specified instruction (absolute IP value)",
|
Usage: "jump to the specified instruction (absolute IP value)",
|
||||||
UsageText: `jump <ip>`,
|
UsageText: `jump <ip>`,
|
||||||
Description: `<ip> is mandatory parameter (absolute IP value).
|
Description: `<ip> is mandatory parameter (absolute IP value).
|
||||||
|
|
||||||
|
@ -122,42 +122,42 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "estack",
|
Name: "estack",
|
||||||
Usage: "Show evaluation stack contents",
|
Usage: "show evaluation stack contents",
|
||||||
UsageText: "estack",
|
UsageText: "estack",
|
||||||
Description: "Show evaluation stack contents.",
|
Description: "Show evaluation stack contents.",
|
||||||
Action: handleXStack,
|
Action: handleXStack,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "istack",
|
Name: "istack",
|
||||||
Usage: "Show invocation stack contents",
|
Usage: "show invocation stack contents",
|
||||||
UsageText: "istack",
|
UsageText: "istack",
|
||||||
Description: "Show invocation stack contents.",
|
Description: "Show invocation stack contents.",
|
||||||
Action: handleXStack,
|
Action: handleXStack,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "sslot",
|
Name: "sslot",
|
||||||
Usage: "Show static slot contents",
|
Usage: "show static slot contents",
|
||||||
UsageText: "sslot",
|
UsageText: "sslot",
|
||||||
Description: "Show static slot contents.",
|
Description: "Show static slot contents.",
|
||||||
Action: handleSlots,
|
Action: handleSlots,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "lslot",
|
Name: "lslot",
|
||||||
Usage: "Show local slot contents",
|
Usage: "show local slot contents",
|
||||||
UsageText: "lslot",
|
UsageText: "lslot",
|
||||||
Description: "Show local slot contents",
|
Description: "Show local slot contents",
|
||||||
Action: handleSlots,
|
Action: handleSlots,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "aslot",
|
Name: "aslot",
|
||||||
Usage: "Show arguments slot contents",
|
Usage: "show arguments slot contents",
|
||||||
UsageText: "aslot",
|
UsageText: "aslot",
|
||||||
Description: "Show arguments slot contents.",
|
Description: "Show arguments slot contents.",
|
||||||
Action: handleSlots,
|
Action: handleSlots,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "loadnef",
|
Name: "loadnef",
|
||||||
Usage: "Load a NEF (possibly with a contract hash) into the VM optionally using provided scoped signers in the context",
|
Usage: "load a NEF (possibly with a contract hash) into the VM optionally using provided scoped signers in the context",
|
||||||
UsageText: `loadnef [--historic <height>] [--gas <int>] [--hash <hash-or-address>] <file> [<manifest>] [-- <signer-with-scope>, ...]`,
|
UsageText: `loadnef [--historic <height>] [--gas <int>] [--hash <hash-or-address>] <file> [<manifest>] [-- <signer-with-scope>, ...]`,
|
||||||
Flags: []cli.Flag{historicFlag, gasFlag, hashFlag},
|
Flags: []cli.Flag{historicFlag, gasFlag, hashFlag},
|
||||||
Description: `<file> parameter is mandatory, <manifest> parameter (if omitted) will
|
Description: `<file> parameter is mandatory, <manifest> parameter (if omitted) will
|
||||||
|
@ -172,7 +172,7 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "loadbase64",
|
Name: "loadbase64",
|
||||||
Usage: "Load a base64-encoded script string into the VM optionally attaching to it provided signers with scopes",
|
Usage: "load a base64-encoded script string into the VM optionally attaching to it provided signers with scopes",
|
||||||
UsageText: `loadbase64 [--historic <height>] [--gas <int>] <string> [-- <signer-with-scope>, ...]`,
|
UsageText: `loadbase64 [--historic <height>] [--gas <int>] <string> [-- <signer-with-scope>, ...]`,
|
||||||
Flags: []cli.Flag{historicFlag, gasFlag},
|
Flags: []cli.Flag{historicFlag, gasFlag},
|
||||||
Description: `<string> is mandatory parameter.
|
Description: `<string> is mandatory parameter.
|
||||||
|
@ -185,7 +185,7 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "loadhex",
|
Name: "loadhex",
|
||||||
Usage: "Load a hex-encoded script string into the VM optionally attaching to it provided signers with scopes",
|
Usage: "load a hex-encoded script string into the VM optionally attaching to it provided signers with scopes",
|
||||||
UsageText: `loadhex [--historic <height>] [--gas <int>] <string> [-- <signer-with-scope>, ...]`,
|
UsageText: `loadhex [--historic <height>] [--gas <int>] <string> [-- <signer-with-scope>, ...]`,
|
||||||
Flags: []cli.Flag{historicFlag, gasFlag},
|
Flags: []cli.Flag{historicFlag, gasFlag},
|
||||||
Description: `<string> is mandatory parameter.
|
Description: `<string> is mandatory parameter.
|
||||||
|
@ -198,7 +198,7 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "loadgo",
|
Name: "loadgo",
|
||||||
Usage: "Compile and load a Go file with the manifest into the VM optionally attaching to it provided signers with scopes and setting provided hash",
|
Usage: "compile and load a Go file with the manifest into the VM optionally attaching to it provided signers with scopes and setting provided hash",
|
||||||
UsageText: `loadgo [--historic <height>] [--gas <int>] [--hash <hash-or-address>] <file> [-- <signer-with-scope>, ...]`,
|
UsageText: `loadgo [--historic <height>] [--gas <int>] [--hash <hash-or-address>] <file> [-- <signer-with-scope>, ...]`,
|
||||||
Flags: []cli.Flag{historicFlag, gasFlag, hashFlag},
|
Flags: []cli.Flag{historicFlag, gasFlag, hashFlag},
|
||||||
Description: `<file> is mandatory parameter.
|
Description: `<file> is mandatory parameter.
|
||||||
|
@ -211,7 +211,7 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "loadtx",
|
Name: "loadtx",
|
||||||
Usage: "Load transaction into the VM from chain or from parameter context file",
|
Usage: "load transaction into the VM from chain or from parameter context file",
|
||||||
UsageText: `loadtx [--historic <height>] [--gas <int>] <file-or-hash>`,
|
UsageText: `loadtx [--historic <height>] [--gas <int>] <file-or-hash>`,
|
||||||
Flags: []cli.Flag{historicFlag, gasFlag},
|
Flags: []cli.Flag{historicFlag, gasFlag},
|
||||||
Description: `Load transaction into the VM from chain or from parameter context file.
|
Description: `Load transaction into the VM from chain or from parameter context file.
|
||||||
|
@ -228,7 +228,7 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "loaddeployed",
|
Name: "loaddeployed",
|
||||||
Usage: "Load deployed contract into the VM from chain optionally attaching to it provided signers with scopes",
|
Usage: "load deployed contract into the VM from chain optionally attaching to it provided signers with scopes",
|
||||||
UsageText: `loaddeployed [--historic <height>] [--gas <int>] <hash-or-address-or-id> [-- <signer-with-scope>, ...]`,
|
UsageText: `loaddeployed [--historic <height>] [--gas <int>] <hash-or-address-or-id> [-- <signer-with-scope>, ...]`,
|
||||||
Flags: []cli.Flag{historicFlag, gasFlag},
|
Flags: []cli.Flag{historicFlag, gasFlag},
|
||||||
Description: `Load deployed contract into the VM from chain optionally attaching to it provided signers with scopes.
|
Description: `Load deployed contract into the VM from chain optionally attaching to it provided signers with scopes.
|
||||||
|
@ -244,7 +244,7 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "reset",
|
Name: "reset",
|
||||||
Usage: "Unload compiled script from the VM and reset context to proper (possibly, historic) state",
|
Usage: "unload compiled script from the VM and reset context to proper (possibly, historic) state",
|
||||||
UsageText: "reset",
|
UsageText: "reset",
|
||||||
Flags: []cli.Flag{historicFlag},
|
Flags: []cli.Flag{historicFlag},
|
||||||
Description: "Unload compiled script from the VM and reset context to proper (possibly, historic) state.",
|
Description: "Unload compiled script from the VM and reset context to proper (possibly, historic) state.",
|
||||||
|
@ -252,7 +252,7 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "parse",
|
Name: "parse",
|
||||||
Usage: "Parse provided argument and convert it into other possible formats",
|
Usage: "parse provided argument and convert it into other possible formats",
|
||||||
UsageText: `parse <arg>`,
|
UsageText: `parse <arg>`,
|
||||||
Description: `<arg> is an argument which is tried to be interpreted as an item of different types
|
Description: `<arg> is an argument which is tried to be interpreted as an item of different types
|
||||||
and converted to other formats. Strings are escaped and output in quotes.`,
|
and converted to other formats. Strings are escaped and output in quotes.`,
|
||||||
|
@ -260,7 +260,7 @@ and converted to other formats. Strings are escaped and output in quotes.`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "run",
|
Name: "run",
|
||||||
Usage: "Usage Execute the current loaded script",
|
Usage: "usage Execute the current loaded script",
|
||||||
UsageText: `run [<method> [<parameter>...]]`,
|
UsageText: `run [<method> [<parameter>...]]`,
|
||||||
Description: `<method> is a contract method, specified in manifest. It can be '_' which will push
|
Description: `<method> is a contract method, specified in manifest. It can be '_' which will push
|
||||||
parameters onto the stack and execute from the current offset.
|
parameters onto the stack and execute from the current offset.
|
||||||
|
@ -275,14 +275,14 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "cont",
|
Name: "cont",
|
||||||
Usage: "Continue execution of the current loaded script",
|
Usage: "continue execution of the current loaded script",
|
||||||
UsageText: "cont",
|
UsageText: "cont",
|
||||||
Description: "Continue execution of the current loaded script.",
|
Description: "Continue execution of the current loaded script.",
|
||||||
Action: handleCont,
|
Action: handleCont,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "step",
|
Name: "step",
|
||||||
Usage: "Step (n) instruction in the program",
|
Usage: "step (n) instruction in the program",
|
||||||
UsageText: `step [<n>]`,
|
UsageText: `step [<n>]`,
|
||||||
Description: `<n> is optional parameter to specify number of instructions to run.
|
Description: `<n> is optional parameter to specify number of instructions to run.
|
||||||
|
|
||||||
|
@ -292,7 +292,7 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "stepinto",
|
Name: "stepinto",
|
||||||
Usage: "Stepinto instruction to take in the debugger",
|
Usage: "stepinto instruction to take in the debugger",
|
||||||
UsageText: "stepinto",
|
UsageText: "stepinto",
|
||||||
Description: `Stepinto instruction to take in the debugger.
|
Description: `Stepinto instruction to take in the debugger.
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "stepout",
|
Name: "stepout",
|
||||||
Usage: "Stepout instruction to take in the debugger",
|
Usage: "stepout instruction to take in the debugger",
|
||||||
UsageText: "stepout",
|
UsageText: "stepout",
|
||||||
Description: `Stepout instruction to take in the debugger.
|
Description: `Stepout instruction to take in the debugger.
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "stepover",
|
Name: "stepover",
|
||||||
Usage: "Stepover instruction to take in the debugger",
|
Usage: "stepover instruction to take in the debugger",
|
||||||
UsageText: "stepover",
|
UsageText: "stepover",
|
||||||
Description: `Stepover instruction to take in the debugger.
|
Description: `Stepover instruction to take in the debugger.
|
||||||
|
|
||||||
|
@ -322,26 +322,26 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "ops",
|
Name: "ops",
|
||||||
Usage: "Dump opcodes of the current loaded program",
|
Usage: "dump opcodes of the current loaded program",
|
||||||
UsageText: "ops",
|
UsageText: "ops",
|
||||||
Description: "Dump opcodes of the current loaded program",
|
Description: "Dump opcodes of the current loaded program",
|
||||||
Action: handleOps,
|
Action: handleOps,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "events",
|
Name: "events",
|
||||||
Usage: "Dump events emitted by the current loaded program",
|
Usage: "dump events emitted by the current loaded program",
|
||||||
UsageText: "events",
|
UsageText: "events",
|
||||||
Description: "Dump events emitted by the current loaded program",
|
Description: "Dump events emitted by the current loaded program",
|
||||||
Action: handleEvents,
|
Action: handleEvents,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "env",
|
Name: "env",
|
||||||
Usage: "Dump state of the chain that is used for VM CLI invocations (use -v for verbose node configuration)",
|
Usage: "dump state of the chain that is used for VM CLI invocations (use -v for verbose node configuration)",
|
||||||
UsageText: `env [-v]`,
|
UsageText: `env [-v]`,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: verboseFlagFullName + ",v",
|
Name: verboseFlagFullName + ",v",
|
||||||
Usage: "Print the whole blockchain node configuration.",
|
Usage: "print the whole blockchain node configuration.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Description: `Dump state of the chain that is used for VM CLI invocations (use -v for verbose node configuration).
|
Description: `Dump state of the chain that is used for VM CLI invocations (use -v for verbose node configuration).
|
||||||
|
@ -352,16 +352,16 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "storage",
|
Name: "storage",
|
||||||
Usage: "Dump storage of the contract with the specified hash, address or ID as is at the current stage of script invocation",
|
Usage: "dump storage of the contract with the specified hash, address or ID as is at the current stage of script invocation",
|
||||||
UsageText: `storage <hash-or-address-or-id> [<prefix>] [--backwards] [--diff]`,
|
UsageText: `storage <hash-or-address-or-id> [<prefix>] [--backwards] [--diff]`,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: backwardsFlagFullName + ",b",
|
Name: backwardsFlagFullName + ",b",
|
||||||
Usage: "Backwards traversal direction",
|
Usage: "backwards traversal direction",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: diffFlagFullName + ",d",
|
Name: diffFlagFullName + ",d",
|
||||||
Usage: "Dump only those storage items that were added or changed during the current script invocation. Note that this call won't show removed storage items, use 'changes' command for that.",
|
Usage: "dump only those storage items that were added or changed during the current script invocation. Note that this call won't show removed storage items, use 'changes' command for that.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Description: `Dump storage of the contract with the specified hash, address or ID as is at the current stage of script invocation.
|
Description: `Dump storage of the contract with the specified hash, address or ID as is at the current stage of script invocation.
|
||||||
|
@ -378,7 +378,7 @@ Example:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "changes",
|
Name: "changes",
|
||||||
Usage: "Dump storage changes as is at the current stage of loaded script invocation",
|
Usage: "dump storage changes as is at the current stage of loaded script invocation",
|
||||||
UsageText: `changes [<hash-or-address-or-id> [<prefix>]]`,
|
UsageText: `changes [<hash-or-address-or-id> [<prefix>]]`,
|
||||||
Description: `Dump storage changes as is at the current stage of loaded script invocation.
|
Description: `Dump storage changes as is at the current stage of loaded script invocation.
|
||||||
If no script is loaded or executed, then no changes are present.
|
If no script is loaded or executed, then no changes are present.
|
||||||
|
|
12
cli/vm/vm.go
12
cli/vm/vm.go
|
@ -6,6 +6,7 @@ import (
|
||||||
|
|
||||||
"github.com/chzyer/readline"
|
"github.com/chzyer/readline"
|
||||||
"github.com/nspcc-dev/neo-go/cli/cmdargs"
|
"github.com/nspcc-dev/neo-go/cli/cmdargs"
|
||||||
|
"github.com/nspcc-dev/neo-go/cli/config"
|
||||||
"github.com/nspcc-dev/neo-go/cli/options"
|
"github.com/nspcc-dev/neo-go/cli/options"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/core/storage/dbconfig"
|
"github.com/nspcc-dev/neo-go/pkg/core/storage/dbconfig"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
|
@ -27,10 +28,13 @@ func startVMPrompt(ctx *cli.Context) error {
|
||||||
if err := cmdargs.EnsureNone(ctx); err != nil {
|
if err := cmdargs.EnsureNone(ctx); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
var err error
|
||||||
cfg, err := options.GetConfigFromContext(ctx)
|
cfg := config.VM
|
||||||
if err != nil {
|
if ctx.String("config-file") != "" || ctx.String("config-path") != "" {
|
||||||
return cli.NewExitError(err, 1)
|
cfg, err = options.GetConfigFromContext(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return cli.NewExitError(err, 1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ctx.NumFlags() == 0 {
|
if ctx.NumFlags() == 0 {
|
||||||
cfg.ApplicationConfiguration.DBConfiguration.Type = dbconfig.InMemoryDB
|
cfg.ApplicationConfiguration.DBConfiguration.Type = dbconfig.InMemoryDB
|
||||||
|
|
|
@ -26,7 +26,7 @@ func newNEP11Commands() []cli.Command {
|
||||||
maxIters := strconv.Itoa(config.DefaultMaxIteratorResultItems)
|
maxIters := strconv.Itoa(config.DefaultMaxIteratorResultItems)
|
||||||
tokenAddressFlag := flags.AddressFlag{
|
tokenAddressFlag := flags.AddressFlag{
|
||||||
Name: "token",
|
Name: "token",
|
||||||
Usage: "Token contract address or hash in LE",
|
Usage: "token contract address or hash in LE",
|
||||||
}
|
}
|
||||||
ownerAddressFlag := flags.AddressFlag{
|
ownerAddressFlag := flags.AddressFlag{
|
||||||
Name: "address",
|
Name: "address",
|
||||||
|
|
|
@ -41,7 +41,7 @@ type transferTarget struct {
|
||||||
var (
|
var (
|
||||||
tokenFlag = cli.StringFlag{
|
tokenFlag = cli.StringFlag{
|
||||||
Name: "token",
|
Name: "token",
|
||||||
Usage: "Token to use (hash or name (for NEO/GAS or imported tokens))",
|
Usage: "token to use (hash or name (for NEO/GAS or imported tokens))",
|
||||||
}
|
}
|
||||||
baseBalanceFlags = []cli.Flag{
|
baseBalanceFlags = []cli.Flag{
|
||||||
walletPathFlag,
|
walletPathFlag,
|
||||||
|
@ -49,7 +49,7 @@ var (
|
||||||
tokenFlag,
|
tokenFlag,
|
||||||
flags.AddressFlag{
|
flags.AddressFlag{
|
||||||
Name: "address, a",
|
Name: "address, a",
|
||||||
Usage: "Address to use",
|
Usage: "address to use",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
importFlags = append([]cli.Flag{
|
importFlags = append([]cli.Flag{
|
||||||
|
@ -57,7 +57,7 @@ var (
|
||||||
walletConfigFlag,
|
walletConfigFlag,
|
||||||
flags.AddressFlag{
|
flags.AddressFlag{
|
||||||
Name: "token",
|
Name: "token",
|
||||||
Usage: "Token contract address or hash in LE",
|
Usage: "token contract address or hash in LE",
|
||||||
},
|
},
|
||||||
}, options.RPC...)
|
}, options.RPC...)
|
||||||
baseTransferFlags = []cli.Flag{
|
baseTransferFlags = []cli.Flag{
|
||||||
|
@ -73,7 +73,7 @@ var (
|
||||||
txctx.AwaitFlag,
|
txctx.AwaitFlag,
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "amount",
|
Name: "amount",
|
||||||
Usage: "Amount of asset to send",
|
Usage: "amount of asset to send",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
multiTransferFlags = append([]cli.Flag{
|
multiTransferFlags = append([]cli.Flag{
|
||||||
|
|
|
@ -32,7 +32,7 @@ func newValidatorCommands() []cli.Command {
|
||||||
txctx.AwaitFlag,
|
txctx.AwaitFlag,
|
||||||
flags.AddressFlag{
|
flags.AddressFlag{
|
||||||
Name: "address, a",
|
Name: "address, a",
|
||||||
Usage: "Address to register",
|
Usage: "address to register",
|
||||||
},
|
},
|
||||||
}, options.RPC...),
|
}, options.RPC...),
|
||||||
},
|
},
|
||||||
|
|
|
@ -49,11 +49,11 @@ var (
|
||||||
var (
|
var (
|
||||||
walletPathFlag = cli.StringFlag{
|
walletPathFlag = cli.StringFlag{
|
||||||
Name: "wallet, w",
|
Name: "wallet, w",
|
||||||
Usage: "Path to the wallet file ('-' to read from stdin); conflicts with --wallet-config flag.",
|
Usage: "path to the wallet file ('-' to read from stdin); conflicts with --wallet-config flag.",
|
||||||
}
|
}
|
||||||
walletConfigFlag = cli.StringFlag{
|
walletConfigFlag = cli.StringFlag{
|
||||||
Name: "wallet-config",
|
Name: "wallet-config",
|
||||||
Usage: "Path to the wallet config file; conflicts with --wallet flag.",
|
Usage: "path to the wallet config file; conflicts with --wallet flag.",
|
||||||
}
|
}
|
||||||
wifFlag = cli.StringFlag{
|
wifFlag = cli.StringFlag{
|
||||||
Name: "wif",
|
Name: "wif",
|
||||||
|
@ -61,7 +61,7 @@ var (
|
||||||
}
|
}
|
||||||
decryptFlag = cli.BoolFlag{
|
decryptFlag = cli.BoolFlag{
|
||||||
Name: "decrypt, d",
|
Name: "decrypt, d",
|
||||||
Usage: "Decrypt encrypted keys.",
|
Usage: "decrypt encrypted keys.",
|
||||||
}
|
}
|
||||||
inFlag = cli.StringFlag{
|
inFlag = cli.StringFlag{
|
||||||
Name: "in",
|
Name: "in",
|
||||||
|
@ -69,11 +69,11 @@ var (
|
||||||
}
|
}
|
||||||
fromAddrFlag = flags.AddressFlag{
|
fromAddrFlag = flags.AddressFlag{
|
||||||
Name: "from",
|
Name: "from",
|
||||||
Usage: "Address to send an asset from",
|
Usage: "address to send an asset from",
|
||||||
}
|
}
|
||||||
toAddrFlag = flags.AddressFlag{
|
toAddrFlag = flags.AddressFlag{
|
||||||
Name: "to",
|
Name: "to",
|
||||||
Usage: "Address to send an asset to",
|
Usage: "address to send an asset to",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ func NewCommands() []cli.Command {
|
||||||
txctx.AwaitFlag,
|
txctx.AwaitFlag,
|
||||||
flags.AddressFlag{
|
flags.AddressFlag{
|
||||||
Name: "address, a",
|
Name: "address, a",
|
||||||
Usage: "Address to claim GAS for",
|
Usage: "address to claim GAS for",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
claimFlags = append(claimFlags, options.RPC...)
|
claimFlags = append(claimFlags, options.RPC...)
|
||||||
|
@ -101,7 +101,7 @@ func NewCommands() []cli.Command {
|
||||||
inFlag,
|
inFlag,
|
||||||
flags.AddressFlag{
|
flags.AddressFlag{
|
||||||
Name: "address, a",
|
Name: "address, a",
|
||||||
Usage: "Address to use",
|
Usage: "address to use",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
signFlags = append(signFlags, options.RPC...)
|
signFlags = append(signFlags, options.RPC...)
|
||||||
|
@ -126,7 +126,7 @@ func NewCommands() []cli.Command {
|
||||||
walletConfigFlag,
|
walletConfigFlag,
|
||||||
cli.BoolFlag{
|
cli.BoolFlag{
|
||||||
Name: "account, a",
|
Name: "account, a",
|
||||||
Usage: "Create a new account",
|
Usage: "create a new account",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -225,11 +225,11 @@ func NewCommands() []cli.Command {
|
||||||
wifFlag,
|
wifFlag,
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "name, n",
|
Name: "name, n",
|
||||||
Usage: "Optional account name",
|
Usage: "optional account name",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "contract",
|
Name: "contract",
|
||||||
Usage: "Verification script for custom contracts",
|
Usage: "verification script for custom contracts",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -252,11 +252,11 @@ func NewCommands() []cli.Command {
|
||||||
wifFlag,
|
wifFlag,
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "name, n",
|
Name: "name, n",
|
||||||
Usage: "Optional account name",
|
Usage: "optional account name",
|
||||||
},
|
},
|
||||||
cli.IntFlag{
|
cli.IntFlag{
|
||||||
Name: "min, m",
|
Name: "min, m",
|
||||||
Usage: "Minimal number of signatures",
|
Usage: "minimal number of signatures",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -271,11 +271,11 @@ func NewCommands() []cli.Command {
|
||||||
wifFlag,
|
wifFlag,
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "name, n",
|
Name: "name, n",
|
||||||
Usage: "Optional account name",
|
Usage: "optional account name",
|
||||||
},
|
},
|
||||||
flags.AddressFlag{
|
flags.AddressFlag{
|
||||||
Name: "contract, c",
|
Name: "contract, c",
|
||||||
Usage: "Contract hash or address",
|
Usage: "contract hash or address",
|
||||||
},
|
},
|
||||||
}, options.RPC...),
|
}, options.RPC...),
|
||||||
},
|
},
|
||||||
|
@ -290,7 +290,7 @@ func NewCommands() []cli.Command {
|
||||||
txctx.ForceFlag,
|
txctx.ForceFlag,
|
||||||
flags.AddressFlag{
|
flags.AddressFlag{
|
||||||
Name: "address, a",
|
Name: "address, a",
|
||||||
Usage: "Account address or hash in LE form to be removed",
|
Usage: "account address or hash in LE form to be removed",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
18
go.mod
18
go.mod
|
@ -17,7 +17,7 @@ require (
|
||||||
github.com/nspcc-dev/dbft v0.2.0
|
github.com/nspcc-dev/dbft v0.2.0
|
||||||
github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2
|
github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2
|
||||||
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240521091047-78685785716d
|
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240521091047-78685785716d
|
||||||
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.12
|
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11
|
||||||
github.com/nspcc-dev/rfc6979 v0.2.1
|
github.com/nspcc-dev/rfc6979 v0.2.1
|
||||||
github.com/pierrec/lz4 v2.6.1+incompatible
|
github.com/pierrec/lz4 v2.6.1+incompatible
|
||||||
github.com/pmezard/go-difflib v1.0.0
|
github.com/pmezard/go-difflib v1.0.0
|
||||||
|
@ -51,22 +51,24 @@ require (
|
||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.19 // indirect
|
github.com/mattn/go-isatty v0.0.19 // indirect
|
||||||
github.com/mmcloughlin/addchain v0.4.0 // indirect
|
github.com/mmcloughlin/addchain v0.4.0 // indirect
|
||||||
github.com/nspcc-dev/hrw/v2 v2.0.1 // indirect
|
github.com/nspcc-dev/hrw v1.0.9 // indirect
|
||||||
github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240305074711-35bc78d84dc4 // indirect
|
github.com/nspcc-dev/neofs-api-go/v2 v2.14.0 // indirect
|
||||||
github.com/nspcc-dev/tzhash v1.7.2 // indirect
|
github.com/nspcc-dev/neofs-crypto v0.4.0 // indirect
|
||||||
|
github.com/nspcc-dev/tzhash v1.7.0 // indirect
|
||||||
github.com/prometheus/client_model v0.5.0 // indirect
|
github.com/prometheus/client_model v0.5.0 // indirect
|
||||||
github.com/prometheus/common v0.48.0 // indirect
|
github.com/prometheus/common v0.48.0 // indirect
|
||||||
github.com/prometheus/procfs v0.12.0 // indirect
|
github.com/prometheus/procfs v0.12.0 // indirect
|
||||||
github.com/rs/zerolog v1.30.0 // indirect
|
github.com/rs/zerolog v1.30.0 // indirect
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||||
|
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||||
github.com/x448/float16 v0.8.4 // indirect
|
github.com/x448/float16 v0.8.4 // indirect
|
||||||
go.uber.org/multierr v1.11.0 // indirect
|
go.uber.org/multierr v1.10.0 // indirect
|
||||||
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
|
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect
|
||||||
golang.org/x/mod v0.16.0 // indirect
|
golang.org/x/mod v0.16.0 // indirect
|
||||||
golang.org/x/net v0.23.0 // indirect
|
golang.org/x/net v0.23.0 // indirect
|
||||||
golang.org/x/sys v0.18.0 // indirect
|
golang.org/x/sys v0.18.0 // indirect
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
|
||||||
google.golang.org/grpc v1.62.0 // indirect
|
google.golang.org/grpc v1.59.0 // indirect
|
||||||
google.golang.org/protobuf v1.33.0 // indirect
|
google.golang.org/protobuf v1.33.0 // indirect
|
||||||
rsc.io/tmplfunc v0.0.3 // indirect
|
rsc.io/tmplfunc v0.0.3 // indirect
|
||||||
)
|
)
|
||||||
|
|
43
go.sum
43
go.sum
|
@ -26,6 +26,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs=
|
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs=
|
||||||
|
@ -91,18 +92,21 @@ github.com/nspcc-dev/dbft v0.2.0 h1:sDwsQES600OSIMncV176t2SX5OvB14lzeOAyKFOkbMI=
|
||||||
github.com/nspcc-dev/dbft v0.2.0/go.mod h1:oFE6paSC/yfFh9mcNU6MheMGOYXK9+sPiRk3YMoz49o=
|
github.com/nspcc-dev/dbft v0.2.0/go.mod h1:oFE6paSC/yfFh9mcNU6MheMGOYXK9+sPiRk3YMoz49o=
|
||||||
github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2 h1:mD9hU3v+zJcnHAVmHnZKt3I++tvn30gBj2rP2PocZMk=
|
github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2 h1:mD9hU3v+zJcnHAVmHnZKt3I++tvn30gBj2rP2PocZMk=
|
||||||
github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2/go.mod h1:U5VfmPNM88P4RORFb6KSUVBdJBDhlqggJZYGXGPxOcc=
|
github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2/go.mod h1:U5VfmPNM88P4RORFb6KSUVBdJBDhlqggJZYGXGPxOcc=
|
||||||
github.com/nspcc-dev/hrw/v2 v2.0.1 h1:CxYUkBeJvNfMEn2lHhrV6FjY8pZPceSxXUtMVq0BUOU=
|
github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y=
|
||||||
github.com/nspcc-dev/hrw/v2 v2.0.1/go.mod h1:iZAs5hT2q47EGq6AZ0FjaUI6ggntOi7vrY4utfzk5VA=
|
github.com/nspcc-dev/hrw v1.0.9/go.mod h1:l/W2vx83vMQo6aStyx2AuZrJ+07lGv2JQGlVkPG06MU=
|
||||||
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240521091047-78685785716d h1:Vcb7YkZuUSSIC+WF/xV3UDfHbAxZgyT2zGleJP3Ig5k=
|
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240521091047-78685785716d h1:Vcb7YkZuUSSIC+WF/xV3UDfHbAxZgyT2zGleJP3Ig5k=
|
||||||
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240521091047-78685785716d/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY=
|
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240521091047-78685785716d/go.mod h1:/vrbWSHc7YS1KSYhVOyyeucXW/e+1DkVBOgnBEXUCeY=
|
||||||
github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240305074711-35bc78d84dc4 h1:arN0Ypn+jawZpu1BND7TGRn44InAVIqKygndsx0y2no=
|
github.com/nspcc-dev/neofs-api-go/v2 v2.14.0 h1:jhuN8Ldqz7WApvUJRFY0bjRXE1R3iCkboMX5QVZhHVk=
|
||||||
github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240305074711-35bc78d84dc4/go.mod h1:7Tm1NKEoUVVIUlkVwFrPh7GG5+Lmta2m7EGr4oVpBd8=
|
github.com/nspcc-dev/neofs-api-go/v2 v2.14.0/go.mod h1:DRIr0Ic1s+6QgdqmNFNLIqMqd7lNMJfYwkczlm1hDtM=
|
||||||
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.12 h1:mdxtlSU2I4oVZ/7AXTLKyz8uUPbDWikZw4DM8gvrddA=
|
github.com/nspcc-dev/neofs-crypto v0.4.0 h1:5LlrUAM5O0k1+sH/sktBtrgfWtq1pgpDs09fZo+KYi4=
|
||||||
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.12/go.mod h1:JdsEM1qgNukrWqgOBDChcYp8oY4XUzidcKaxY4hNJvQ=
|
github.com/nspcc-dev/neofs-crypto v0.4.0/go.mod h1:6XJ8kbXgOfevbI2WMruOtI+qUJXNwSGM/E9eClXxPHs=
|
||||||
|
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11 h1:QOc8ZRN5DXlAeRPh5QG9u8rMLgoeRNiZF5/vL7QupWg=
|
||||||
|
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11/go.mod h1:W+ImTNRnSNMH8w43H1knCcIqwu7dLHePXtlJNZ7EFIs=
|
||||||
|
github.com/nspcc-dev/rfc6979 v0.2.0/go.mod h1:exhIh1PdpDC5vQmyEsGvc4YDM/lyQp/452QxGq/UEso=
|
||||||
github.com/nspcc-dev/rfc6979 v0.2.1 h1:8wWxkamHWFmO790GsewSoKUSJjVnL1fmdRpokU/RgRM=
|
github.com/nspcc-dev/rfc6979 v0.2.1 h1:8wWxkamHWFmO790GsewSoKUSJjVnL1fmdRpokU/RgRM=
|
||||||
github.com/nspcc-dev/rfc6979 v0.2.1/go.mod h1:Tk7h5kyUWkhjyO3zUgFFhy1v2vQv3BvQEntakdtqrWc=
|
github.com/nspcc-dev/rfc6979 v0.2.1/go.mod h1:Tk7h5kyUWkhjyO3zUgFFhy1v2vQv3BvQEntakdtqrWc=
|
||||||
github.com/nspcc-dev/tzhash v1.7.2 h1:iRXoa9TJqH/DQO7FFcqpq9BdruF9E7/xnFGlIghl5J4=
|
github.com/nspcc-dev/tzhash v1.7.0 h1:/+aL33NC7y5OIGnY2kYgjZt8mg7LVGFMdj/KAJLndnk=
|
||||||
github.com/nspcc-dev/tzhash v1.7.2/go.mod h1:oHiH0qwmTsZkeVs7pvCS5cVXUaLhXxSFvnmnZ++ijm4=
|
github.com/nspcc-dev/tzhash v1.7.0/go.mod h1:Dnx9LUlOLr5paL2Rtc96x0PPs8D9eIkUtowt1n+KQus=
|
||||||
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
|
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
|
||||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
|
@ -135,6 +139,11 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||||
|
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
|
||||||
|
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||||
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 h1:xQdMZ1WLrgkkvOZ/LDQxjVxMLdby7osSh4ZEVa5sIjs=
|
github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 h1:xQdMZ1WLrgkkvOZ/LDQxjVxMLdby7osSh4ZEVa5sIjs=
|
||||||
|
@ -147,17 +156,18 @@ github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
|
||||||
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
|
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
|
||||||
go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI=
|
go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI=
|
||||||
go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE=
|
go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE=
|
||||||
|
go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ=
|
||||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ=
|
||||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
|
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
|
||||||
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
||||||
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ=
|
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ=
|
||||||
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
|
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8=
|
||||||
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
|
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
|
||||||
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
|
@ -197,10 +207,10 @@ golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA=
|
||||||
google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk=
|
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
|
||||||
google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
|
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
|
||||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||||
|
@ -220,6 +230,7 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU=
|
rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU=
|
||||||
|
|
Loading…
Reference in a new issue