Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fefd7c2
feat(sr-66): setup
AlexandrMov Sep 26, 2025
bc2eac9
fix: network defaults path
AlexandrMov Sep 29, 2025
2861028
feat: toml config file
AlexandrMov Sep 30, 2025
2ad46c4
feat: add additional oracleDaemonConfig parameters for Lido core repo…
eddort Sep 30, 2025
c9a8630
Merge branch 'feat/update-prepare-lido-core' of github.com:lidofinanc…
eddort Sep 30, 2025
07e31e7
feat: unify prepare-repository script
eddort Sep 30, 2025
575baee
feat: add new parameters for Lido contract deployment configurations
eddort Sep 30, 2025
c1f98d2
Merge pull request #60 from lidofinance/feature/sr-66-devnet0-1-prepa…
AlexandrMov Sep 30, 2025
9352349
feat: add exitEventsLookbackWindowInSlots parameter to deployment com…
eddort Sep 30, 2025
0cb2d04
Merge pull request #61 from lidofinance/feature/sr-66-devnet0-1-prepa…
AlexandrMov Sep 30, 2025
43b33a8
feat: 3 NORs
AlexandrMov Sep 30, 2025
8e28b73
feat: enhance config file handling for TOML and JSON formats in prepa…
eddort Sep 30, 2025
7b1acae
Merge pull request #62 from lidofinance/feature/sr-66-devnet0-1-prepa…
AlexandrMov Sep 30, 2025
6726118
fix: no ssh private key path by default
AlexandrMov Oct 1, 2025
c88e837
fix: out-dated asserts
AlexandrMov Oct 1, 2025
14f56eb
feat: upgrade adding new operator
AlexandrMov Oct 1, 2025
8e1e9f1
Merge branch 'feature/v2-improvements' into feature/sr-66-devnet0-1
AlexandrMov Oct 15, 2025
3264158
fix: deposits by EOA
AlexandrMov Oct 15, 2025
a5af4de
feat: max_per_epoch_activation_exit_churn_limit introduced
AlexandrMov Oct 18, 2025
4e1bddb
feat: max_per_epoch_activation_exit_churn_limit introduced
AlexandrMov Oct 19, 2025
3ec5eae
fix: node update
AlexandrMov Oct 29, 2025
dd48ef9
branch updated
AlexandrMov Oct 29, 2025
c8a8639
branch updated
AlexandrMov Oct 29, 2025
7ad62a0
Merge branch 'feature/v2-improvements' into feature/sr-66-devnet0-1
AlexandrMov Oct 29, 2025
9e58b6e
fix: update oracle branch
AlexandrMov Oct 30, 2025
d0fb209
feat: add commands for archiving and restoring network artifacts
eddort Oct 31, 2025
fb881c8
Merge branch 'feature/sr-66-devnet0-1' of github.com:lidofinance/lido…
eddort Oct 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/fp/tsconfig.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"root":["./src/TaskEither.ts","./src/index.ts"],"version":"5.7.3"}
{"root":["./src/taskeither.ts","./src/index.ts"],"version":"5.7.3"}
1 change: 1 addition & 0 deletions packages/services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@devnet/utils": "workspace:*",
"@fastify/swagger": "^9.4.2",
"@fastify/swagger-ui": "^5.2.1",
"@iarna/toml": "^2.2.5",
"@oclif/core": "^4.0.37",
"@oclif/plugin-help": "^6.2.19",
"@types/node": "^22.10.5",
Expand Down
9 changes: 9 additions & 0 deletions packages/services/src/devnet-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
} from "node:fs/promises";
import path from "node:path";
import * as YAML from "yaml";
import * as toml from "@iarna/toml";

import { DevnetServiceArtifact } from "./devnet-service-artifact.js";
import { serviceConfigs } from "./embedded/index.js";
Expand Down Expand Up @@ -192,6 +193,10 @@ export class DevNetService<Name extends keyof DevNetServicesConfigs> {
return JSON.parse(await this.readFile(relativePath));
}

public async readToml(relativePath: string) {
return toml.parse(await this.readFile(relativePath));
}

public async readYaml(relativePath: string) {
return YAML.parse(await this.readFile(relativePath), { intAsBigInt: true });
}
Expand Down Expand Up @@ -226,6 +231,10 @@ export class DevNetService<Name extends keyof DevNetServicesConfigs> {
return await this.writeFile(relativePath, json);
}

public async writeToml(relativePath: string, fileContent: toml.JsonMap) {
return await this.writeFile(relativePath, toml.stringify(fileContent));
}

