Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

Commit

Permalink
Project clean-up
Browse files Browse the repository at this point in the history
Signed-off-by: mxmar <macht4tech@gmail.com>
  • Loading branch information
mxmar committed Jan 25, 2022
1 parent 422b7ce commit 2b0072e
Show file tree
Hide file tree
Showing 9 changed files with 15,712 additions and 23 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# LUKSO CLI
>⚠️ This page may change. Not everything is ready yet.

## Repository struct
* `./cmd/lukso-cli` is currently used to store GO source files for this `cli`
* `./test` contains all test configs used to test this script with the results stored in `./test/logs` and example Linux binary under `./test/bin` directory
## Glossary

`validator node` - it's a setup of `geth`, `beacon-chain` and `validator` binaries
`lukso-cli` is default name of `cli` binary

## Running
1. Build `go build ./cmd/lukso-cli`

2. Create `CL-Validator-wallet` directory in project root

3. Insert all pre-generated `prysm` wallet files into `CL-Validator-wallet` directory:
```
./CL-Validator-wallet
├── direct
│   └── accounts
│   └── all-accounts.keystore.json
└── keymanageropts.json
```

4. Create `password.txt` text file in project root and fill with proper `prysm` wallet password. Default password is: `Test1234`

5. Run `./lukso-cli start` to start a validator node

## Stopping

Run `./lukso-cli stop` to stop a validator node
23 changes: 1 addition & 22 deletions cmd/lukso-cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,7 @@ const (

var (
CLGrpcEndpoint = fmt.Sprintf("127.0.0.1:%d", DefaultCLGRPCPort)
AcceptTOUFlag = &cli.BoolFlag{
Name: "accept-terms-of-use",
Usage: "you must accept terms of use",
Required: true,
Value: true,
}
ForceClearDB = &cli.BoolFlag{
ForceClearDB = &cli.BoolFlag{
Name: "force-clear-db",
Usage: "Clear any previously stored data at the data directory",
}
Expand All @@ -85,7 +79,6 @@ var (
Usage: "Specify log file name, relative or absolute",
}
appFlags = []cli.Flag{
AcceptTOUFlag,
ForceClearDB,
LogFileName,
}
Expand Down Expand Up @@ -333,13 +326,6 @@ func setupOperatingSystem() {
}

func prepareCLFlags(ctx *cli.Context) (CLArguments []string) {
if !ctx.Bool(AcceptTOUFlag.Name) {
log.Fatal("you must accept terms of use")
ctx.Done()

return
}

CLArguments = append(CLArguments, "--accept-terms-of-use")

if ctx.IsSet(cmd.ForceClearDB.Name) {
Expand Down Expand Up @@ -439,13 +425,6 @@ func prepareCLFlags(ctx *cli.Context) (CLArguments []string) {
}

func prepareValidatorFlags(ctx *cli.Context) (validatorArguments []string) {
if !ctx.Bool(AcceptTOUFlag.Name) {
log.Fatal("you must accept terms of use")
ctx.Done()

return
}

validatorArguments = append(validatorArguments, "--accept-terms-of-use")

if ctx.IsSet(ForceClearDB.Name) {
Expand Down
1 change: 0 additions & 1 deletion password.txt

This file was deleted.

Binary file added test/bin/lukso-cli-v1.0.0-linux-amd64
Binary file not shown.
67 changes: 67 additions & 0 deletions test/configs/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Extends the mainnet preset
PRESET_BASE: 'mainnet'
# Genesis
# ---------------------------------------------------------------
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 1
# Jan 11st, 2022, 15:00 UTC
MIN_GENESIS_TIME: 1643120700
# Gensis fork
GENESIS_FORK_VERSION: 0x60000069
# 300 seconds (5 min)
GENESIS_DELAY: 300

# Forking
# ---------------------------------------------------------------
# Some forks are disabled for now:
# - These may be re-assigned to another fork-version later
# - Temporarily set to max uint64 value: 2**64 - 1

# Altair
ALTAIR_FORK_VERSION: 0x61000070
ALTAIR_FORK_EPOCH: 1
# BELLATRIX
BELLATRIX_FORK_VERSION: 0x62000071
BELLATRIX_FORK_EPOCH: 2
TERMINAL_TOTAL_DIFFICULTY: 50000000
TERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000000
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615

# Sharding
SHARDING_FORK_VERSION: 0x03000000
SHARDING_FORK_EPOCH: 18446744073709551615


# Time parameters
# ---------------------------------------------------------------
# 12 seconds
SECONDS_PER_SLOT: 6
# 14 (estimate from Eth1 mainnet)
SECONDS_PER_ETH1_BLOCK: 2
# 2**8 (= 256) epochs ~27 hours
MIN_VALIDATOR_WITHDRAWABILITY_DELAY: 256
# 2**8 (= 256) epochs ~27 hours
SHARD_COMMITTEE_PERIOD: 256
# 16 blocks is ~190s
ETH1_FOLLOW_DISTANCE: 16


# Validator cycle
# ---------------------------------------------------------------
# 2**2 (= 4)
INACTIVITY_SCORE_BIAS: 4
# 2**4 (= 16)
INACTIVITY_SCORE_RECOVERY_RATE: 16
# 2**4 * 10**9 (= 16,000,000,000) Gwei
EJECTION_BALANCE: 16000000000
# 2**2 (= 4)
MIN_PER_EPOCH_CHURN_LIMIT: 4
# 2**16 (= 65,536)
CHURN_LIMIT_QUOTIENT: 65536


# Deposit contract
# ---------------------------------------------------------------
# Custom Ethereum testnet
DEPOSIT_CHAIN_ID: 1337222
DEPOSIT_NETWORK_ID: 1337222
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242
Loading

0 comments on commit 2b0072e

Please sign in to comment.