Skip to content

Commit

Permalink
feat: initial devnet
Browse files Browse the repository at this point in the history
  • Loading branch information
eddort committed Jan 22, 2025
1 parent 333900e commit a497f1f
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 9 deletions.
40 changes: 40 additions & 0 deletions docker-compose.devnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: '3.7'

networks:
devnet:
name: ${DOCKER_NETWORK_NAME}
external: true

services:
rabbit:
build:
context: .
dockerfile: Dockerfile.test.yml
container_name: 'rabbitmq'
ports:
- "15674:15674"
- "15672:15672"

council_daemon:
build: ./
networks:
- devnet
ports:
- "127.0.0.1:${PORT}:3000"
environment:
- PORT=3000
- LOG_LEVEL=${LOG_LEVEL}
- LOG_FORMAT=${LOG_FORMAT}
- RPC_URL=${RPC_URL}
- WALLET_PRIVATE_KEY=${WALLET_PRIVATE_KEY}
- KEYS_API_HOST=${KEYS_API_HOST}
- KEYS_API_PORT=${KEYS_API_PORT}
- PUBSUB_SERVICE=rabbitmq
- RABBITMQ_URL=${RABBITMQ_URL}
- RABBITMQ_LOGIN=${RABBITMQ_LOGIN}
- RABBITMQ_PASSCODE=${RABBITMQ_PASSCODE}
- LOCATOR_DEVNET_ADDRESS=${LOCATOR_DEVNET_ADDRESS}
volumes:
- ./.volumes/cache/:/council/cache/
# volumes:
# council_cache:
8 changes: 8 additions & 0 deletions src/bls/bls.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,18 @@ export const DOMAIN_DEPOSIT = Uint8Array.from([3, 0, 0, 0]);
export const GENESIS_FORK_VERSION_MAINNET = Version.fromJson('0x00000000');
export const GENESIS_FORK_VERSION_PRATER = Version.fromJson('0x00001020');
export const GENESIS_FORK_VERSION_HOLESKY = Version.fromJson('0x01017000');
export const GENESIS_FORK_VERSION_DEVNET = Version.fromJson('0x10000038');
export const GENESIS_FORK_VERSION_DEVNET_PECTRA5 = Version.fromJson('0x10710240');

export const ZERO_HASH = Buffer.alloc(32, 0);

const LOCAL_DEVNET_CHAIN_ID = 32382;
const PECTRA_5_DEVNET_CHAIN_ID = 7088110746;

export const GENESIS_FORK_VERSION_BY_CHAIN_ID = {
[CHAINS.Mainnet]: GENESIS_FORK_VERSION_MAINNET,
[CHAINS.Goerli]: GENESIS_FORK_VERSION_PRATER,
[CHAINS.Holesky]: GENESIS_FORK_VERSION_HOLESKY,
[LOCAL_DEVNET_CHAIN_ID]: GENESIS_FORK_VERSION_DEVNET,
[PECTRA_5_DEVNET_CHAIN_ID]: GENESIS_FORK_VERSION_DEVNET_PECTRA5,
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { CHAINS } from '@lido-sdk/constants';

export const DEPLOYMENT_BLOCK_NETWORK: {
[key in CHAINS]?: number;
} = {
const LOCAL_DEVNET_CHAIN_ID = 32382;
const PECTRA_5_DEVNET_CHAIN_ID = 7088110746;

export const DEPLOYMENT_BLOCK_NETWORK = {
[CHAINS.Mainnet]: 11052984,
[CHAINS.Goerli]: 4367322,
[CHAINS.Holesky]: 0,
[LOCAL_DEVNET_CHAIN_ID]: 0,
[PECTRA_5_DEVNET_CHAIN_ID]: 0,
};

export const DEPOSIT_EVENTS_STEP = 10_000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ export const SIGNING_KEYS_CACHE_DEFAULT = Object.freeze({
data: [],
});

export const EARLIEST_MODULE_DEPLOYMENT_BLOCK_NETWORK: {
[key in CHAINS]?: number;
} = {
const LOCAL_DEVNET_CHAIN_ID = 32382;
const PECTRA_5_DEVNET_CHAIN_ID = 7088110746;

export const EARLIEST_MODULE_DEPLOYMENT_BLOCK_NETWORK = {
[CHAINS.Mainnet]: 11473216,
[CHAINS.Holesky]: 0,
[LOCAL_DEVNET_CHAIN_ID]: 0,
[PECTRA_5_DEVNET_CHAIN_ID]: 0,
};

// will make a gap in case of reorganization
Expand Down
9 changes: 6 additions & 3 deletions src/messages/messages.constants.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { CHAINS } from '@lido-sdk/constants';

export const MESSAGE_TOPIC_PREFIX_BY_NETWORK: {
[key in CHAINS]?: string;
} = {
const LOCAL_DEVNET_CHAIN_ID = 32382;
const PECTRA_5_DEVNET_CHAIN_ID = 7088110746;

export const MESSAGE_TOPIC_PREFIX_BY_NETWORK = {
[CHAINS.Mainnet]: 'mainnet',
[CHAINS.Goerli]: 'goerli',
[CHAINS.Holesky]: 'holesky',
[LOCAL_DEVNET_CHAIN_ID]: 'devnet',
[PECTRA_5_DEVNET_CHAIN_ID]: 'devnet-pectra5',
};

export const getMessageTopicPrefix = (chainId: CHAINS): string => {
Expand Down

0 comments on commit a497f1f

Please sign in to comment.