public async writeYaml(relativePath: string, fileContent: unknown) {
return await this.writeFile(relativePath, YAML.stringify(fileContent));
}
Expand Down
2 changes: 1 addition & 1 deletion packages/services/src/embedded/csm-prover-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { DevnetServiceConfig } from "../devnet-service-config.js";
export const csmProverTool = new DevnetServiceConfig({
repository: {
url: "[email protected]:lidofinance/csm-prover-tool.git",
branch: "feat/support-fusaka",
branch: "develop",
},
workspace: "workspaces/csm-prover-tool",
name: "csmProverTool" as const,
Expand Down
13 changes: 13 additions & 0 deletions packages/services/src/embedded/genesis-generator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { DevnetServiceConfig } from "../devnet-service-config.js";

export const ethGenenisGenerator = new DevnetServiceConfig({
repository: {
url: "[email protected]:AlexandrMov/ethereum-genesis-generator.git",
branch: "master",
},
workspace: "workspaces/genesis-generator",
name: "ethGenenisGenerator" as const,
constants: {},
labels: {},
getters: {},
});
2 changes: 2 additions & 0 deletions packages/services/src/embedded/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { csmProverTool } from "./csm-prover-tool.js";
import { dataBus } from "./data-bus.js";
import { dockerRegistry } from "./docker-registry.js";
import { dsmBots } from "./dsm-bots.js";
import { ethGenenisGenerator } from "./genesis-generator.js";
import { kapi } from "./kapi.js";
import { kubo } from "./kubo.js";
import { kurtosis } from "./kurtosis.js"
Expand All @@ -19,6 +20,7 @@ import { voting } from "./voting.js";

export const serviceConfigs = {
blockscout,
ethGenenisGenerator,
lateProverBot,
lidoCore,
lidoCLI,
Expand Down
2 changes: 1 addition & 1 deletion packages/services/src/embedded/lido-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { DevnetServiceConfig } from "../devnet-service-config.js";
export const lidoCLI = new DevnetServiceConfig({
repository: {
url: "https://github.com/lidofinance/lido-cli.git",
branch: "fix/vroom-306-temp-fix-fusaka-1",
branch: "feature/sr-66-devnet0-1",
},
name: "lidoCLI" as const,
constants: {
Expand Down
5 changes: 3 additions & 2 deletions packages/services/src/embedded/lido-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { DevnetServiceConfig } from "../devnet-service-config.js";
export const lidoCore = new DevnetServiceConfig({
repository: {
url: "[email protected]:lidofinance/core.git",
branch: "develop",
branch: "feat/staking-router-3.0",
},
name: "lidoCore" as const,
constants: {
Expand All @@ -13,9 +13,10 @@ export const lidoCore = new DevnetServiceConfig({
GAS_PRIORITY_FEE: "1",
NETWORK: "local-devnet",
NETWORK_STATE_DEFAULTS_FILE:
"scripts/scratch/deployed-testnet-defaults.json",
"scripts/defaults/local-devnet-defaults.json",
NETWORK_STATE_FILE: `deployed-local-devnet.json`,
SLOTS_PER_EPOCH: "32",
SCRATCH_DEPLOY_CONFIG: "scripts/scratch/deploy-params-testnet.toml",
},
hooks: {
install: "lido-core:install",
Expand Down
2 changes: 1 addition & 1 deletion packages/services/src/embedded/oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { DevnetServiceConfig } from "../devnet-service-config.js";
export const oracle = new DevnetServiceConfig({
repository: {
url: "https://github.com/lidofinance/lido-oracle.git",
branch: "fix/vroom-306-temp-fix-fusaka-1",
branch: "feat/srv3-accounting",
},
workspace: "workspaces/oracle",
name: "oracle" as const,
Expand Down
54 changes: 54 additions & 0 deletions src/commands/artifact/dump.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { Params, command } from "@devnet/command";
import { execa } from "execa";
import { access } from "node:fs/promises";
import path from "node:path";

export const ArtifactsDump = command.cli({
description: "Archive network artifacts excluding node_modules",
params: {
output: Params.string({
description:
"Output path for the archive (default: ./{network-name}.tar.gz)",
required: false,
}),
},
async handler({ dre, params }) {
const { logger, network } = dre;
const networkName = network.name;

const artifactsRoot = path.join(process.cwd(), "artifacts");
const networkArtifactsPath = path.join(artifactsRoot, networkName);

try {
await access(networkArtifactsPath);
} catch {
logger.error(`Network artifacts not found: ${networkArtifactsPath}`);
throw new Error(`Network "${networkName}" artifacts do not exist`);
}

const defaultOutput = path.join(process.cwd(), `${networkName}.tar.gz`);
const outputPath = params.output || defaultOutput;

logger.log(`Archiving artifacts for network: ${networkName}`);
logger.log(`Source: ${networkArtifactsPath}`);
logger.log(`Output: ${outputPath}`);

try {
const sh = execa({ stdio: "inherit" });

logger.log("Creating archive...");

// Create tar.gz archive excluding node_modules
await sh`tar -czf ${outputPath} -C ${artifactsRoot} --exclude=node_modules ${networkName}`;

logger.log(`Archive created successfully: ${outputPath}`);

const { stdout } = await execa`du -h ${outputPath}`;
const size = stdout.split("\t")[0];
logger.log(`Archive size: ${size}`);
} catch (error) {
logger.error("Failed to create archive");
throw error;
}
},
});
83 changes: 83 additions & 0 deletions src/commands/artifact/restore.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import { Params, command } from "@devnet/command";
import { execa } from "execa";
import { access } from "node:fs/promises";
import path from "node:path";

export const ArtifactsRestore = command.cli({
description:
"Restore network artifacts from archive and install dependencies",
params: {
archive: Params.string({
description:
"Path to the archive file (default: ./{network-name}.tar.gz)",
required: false,
}),
skipInstall: Params.boolean({
description: "Skip installing dependencies",
required: false,
default: false,
}),
},
async handler({ dre, params }) {
const { logger, network, services } = dre;
const networkName = network.name;

// Determine archive path
const defaultArchive = path.join(process.cwd(), `${networkName}.tar.gz`);
const archivePath = params.archive || defaultArchive;

// Check if archive exists
try {
await access(archivePath);
} catch {
logger.error(`Archive not found: ${archivePath}`);
throw new Error(`Archive file does not exist: ${archivePath}`);
}

const artifactsRoot = path.join(process.cwd(), "artifacts");
const networkArtifactsPath = path.join(artifactsRoot, networkName);

logger.log(`Restoring artifacts for network: ${networkName}`);
logger.log(`Archive: ${archivePath}`);
logger.log(`Target: ${networkArtifactsPath}`);

try {
const sh = execa({ stdio: "inherit" });

// Extract archive
logger.log("Extracting archive...");
await sh`tar -xzf ${archivePath} -C ${artifactsRoot}`;
logger.log("Archive extracted successfully");

// Skip dependency installation if requested
if (params.skipInstall) {
logger.log("Skipping dependency installation");
return;
}

// Install dependencies for each service
logger.log("Installing dependencies...");

for (const [name, service] of Object.entries(services)) {
try {
// Check if package.json exists in the service directory
const packageJsonPath = path.join(
service.artifact.root,
"package.json",
);
await access(packageJsonPath);

logger.log(`Installing dependencies for ${name}...`);
await service.sh`yarn install`;
} catch {
logger.log(`Skipped yarn installation for ${name}`);
}
}

logger.log("Artifacts restored successfully");
} catch (error) {
logger.error("Failed to restore artifacts");
throw error;
}
},
});
5 changes: 3 additions & 2 deletions src/commands/csm-prover-tool-k8s/up.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const CSMProverToolK8sUp = command.cli({
}

const { elPrivate, clPrivate } = await state.getChain();
const { el, cl } = await state.getNodesIngress();
const { verifier: csVerifier, module: csModule } = await state.getCSM();
const { privateUrl: kapiPrivateUrl } = await state.getKapiK8sRunning();
const { deployer } = await state.getNamedWallet();
Expand All @@ -49,8 +50,8 @@ export const CSMProverToolK8sUp = command.cli({
...csmProverTool.config.constants,

CHAIN_ID: "32382",
EL_RPC_URLS: elPrivate,
CL_API_URLS: clPrivate,
EL_RPC_URLS: el[1].publicIngressUrl,
CL_API_URLS: cl[1].publicIngressUrl,
KEYSAPI_API_URLS: kapiPrivateUrl,
CSM_ADDRESS: csModule,
VERIFIER_ADDRESS: csVerifier,
Expand Down
35 changes: 35 additions & 0 deletions src/commands/genesis-generator/build.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { command } from "@devnet/command";
import { buildAndPushDockerImage } from "@devnet/docker";

import { SERVICE_NAME } from "./constants/genesis-generator.constants.js";
import { genesisGeneratorExtension } from "./extensions/genesis-generator.extension.js";

export const GenesisGeneratorK8SBuild = command.isomorphic({
description: `Build ${SERVICE_NAME} and push to Docker registry`,
params: {},
extensions: [genesisGeneratorExtension],
async handler({ dre: { state, network, services, logger } }) {
const dockerRegistry = await state.getDockerRegistry();

const TAG = `kt-${network.name}`;
const IMAGE = 'lido/lido-genesis-generator';

await buildAndPushDockerImage({
cwd: services.ethGenenisGenerator.artifact.root,
registryHostname: dockerRegistry.registryHostname,
buildContext: '.',
imageName: IMAGE,
tag: TAG,
password: process.env.DOCKER_REGISTRY_PASSWORD ?? 'admin',
username: process.env.DOCKER_REGISTRY_USERNAME ?? 'changeme',
});

logger.log(`${SERVICE_NAME} image pushed to ${dockerRegistry.registryUrl}/${IMAGE}:${TAG}`);

await state.updateGenesisGeneratorImage({
tag: TAG,
image: IMAGE,
registryHostname: dockerRegistry.registryHostname,
})
},
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { DevNetRuntimeEnvironmentInterface } from "@devnet/command";

export const NAMESPACE = (dre: DevNetRuntimeEnvironmentInterface) =>
`kt-${dre.network.name}-genesis-generator`;

export const SERVICE_NAME = "Ethereum Genesis Generator";
Loading