-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ADD: staking csm preset * REFACTOR: revert thecarousel to avoid merge conflict * FIX: modify kapi via edit node
- Loading branch information
Showing
13 changed files
with
231 additions
and
192 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
150 changes: 80 additions & 70 deletions
150
launcher/src/backend/ethereum-services/KeysAPIService.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,84 @@ | ||
import { NodeService } from "./NodeService"; | ||
|
||
export class KeysAPIService extends NodeService { | ||
static buildByUserInput(network, ports) { | ||
const service = new KeysAPIService(); | ||
service.setId(); | ||
|
||
const image = "lidofinance/lido-keys-api"; | ||
|
||
service.init( | ||
"KeysAPIService", | ||
service.id, // id | ||
1, // configVersion | ||
image, // image | ||
"dev", // imageVersion | ||
[], // command | ||
[], // entrypoint | ||
{ | ||
// App | ||
PORT: "3600", | ||
|
||
// The number of seconds that each request will last in storage | ||
GLOBAL_THROTTLE_TTL: "5", | ||
|
||
// The maximum number of requests within the TTL limit | ||
GLOBAL_THROTTLE_LIMIT: "100", | ||
|
||
// Cache expiration time in seconds | ||
GLOBAL_CACHE_TTL: "1", | ||
|
||
|
||
// Log level: debug, info, notice, warning or error | ||
LOG_LEVEL: "info", | ||
|
||
// Log format: simple or json | ||
LOG_FORMAT: "simple", | ||
PROVIDERS_URLS: "http://your_el_node1,http://your_el_node2", | ||
// chain id | ||
// for mainnet 1 | ||
// for testnet 5 | ||
CHAIN_ID: network == "mainnet" ? "1" : "5", | ||
|
||
DB_NAME: "node_operator_keys_service_db", | ||
DB_PORT: "5432", | ||
DB_HOST: "localhost", | ||
DB_USER: "postgres", | ||
DB_PASSWORD: "postgres", | ||
|
||
// It is possible to enable/disable collecting of validators | ||
// value below is default | ||
VALIDATOR_REGISTRY_ENABLE: "true", | ||
|
||
// CL api urls | ||
// if VALIDATOR_REGISTRY_ENABLE=false , there are no need to provide CL_API_URLS | ||
CL_API_URLS: "http://your_cl_node1,http://your_cl_node2" | ||
}, // env | ||
ports, // ports | ||
[], // volumes | ||
null, // user | ||
network // network | ||
// executionClients | ||
// consensusClients | ||
); | ||
return service; | ||
} | ||
|
||
static buildByConfiguration(config) { | ||
const service = new KeysAPIService(); | ||
|
||
service.initByConfig(config); | ||
|
||
return service; | ||
} | ||
static buildByUserInput(network, ports, executionClients, consensusClients) { | ||
const service = new KeysAPIService(); | ||
service.setId(); | ||
|
||
const image = "lidofinance/lido-keys-api"; | ||
|
||
service.init( | ||
"KeysAPIService", | ||
service.id, // id | ||
1, // configVersion | ||
image, // image | ||
"dev", // imageVersion | ||
[], // command | ||
[], // entrypoint | ||
{ | ||
// App | ||
PORT: "3600", | ||
|
||
// The number of seconds that each request will last in storage | ||
GLOBAL_THROTTLE_TTL: "5", | ||
|
||
// The maximum number of requests within the TTL limit | ||
GLOBAL_THROTTLE_LIMIT: "100", | ||
|
||
// Cache expiration time in seconds | ||
GLOBAL_CACHE_TTL: "1", | ||
|
||
// Log level: debug, info, notice, warning or error | ||
LOG_LEVEL: "info", | ||
|
||
// Log format: simple or json | ||
LOG_FORMAT: "simple", | ||
|
||
PROVIDERS_URLS: executionClients[0] | ||
? executionClients[0].buildExecutionClientHttpEndpointUrl() | ||
: "http://your_el_node1,http://your_el_node2", | ||
|
||
// chain id | ||
// for mainnet 1 | ||
// for testnet 17000 | ||
CHAIN_ID: network == "mainnet" ? "1" : "17000", | ||
|
||
DB_NAME: "node_operator_keys_service_db", | ||
DB_PORT: "5432", | ||
DB_HOST: "localhost", | ||
DB_USER: "postgres", | ||
DB_PASSWORD: "postgres", | ||
|
||
// It is possible to enable/disable collecting of validators | ||
// value below is default | ||
VALIDATOR_REGISTRY_ENABLE: "true", | ||
|
||
// CL api urls | ||
// if VALIDATOR_REGISTRY_ENABLE=false , there are no need to provide CL_API_URLS | ||
CL_API_URLS: consensusClients[0] | ||
? consensusClients[0].buildConsensusClientHttpEndpointUrl() | ||
: "http://your_cl_node1,http://your_cl_node2", | ||
}, // env | ||
ports, // ports | ||
[], // volumes | ||
null, // user | ||
// network // network | ||
// // executionClients | ||
// // consensusClients | ||
network, // network | ||
executionClients[0] ? [executionClients[0]] : [], // executionClients | ||
consensusClients[0] ? [consensusClients[0]] : [], // consensusClients | ||
[], // MevBoost | ||
[] // otherServices | ||
); | ||
return service; | ||
} | ||
|
||
static buildByConfiguration(config) { | ||
const service = new KeysAPIService(); | ||
|
||
service.initByConfig(config); | ||
|
||
return service; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.