MCPcopy Index your code
hub / github.com/ChainSafe/ChainGuardian

github.com/ChainSafe/ChainGuardian @v0.7.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.7.1 ↗ · + Follow
986 symbols 2,265 edges 364 files 19 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ChainGuardian

Build Status codecov Discord GitHub

Eth2.0 desktop validator client.

Install

Clone the repository with Git:

git clone git@github.com:chainsafe/ChainGuardian.git

And then install the dependencies:

cd ChainGuardian
yarn install

Usage

Both processes have to be started simultaneously in different console tabs:

yarn run start-renderer-dev
yarn run start-main-dev

This will start the application with hot-reload so you can instantly start developing your application.

You can also run do the following to start both in a single process:

yarn run start-dev

UI development

For building components in isolation you can use Storybook.

Just run yarn storybook

Design is based on: https://www.figma.com/file/dt1Z45BJkDGOg63IdNYwbR

Development

It's best to use local network. Local network is configured using docker-compose (currently available lighthouse-testnet.yml). For the first time you need to run setup script (setup.sh) on path ./testnet/lighthouse then type docker-compose -f lighthouse-testnet.yml up in terminal,
you will get: - 2 working lighthouse beacon nodes (port: 5052 and 6052) - lighthouse validator with 15 dummy account

To start using local network just add beacon node with address http://localhost:5052.
You can use this account to validate using ChainGuardian (or create new via launchpad): - private key: 0x51d0b65185db6989ab0b560d6deed19c7ead0e24b9b6372cbecb1f26bdfad000 - public key: 0xb89bebc699769726a318c8e9971bd3171297c61aea4a6578a7a4f94b547dcba5bac16a89108b6b6a1fe3695d1a874a0b

In case of longer break it is recommended to update genesis time before starting local tesnet with reset_genesis_time.sh script

Packaging

We use Electron builder to build and package the application. By default you can run the following to package for your current platform:

npm run dist

This will create a installer for your platform in the releases folder.

You can make builds for specific platforms (or multiple platforms) by using the options found here. E.g. building for all platforms (Windows, Mac, Linux):

npm run dist -- -mwl

License

GNU General Public License v3.0

Built with:

React Webpack TypeScript Electron Redux Jest

Extension points exported contracts — how you extend this code

IService (Interface)
(no doc) [5 implementers]
src/renderer/services/interfaces.ts
IGithubRelease (Interface)
(no doc)
types/githubRelease.dto.ts
ITestType (Interface)
(no doc)
test/unit/db/api/repository.spec.ts
ILevelDBOptions (Interface)
(no doc)
src/main/db/controller/impl/level.ts
IConfig (Interface)
(no doc)
src/config/config.ts
IPBKDFParamsOut (Interface)
* Keystore interfaces *
src/renderer/services/interfaces.ts
IAuthor (Interface)
(no doc)
types/githubRelease.dto.ts
ICGLogger (Interface)
(no doc) [2 implementers]
src/renderer/services/utils/logging/interface.ts

Core symbols most depended-on inside this repo

push
called by 79
src/renderer/services/utils/logging/interface.ts
create
called by 63
src/renderer/services/keystore/eth2.ts
info
called by 44
src/renderer/services/docker/command.ts
set
called by 29
src/renderer/services/db/api/repositories/beacons.ts
get
called by 26
src/renderer/services/db/controller/ipc.ts
getPath
called by 24
src/renderer/services/keystore/interface.ts
getKeyName
called by 24
src/renderer/services/db/api/repositories/beaconNode.ts
isCurrentOrNewerVersion
called by 21
src/renderer/services/utils/githubReleases.ts

Shape

Function 432
Method 286
Class 126
Interface 123
Enum 19

Languages

TypeScript100%

Modules by API surface

src/renderer/services/eth2/client/eth2ApiClient/CgEth2BeaconApi.ts28 symbols
src/renderer/services/docker/container.ts25 symbols
src/main/db/controller/impl/level.ts19 symbols
src/renderer/services/db/controller/ipc.ts17 symbols
src/renderer/ducks/validator/sagas.ts16 symbols
src/renderer/services/docker/command.ts15 symbols
src/renderer/services/keystore/eth2.ts14 symbols
src/renderer/models/account.ts14 symbols
src/renderer/services/eth2/client/eth2ApiClient/CgEth2ValidatorApi.ts13 symbols
src/renderer/services/docker/stats.ts12 symbols
src/renderer/containers/AddBeaconNode/AddBeaconNode.tsx12 symbols
src/renderer/services/eth2/client/eth2ApiClient/CgEth2LodestarApi.ts11 symbols

For agents

$ claude mcp add ChainGuardian \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact