Update executable to luxd

This commit is contained in:
2023-12-13 21:45:02 +01:00
parent d2613b89df
commit b36c20f670
25 changed files with 110 additions and 110 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
**Logs**
If applicable, please include the relevant logs that indicate a problem and/or the log directory of your node. By default, this can be found at `~/.luxgo/logs/`.
If applicable, please include the relevant logs that indicate a problem and/or the log directory of your node. By default, this can be found at `~/.luxd/logs/`.
**Metrics**
If applicable, please include any metrics gathered from your node to assist us in diagnosing the problem.
+2 -2
View File
@@ -18,8 +18,8 @@ Link the relevant documentation PRs for this release.
**Checklist**
- [ ] Update version in scripts/versions.sh and plugin/evm/version.go
- [ ] Bump LuxGo dependency for RPCChainVM Compatibility
- [ ] Bump Luxd dependency for RPCChainVM Compatibility
- [ ] Add new entry in compatibility.json for RPCChainVM Compatibility
- [ ] Update LuxGo compatibility in README
- [ ] Update Luxd compatibility in README
- [ ] Bump cmd/simulator go mod (if needed)
- [ ] Confirm goreleaser job has successfully generated binaries by checking the releases page
+1 -1
View File
@@ -20,7 +20,7 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
**Logs**
If applicable, please include the relevant logs that indicate a problem and/or the log directory of your node. By default, this can be found at `~/.luxgo/logs/`.
If applicable, please include the relevant logs that indicate a problem and/or the log directory of your node. By default, this can be found at `~/.luxd/logs/`.
**Metrics**
If applicable, please include any metrics gathered from your node to assist us in diagnosing the problem.
+4 -4
View File
@@ -63,15 +63,15 @@ jobs:
- name: Yarn install
run: yarn
working-directory: ./contract-examples
- name: Install LuxGo Release
- name: Install Luxd Release
shell: bash
run: BASEDIR=/tmp/e2e-test LUXGO_BUILD_PATH=/tmp/e2e-test/luxgo ./scripts/install_luxgo_release.sh
run: BASEDIR=/tmp/e2e-test LUXD_BUILD_PATH=/tmp/e2e-test/luxd ./scripts/install_luxd_release.sh
- name: Build Subnet-EVM Plugin Binary
shell: bash
run: ./scripts/build.sh /tmp/e2e-test/luxgo/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
run: ./scripts/build.sh /tmp/e2e-test/luxd/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
- name: Run E2E Tests
shell: bash
run: LUXGO_BUILD_PATH=/tmp/e2e-test/luxgo DATA_DIR=/tmp/e2e-test/data ./scripts/run_ginkgo.sh
run: LUXD_BUILD_PATH=/tmp/e2e-test/luxd DATA_DIR=/tmp/e2e-test/data ./scripts/run_ginkgo.sh
release:
# needs: [lint_test, unit_test, e2e_test, simulator_test]
+39 -39
View File
@@ -13,48 +13,48 @@ This chain implements the Ethereum Virtual Machine and supports Solidity smart c
## Building
The Subnet EVM runs in a separate process from the main LuxGo process and communicates with it over a local gRPC connection.
The Subnet EVM runs in a separate process from the main Luxd process and communicates with it over a local gRPC connection.
### LuxGo Compatibility
### Luxd Compatibility
```text
[v0.1.0] LuxGo@v1.7.0-v1.7.4 (Protocol Version: 9)
[v0.1.1-v0.1.2] LuxGo@v1.7.5-v1.7.6 (Protocol Version: 10)
[v0.2.0] LuxGo@v1.7.7-v1.7.9 (Protocol Version: 11)
[v0.2.1] LuxGo@v1.7.10 (Protocol Version: 12)
[v0.2.2] LuxGo@v1.7.11-v1.7.12 (Protocol Version: 14)
[v0.2.3] LuxGo@v1.7.13-v1.7.16 (Protocol Version: 15)
[v0.2.4] LuxGo@v1.7.13-v1.7.16 (Protocol Version: 15)
[v0.2.5] LuxGo@v1.7.13-v1.7.16 (Protocol Version: 15)
[v0.2.6] LuxGo@v1.7.13-v1.7.16 (Protocol Version: 15)
[v0.2.7] LuxGo@v1.7.13-v1.7.16 (Protocol Version: 15)
[v0.2.8] LuxGo@v1.7.13-v1.7.18 (Protocol Version: 15)
[v0.2.9] LuxGo@v1.7.13-v1.7.18 (Protocol Version: 15)
[v0.3.0] LuxGo@v1.8.0-v1.8.6 (Protocol Version: 16)
[v0.4.0] LuxGo@v1.9.0 (Protocol Version: 17)
[v0.4.1] LuxGo@v1.9.1 (Protocol Version: 18)
[v0.4.2] LuxGo@v1.9.1 (Protocol Version: 18)
[v0.4.3] LuxGo@v1.9.2-v1.9.3 (Protocol Version: 19)
[v0.4.4] LuxGo@v1.9.2-v1.9.3 (Protocol Version: 19)
[v0.4.5] LuxGo@v1.9.4 (Protocol Version: 20)
[v0.4.6] LuxGo@v1.9.4 (Protocol Version: 20)
[v0.4.7] LuxGo@v1.9.5 (Protocol Version: 21)
[v0.4.8] LuxGo@v1.9.6-v1.9.8 (Protocol Version: 22)
[v0.4.9] LuxGo@v1.9.9 (Protocol Version: 23)
[v0.4.10] LuxGo@v1.9.9 (Protocol Version: 23)
[v0.4.11] LuxGo@v1.9.10-v1.9.16 (Protocol Version: 24)
[v0.4.12] LuxGo@v1.9.10-v1.9.16 (Protocol Version: 24)
[v0.5.0] LuxGo@v1.10.0 (Protocol Version: 25)
[v0.5.1] LuxGo@v1.10.1-v1.10.4 (Protocol Version: 26)
[v0.5.2] LuxGo@v1.10.1-v1.10.4 (Protocol Version: 26)
[v0.5.3] LuxGo@v1.10.5-v1.10.8 (Protocol Version: 27)
[v0.5.4] LuxGo@v1.10.9-v1.10.12 (Protocol Version: 28)
[v0.5.5] LuxGo@v1.10.9-v1.10.12 (Protocol Version: 28)
[v0.5.6] LuxGo@v1.10.9-v1.10.12 (Protocol Version: 28)
[v0.5.7] LuxGo@v1.10.13-v1.10.14 (Protocol Version: 29)
[v0.5.8] LuxGo@v1.10.13-v1.10.14 (Protocol Version: 29)
[v0.5.9] LuxGo@v1.10.15-v1.10.17 (Protocol Version: 30)
[v0.5.10] LuxGo@v1.10.15-v1.10.17 (Protocol Version: 30)
[v0.1.0] Luxd@v1.7.0-v1.7.4 (Protocol Version: 9)
[v0.1.1-v0.1.2] Luxd@v1.7.5-v1.7.6 (Protocol Version: 10)
[v0.2.0] Luxd@v1.7.7-v1.7.9 (Protocol Version: 11)
[v0.2.1] Luxd@v1.7.10 (Protocol Version: 12)
[v0.2.2] Luxd@v1.7.11-v1.7.12 (Protocol Version: 14)
[v0.2.3] Luxd@v1.7.13-v1.7.16 (Protocol Version: 15)
[v0.2.4] Luxd@v1.7.13-v1.7.16 (Protocol Version: 15)
[v0.2.5] Luxd@v1.7.13-v1.7.16 (Protocol Version: 15)
[v0.2.6] Luxd@v1.7.13-v1.7.16 (Protocol Version: 15)
[v0.2.7] Luxd@v1.7.13-v1.7.16 (Protocol Version: 15)
[v0.2.8] Luxd@v1.7.13-v1.7.18 (Protocol Version: 15)
[v0.2.9] Luxd@v1.7.13-v1.7.18 (Protocol Version: 15)
[v0.3.0] Luxd@v1.8.0-v1.8.6 (Protocol Version: 16)
[v0.4.0] Luxd@v1.9.0 (Protocol Version: 17)
[v0.4.1] Luxd@v1.9.1 (Protocol Version: 18)
[v0.4.2] Luxd@v1.9.1 (Protocol Version: 18)
[v0.4.3] Luxd@v1.9.2-v1.9.3 (Protocol Version: 19)
[v0.4.4] Luxd@v1.9.2-v1.9.3 (Protocol Version: 19)
[v0.4.5] Luxd@v1.9.4 (Protocol Version: 20)
[v0.4.6] Luxd@v1.9.4 (Protocol Version: 20)
[v0.4.7] Luxd@v1.9.5 (Protocol Version: 21)
[v0.4.8] Luxd@v1.9.6-v1.9.8 (Protocol Version: 22)
[v0.4.9] Luxd@v1.9.9 (Protocol Version: 23)
[v0.4.10] Luxd@v1.9.9 (Protocol Version: 23)
[v0.4.11] Luxd@v1.9.10-v1.9.16 (Protocol Version: 24)
[v0.4.12] Luxd@v1.9.10-v1.9.16 (Protocol Version: 24)
[v0.5.0] Luxd@v1.10.0 (Protocol Version: 25)
[v0.5.1] Luxd@v1.10.1-v1.10.4 (Protocol Version: 26)
[v0.5.2] Luxd@v1.10.1-v1.10.4 (Protocol Version: 26)
[v0.5.3] Luxd@v1.10.5-v1.10.8 (Protocol Version: 27)
[v0.5.4] Luxd@v1.10.9-v1.10.12 (Protocol Version: 28)
[v0.5.5] Luxd@v1.10.9-v1.10.12 (Protocol Version: 28)
[v0.5.6] Luxd@v1.10.9-v1.10.12 (Protocol Version: 28)
[v0.5.7] Luxd@v1.10.13-v1.10.14 (Protocol Version: 29)
[v0.5.8] Luxd@v1.10.13-v1.10.14 (Protocol Version: 29)
[v0.5.9] Luxd@v1.10.15-v1.10.17 (Protocol Version: 30)
[v0.5.10] Luxd@v1.10.15-v1.10.17 (Protocol Version: 30)
```
## API
+3 -3
View File
@@ -30,9 +30,9 @@ v0.1.0
To run the load simulator, you must first start an EVM based network. The load simulator works on both the C-Chain and Subnet-EVM, so we will start a single node network and run the load simulator on the C-Chain.
To start a single node network, follow the instructions from the LuxGo [README](https://github.com/luxdefi/node#building-node) to build from source.
To start a single node network, follow the instructions from the Luxd [README](https://github.com/luxdefi/node#building-node) to build from source.
Once you've built LuxGo, open the LuxGo directory in a separate terminal window and run a single node non-staking network with the following command:
Once you've built Luxd, open the Luxd directory in a separate terminal window and run a single node non-staking network with the following command:
```bash
./build/node --sybil-protection-enabled=false --network-id=local
@@ -45,7 +45,7 @@ The staking-enabled flag is only for local testing. Disabling staking serves two
1. Ignore stake weight on the P-Chain and count each connected peer as having a stake weight of 1
2. Automatically opts in to validate every Subnet
Once you have LuxGo running locally, it will be running an HTTP Server on the default port `9650`. This means that the RPC Endpoint for the C-Chain will be http://127.0.0.1:9650/ext/bc/C/rpc and ws://127.0.0.1:9650/ext/bc/C/ws for WebSocket connections.
Once you have Luxd running locally, it will be running an HTTP Server on the default port `9650`. This means that the RPC Endpoint for the C-Chain will be http://127.0.0.1:9650/ext/bc/C/rpc and ws://127.0.0.1:9650/ext/bc/C/ws for WebSocket connections.
Now, we can run the simulator command to simulate some load on the local C-Chain for 30s:
+1 -1
View File
@@ -4,7 +4,7 @@ Disclaimer: the consensus package in subnet-evm is a complete misnomer.
The consensus package in go-ethereum handles block validation and specifically handles validating the PoW portion of consensus - thus the name.
Since LuxGo handles consensus for Subnet-EVM, Subnet-EVM is just the VM, but we keep the consensus package in place to handle part of the block verification process.
Since Luxd handles consensus for Subnet-EVM, Subnet-EVM is just the VM, but we keep the consensus package in place to handle part of the block verification process.
## Block Verification
+1 -1
View File
@@ -4,7 +4,7 @@ The core package maintains the backend for the blockchain, transaction pool, and
## Blockchain
The [BlockChain](./blockchain.go) struct handles the insertion of blocks into the maintained chain. It maintains a "canonical chain", which is essentially the preferred chain (the chain that ends with the block preferred by the LuxGo consensus engine).
The [BlockChain](./blockchain.go) struct handles the insertion of blocks into the maintained chain. It maintains a "canonical chain", which is essentially the preferred chain (the chain that ends with the block preferred by the Luxd consensus engine).
When the consensus engine verifies blocks as they are ready to be issued into consensus, it calls `Verify()` on the ChainVM Block interface implemented [here](../plugin/evm/block.go). This calls `InsertBlockManual` on the BlockChain struct implemented in this package, which is the first entrypoint of a block into the blockchain.
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -13,7 +13,7 @@ The `Network` interface implements the networking portion of the required VM int
## Client
The client utilizes the `Network` interface to send requests to peers on the network and utilizes the `waitingHandler` to wait until a response or failure is received from the LuxGo networking layer.
The client utilizes the `Network` interface to send requests to peers on the network and utilizes the `waitingHandler` to wait until a response or failure is received from the Luxd networking layer.
This allows the user of `Client` to treat it as if it were returning results from the network synchronously.
+4 -4
View File
@@ -1,6 +1,6 @@
# EVM Package
The EVM package implements the LuxGo VM interface.
The EVM package implements the Luxd VM interface.
## VM
@@ -12,12 +12,12 @@ The VM creates APIs for the node through the function `CreateHandlers()`. Create
## Block Handling
The VM implements `buildBlock`, `parseBlock`, and `getBlock` and uses the `chain` package from LuxGo to construct a metered state, which uses these functions to implement an efficient caching layer and maintain the required invariants for blocks that get returned to the consensus engine.
The VM implements `buildBlock`, `parseBlock`, and `getBlock` and uses the `chain` package from Luxd to construct a metered state, which uses these functions to implement an efficient caching layer and maintain the required invariants for blocks that get returned to the consensus engine.
To do this, the VM uses a modified version of the Ethereum RLP block type [here](../../core/types/block.go) and uses the core package's BlockChain type [here](../../core/blockchain.go) to handle the insertion and storage of blocks into the chain.
## Block
The Block type implements the LuxGo ChainVM Block interface. The key functions for this interface are `Verify()`, `Accept()`, `Reject()`, and `Status()`.
The Block type implements the Luxd ChainVM Block interface. The key functions for this interface are `Verify()`, `Accept()`, `Reject()`, and `Status()`.
The Block type wraps the stateless block type [here](../../core/types/block.go) and implements these functions to allow the consensus engine to verify blocks as valid, perform consensus, and mark them as accepted or rejected. See the documentation in LuxGo for the more detailed VM invariants that are maintained here.
The Block type wraps the stateless block type [here](../../core/types/block.go) and implements these functions to allow the consensus engine to verify blocks as valid, perform consensus, and mark them as accepted or rejected. See the documentation in Luxd for the more detailed VM invariants that are maintained here.
+1 -1
View File
@@ -12,6 +12,6 @@ import (
)
func main() {
versionString := fmt.Sprintf("Subnet-EVM/%s [LuxGo=%s, rpcchainvm=%d]", evm.Version, version.Current, version.RPCChainVMProtocol)
versionString := fmt.Sprintf("Subnet-EVM/%s [Luxd=%s, rpcchainvm=%d]", evm.Version, version.Current, version.RPCChainVMProtocol)
runner.Run(versionString)
}
+1 -1
View File
@@ -6,7 +6,7 @@ For more information on the motivation for encoding the results of predicate ver
## Serialization
Note: PredicateResults are encoded using the LuxGo codec, which serializes a map by serializing the length of the map as a uint32 and then serializes each key-value pair sequentially.
Note: PredicateResults are encoded using the Luxd codec, which serializes a map by serializing the length of the map as a uint32 and then serializes each key-value pair sequentially.
PredicateResults:
```
+1 -1
View File
@@ -2,7 +2,7 @@
set -e
# This script generates a Stateful Precompile stub based off of a Solidity ABI file.
# It first sets the necessary CGO_FLAGs for the BLST library used in LuxGo and
# It first sets the necessary CGO_FLAGs for the BLST library used in Luxd and
# then runs PrecompileGen.
if ! [[ "$0" =~ scripts/generate_precompile.sh ]]; then
echo "must be run from repository root, but got $0"
+10 -10
View File
@@ -17,7 +17,7 @@ source "$SUBNET_EVM_PATH"/scripts/constants.sh
GOARCH=$(go env GOARCH)
GOOS=$(go env GOOS)
BASEDIR=${BASEDIR:-"/tmp/node-release"}
LUXGO_BUILD_PATH=${LUXGO_BUILD_PATH:-${BASEDIR}/node}
LUXD_BUILD_PATH=${LUXD_BUILD_PATH:-${BASEDIR}/node}
mkdir -p ${BASEDIR}
@@ -29,7 +29,7 @@ if [[ ${GOOS} == "darwin" ]]; then
AVAGO_DOWNLOAD_PATH=${BASEDIR}/node-macos-${LUX_VERSION}.zip
fi
BUILD_DIR=${LUXGO_BUILD_PATH}-${LUX_VERSION}
BUILD_DIR=${LUXD_BUILD_PATH}-${LUX_VERSION}
extract_archive() {
mkdir -p ${BUILD_DIR}
@@ -100,7 +100,7 @@ else
COMMIT=$(git rev-parse HEAD)
# use the commit hash instead of the branch name or tag
BUILD_DIR=${LUXGO_BUILD_PATH}-${COMMIT}
BUILD_DIR=${LUXD_BUILD_PATH}-${COMMIT}
# if the build-directory doesn't exist, build node
if [[ ! -d ${BUILD_DIR} ]]; then
@@ -115,14 +115,14 @@ else
fi
fi
LUXGO_PATH=${LUXGO_BUILD_PATH}/node
LUXGO_PLUGIN_DIR=${LUXGO_BUILD_PATH}/plugins
LUXD_PATH=${LUXD_BUILD_PATH}/node
LUXD_PLUGIN_DIR=${LUXD_BUILD_PATH}/plugins
mkdir -p ${LUXGO_BUILD_PATH}
mkdir -p ${LUXD_BUILD_PATH}
cp ${BUILD_DIR}/node ${LUXGO_PATH}
cp ${BUILD_DIR}/node ${LUXD_PATH}
echo "Installed LuxGo release ${LUX_VERSION}"
echo "LuxGo Path: ${LUXGO_PATH}"
echo "Plugin Dir: ${LUXGO_PLUGIN_DIR}"
echo "Installed Luxd release ${LUX_VERSION}"
echo "Luxd Path: ${LUXD_PATH}"
echo "Plugin Dir: ${LUXD_PLUGIN_DIR}"
+7 -7
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
set -e
# This script starts N nodes (TODO N instead of 5) and waits for ctrl-c to shutdown the process group of LuxGo processes
# Uses data directory to store all LuxGo data neatly in one location with minimal config overhead
# This script starts N nodes (TODO N instead of 5) and waits for ctrl-c to shutdown the process group of Luxd processes
# Uses data directory to store all Luxd data neatly in one location with minimal config overhead
if ! [[ "$0" =~ scripts/run.sh ]]; then
echo "must be run from repository root, but got $0"
exit 255
@@ -19,9 +19,9 @@ source "$SUBNET_EVM_PATH"/scripts/versions.sh
source "$SUBNET_EVM_PATH"/scripts/constants.sh
# Set up lux binary path and assume build directory is set
LUXGO_BUILD_PATH=${LUXGO_BUILD_PATH:-"$GOPATH/src/github.com/luxdefi/node/build"}
LUXGO_PATH=${LUXGO_PATH:-"$LUXGO_BUILD_PATH/node"}
LUXGO_PLUGIN_DIR=${LUXGO_PLUGIN_DIR:-"$LUXGO_BUILD_PATH/plugins"}
LUXD_BUILD_PATH=${LUXD_BUILD_PATH:-"$GOPATH/src/github.com/luxdefi/node/build"}
LUXD_PATH=${LUXD_PATH:-"$LUXD_BUILD_PATH/node"}
LUXD_PLUGIN_DIR=${LUXD_PLUGIN_DIR:-"$LUXD_BUILD_PATH/plugins"}
DATA_DIR=${DATA_DIR:-/tmp/subnet-evm-start-node/$(date "+%Y-%m-%d%:%H:%M:%S")}
mkdir -p $DATA_DIR
@@ -33,7 +33,7 @@ function _set_config(){
"network-id": "local",
"sybil-protection-enabled": false,
"health-check-frequency": "5s",
"plugin-dir": "$LUXGO_PLUGIN_DIR"
"plugin-dir": "$LUXD_PLUGIN_DIR"
}
EOF
}
@@ -50,6 +50,6 @@ mkdir -p $NODE_DATA_DIR
NODE_CONFIG_FILE_PATH="$NODE_DATA_DIR/config.json"
_set_config $NODE_CONFIG_FILE_PATH
CMD="$LUXGO_PATH --data-dir=$NODE_DATA_DIR --config-file=$NODE_CONFIG_FILE_PATH"
CMD="$LUXD_PATH --data-dir=$NODE_DATA_DIR --config-file=$NODE_CONFIG_FILE_PATH"
execute_cmd $CMD
+2 -2
View File
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
set -e
# This script assumes that an LuxGo and Subnet-EVM binaries are available in the standard location
# This script assumes that an Luxd and Subnet-EVM binaries are available in the standard location
# within the $GOPATH
# The LuxGo and PluginDir paths can be specified via the environment variables used in ./scripts/run.sh.
# The Luxd and PluginDir paths can be specified via the environment variables used in ./scripts/run.sh.
# Load the versions
SUBNET_EVM_PATH=$(
+2 -2
View File
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
set -e
# This script assumes that an LuxGo and Subnet-EVM binaries are available in the standard location
# This script assumes that an Luxd and Subnet-EVM binaries are available in the standard location
# within the $GOPATH
# The LuxGo and PluginDir paths can be specified via the environment variables used in ./scripts/run.sh.
# The Luxd and PluginDir paths can be specified via the environment variables used in ./scripts/run.sh.
# Load the versions
SUBNET_EVM_PATH=$(
+5 -5
View File
@@ -59,10 +59,10 @@ func RegisterPingTest() {
})
}
// RegisterNodeRun registers a before suite that starts an LuxGo process to use for the e2e tests
// and an after suite that stops the LuxGo process
// RegisterNodeRun registers a before suite that starts an Luxd process to use for the e2e tests
// and an after suite that stops the Luxd process
func RegisterNodeRun() {
// BeforeSuite starts an LuxGo process to use for the e2e tests
// BeforeSuite starts an Luxd process to use for the e2e tests
var startCmd *cmd.Cmd
_ = ginkgo.BeforeSuite(func() {
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
@@ -70,7 +70,7 @@ func RegisterNodeRun() {
wd, err := os.Getwd()
gomega.Expect(err).Should(gomega.BeNil())
log.Info("Starting LuxGo node", "wd", wd)
log.Info("Starting Luxd node", "wd", wd)
cmd, err := RunCommand("./scripts/run.sh")
startCmd = cmd
gomega.Expect(err).Should(gomega.BeNil())
@@ -80,7 +80,7 @@ func RegisterNodeRun() {
healthy, err := health.AwaitReady(ctx, healthClient, HealthCheckTimeout, nil)
gomega.Expect(err).Should(gomega.BeNil())
gomega.Expect(healthy).Should(gomega.BeTrue())
log.Info("LuxGo node is healthy")
log.Info("Luxd node is healthy")
})
ginkgo.AfterSuite(func() {
+2 -2
View File
@@ -6,10 +6,10 @@ package utils
import "time"
const (
// Timeout to boot the LuxGo node
// Timeout to boot the Luxd node
BootLuxNodeTimeout = 5 * time.Minute
// Timeout for the health API to check the LuxGo is ready
// Timeout for the health API to check the Luxd is ready
HealthCheckTimeout = 5 * time.Second
DefaultLocalNodeURI = "http://127.0.0.1:9650"
+12 -12
View File
@@ -34,7 +34,7 @@ type Subnet struct {
type ANRConfig struct {
LogLevel string
LuxGoExecPath string
LuxdExecPath string
PluginDir string
GlobalNodeConfig string
GlobalCChainConfig string
@@ -57,13 +57,13 @@ type NetworkManager struct {
// NewDefaultANRConfig returns a default config for launching the lux-network-runner manager
// with both a server and client.
// By default, it expands $GOPATH/src/github.com/luxdefi/node/build/ directory to extract
// the LuxGoExecPath and PluginDir arguments.
// If the LUXGO_BUILD_PATH environment variable is set, it overrides the default location for
// the LuxGoExecPath and PluginDir arguments.
// the LuxdExecPath and PluginDir arguments.
// If the LUXD_BUILD_PATH environment variable is set, it overrides the default location for
// the LuxdExecPath and PluginDir arguments.
func NewDefaultANRConfig() ANRConfig {
defaultConfig := ANRConfig{
LogLevel: "info",
LuxGoExecPath: os.ExpandEnv("$GOPATH/src/github.com/luxdefi/node/build/node"),
LuxdExecPath: os.ExpandEnv("$GOPATH/src/github.com/luxdefi/node/build/node"),
PluginDir: os.ExpandEnv("$GOPATH/src/github.com/luxdefi/node/build/plugins"),
GlobalNodeConfig: `{
"log-display-level":"info",
@@ -74,9 +74,9 @@ func NewDefaultANRConfig() ANRConfig {
"log-level": "debug"
}`,
}
// If LUXGO_BUILD_PATH is populated, override location set by GOPATH
if envBuildPath, exists := os.LookupEnv("LUXGO_BUILD_PATH"); exists {
defaultConfig.LuxGoExecPath = fmt.Sprintf("%s/node", envBuildPath)
// If LUXD_BUILD_PATH is populated, override location set by GOPATH
if envBuildPath, exists := os.LookupEnv("LUXD_BUILD_PATH"); exists {
defaultConfig.LuxdExecPath = fmt.Sprintf("%s/node", envBuildPath)
defaultConfig.PluginDir = fmt.Sprintf("%s/plugins", envBuildPath)
}
return defaultConfig
@@ -205,7 +205,7 @@ func (n *NetworkManager) StartDefaultNetwork(ctx context.Context) (<-chan struct
return nil, err
}
log.Info("Sending 'start'", "LuxGoExecPath", n.ANRConfig.LuxGoExecPath)
log.Info("Sending 'start'", "LuxdExecPath", n.ANRConfig.LuxdExecPath)
// Start cluster
opts := []runner_sdk.OpOption{
@@ -219,7 +219,7 @@ func (n *NetworkManager) StartDefaultNetwork(ctx context.Context) (<-chan struct
}
resp, err := n.anrClient.Start(
ctx,
n.ANRConfig.LuxGoExecPath,
n.ANRConfig.LuxdExecPath,
opts...,
)
if err != nil {
@@ -230,7 +230,7 @@ func (n *NetworkManager) StartDefaultNetwork(ctx context.Context) (<-chan struct
}
// SetupNetwork constructs blockchains with the given [blockchainSpecs] and adds them to the network manager.
// Uses [execPath] as the LuxGo binary execution path for any started nodes.
// Uses [execPath] as the Luxd binary execution path for any started nodes.
// Note: this assumes that the default network has already been constructed.
func (n *NetworkManager) SetupNetwork(ctx context.Context, execPath string, blockchainSpecs []*rpcpb.BlockchainSpec) error {
// timeout according to how many blockchains we're creating
@@ -367,7 +367,7 @@ func RegisterFiveNodeSubnetRun() func() *Subnet {
gomega.Expect(err).Should(gomega.BeNil())
err = manager.SetupNetwork(
ctx,
config.LuxGoExecPath,
config.LuxdExecPath,
[]*rpcpb.BlockchainSpec{
{
VmName: evm.IDStr,
+7 -7
View File
@@ -44,11 +44,11 @@ func (s *SubnetSuite) SetBlockchainIDs(blockchainIDs map[string]string) {
s.blockchainIDs = blockchainIDs
}
// CreateSubnetsSuite creates subnets for given [genesisFiles], and registers a before suite that starts an LuxGo process to use for the e2e tests.
// CreateSubnetsSuite creates subnets for given [genesisFiles], and registers a before suite that starts an Luxd process to use for the e2e tests.
// genesisFiles is a map of test aliases to genesis file paths.
func CreateSubnetsSuite(genesisFiles map[string]string) *SubnetSuite {
// Keep track of the LuxGo external bash script, it is null for most
// processes except the first process that starts LuxGo
// Keep track of the Luxd external bash script, it is null for most
// processes except the first process that starts Luxd
var startCmd *cmd.Cmd
// This is used to pass the blockchain IDs from the SynchronizedBeforeSuite() to the tests
@@ -58,7 +58,7 @@ func CreateSubnetsSuite(genesisFiles map[string]string) *SubnetSuite {
// SynchronizedBeforeSuite() which runs once, and its return value is passed
// over to each worker.
//
// Here an LuxGo node instance is started, and subnets are created for
// Here an Luxd node instance is started, and subnets are created for
// each test case. Each test case has its own subnet, therefore all tests
// can run in parallel without any issue.
//
@@ -68,7 +68,7 @@ func CreateSubnetsSuite(genesisFiles map[string]string) *SubnetSuite {
wd, err := os.Getwd()
gomega.Expect(err).Should(gomega.BeNil())
log.Info("Starting LuxGo node", "wd", wd)
log.Info("Starting Luxd node", "wd", wd)
cmd, err := RunCommand("./scripts/run.sh")
startCmd = cmd
gomega.Expect(err).Should(gomega.BeNil())
@@ -78,7 +78,7 @@ func CreateSubnetsSuite(genesisFiles map[string]string) *SubnetSuite {
healthy, err := health.AwaitReady(ctx, healthClient, HealthCheckTimeout, nil)
gomega.Expect(err).Should(gomega.BeNil())
gomega.Expect(healthy).Should(gomega.BeTrue())
log.Info("LuxGo node is healthy")
log.Info("Luxd node is healthy")
gomega.Expect(err).NotTo(gomega.HaveOccurred())
blockchainIDs := make(map[string]string)
@@ -99,7 +99,7 @@ func CreateSubnetsSuite(genesisFiles map[string]string) *SubnetSuite {
// SynchronizedAfterSuite() takes two functions, the first runs after each test suite is done and the second
// function is executed once when all the tests are done. This function is used
// to gracefully shutdown the LuxGo node.
// to gracefully shutdown the Luxd node.
var _ = ginkgo.SynchronizedAfterSuite(func() {}, func() {
gomega.Expect(startCmd).ShouldNot(gomega.BeNil())
gomega.Expect(startCmd.Stop()).Should(gomega.BeNil())
+1 -1
View File
@@ -139,7 +139,7 @@ var _ = ginkgo.BeforeSuite(func() {
require.NoError(err)
err = manager.SetupNetwork(
ctx,
config.LuxGoExecPath,
config.LuxdExecPath,
[]*rpcpb.BlockchainSpec{
{
VmName: evm.IDStr,
+1 -1
View File
@@ -10,7 +10,7 @@ Lux Warp Messaging uses BLS Multi-Signatures with Public-Key Aggregation where e
Every node tracking a Subnet has read access to the Lux P-Chain. This provides weighted sets of BLS Public Keys that correspond to the validator sets of each Subnet on the Lux Network. Lux Warp Messaging provides a basic primitive for signing and verifying messages between Subnets: the receiving network can verify whether an aggregation of signatures from a set of source Subnet validators represents a threshold of stake large enough for the receiving network to process the message.
For more details on Lux Warp Messaging, see the LuxGo [Warp README](https://github.com/luxdefi/node/blob/warp-readme/vms/platformvm/warp/README.md).
For more details on Lux Warp Messaging, see the Luxd [Warp README](https://github.com/luxdefi/node/blob/warp-readme/vms/platformvm/warp/README.md).
## Integrating Lux Warp Messaging into the EVM
+1 -1
View File
@@ -18,7 +18,7 @@ import (
)
// This test copies the test coverage from https://github.com/luxdefi/node/blob/v1.10.0/vms/platformvm/warp/signature_test.go#L137.
// These tests are only expected to fail if there is a breaking change in LuxGo that unexpectedly changes behavior.
// These tests are only expected to fail if there is a breaking change in Luxd that unexpectedly changes behavior.
func TestSignatureVerification(t *testing.T) {
tests = []signatureTest{
{