Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chainsafe/eth2.0-params

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chainsafe/eth2.0-params - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

README.md

2

lib/index.js

@@ -13,3 +13,3 @@ "use strict";

enumerable: true,
get: function () {
get: function get() {
return _interface[key];

@@ -16,0 +16,0 @@ }

@@ -1,9 +0,7 @@

/// <reference types="node" />
/**
* @module params
*/
import BN from "bn.js";
import { Epoch, Gwei, Slot, Shard } from "@chainsafe/eth2.0-types";
/// <reference types="node" />
export interface IBeaconParams {
SHARD_COUNT: number;
MAX_COMMITTEES_PER_SLOT: number;
TARGET_COMMITTEE_SIZE: number;

@@ -16,12 +14,14 @@ MAX_VALIDATORS_PER_COMMITTEE: number;

MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: number;
TARGET_AGGREGATORS_PER_COMMITTEE: number;
DEPOSIT_CONTRACT_ADDRESS: number;
MIN_DEPOSIT_AMOUNT: Gwei;
MAX_EFFECTIVE_BALANCE: Gwei;
EJECTION_BALANCE: Gwei;
EFFECTIVE_BALANCE_INCREMENT: Gwei;
GENESIS_SLOT: Slot;
GENESIS_EPOCH: Epoch;
MIN_DEPOSIT_AMOUNT: bigint;
MAX_EFFECTIVE_BALANCE: bigint;
EJECTION_BALANCE: bigint;
EFFECTIVE_BALANCE_INCREMENT: bigint;
GENESIS_SLOT: number;
SAFE_SLOTS_TO_UPDATE_JUSTIFIED: number;
GENESIS_EPOCH: number;
BLS_WITHDRAWAL_PREFIX_BYTE: Buffer;
GENESIS_FORK_VERSION: Buffer;
GENESIS_START_SHARD: Shard;
GENESIS_START_SHARD: number;
SECONDS_PER_SLOT: number;

@@ -31,3 +31,3 @@ MIN_ATTESTATION_INCLUSION_DELAY: number;

MIN_SEED_LOOKAHEAD: number;
ACTIVATION_EXIT_DELAY: number;
MAX_SEED_LOOKAHEAD: number;
SLOTS_PER_ETH1_VOTING_PERIOD: number;

@@ -38,3 +38,2 @@ ETH1_FOLLOW_DISTANCE: number;

PERSISTENT_COMMITTEE_PERIOD: number;
MAX_EPOCHS_PER_CROSSLINK: number;
MIN_EPOCHS_TO_INACTIVITY_PENALTY: number;

@@ -49,3 +48,3 @@ EPOCHS_PER_HISTORICAL_VECTOR: number;

PROPOSER_REWARD_QUOTIENT: number;
INACTIVITY_PENALTY_QUOTIENT: BN;
INACTIVITY_PENALTY_QUOTIENT: bigint;
MIN_SLASHING_PENALTY_QUOTIENT: number;

@@ -57,3 +56,2 @@ MAX_PROPOSER_SLASHINGS: number;

MAX_VOLUNTARY_EXITS: number;
MAX_TRANSFERS: number;
}

@@ -1,7 +0,6 @@

/// <reference types="node" />
/**
* @module params/presets/mainnet
*/
import BN from "bn.js";
export declare const SHARD_COUNT: number;
/// <reference types="node" />
export declare const MAX_COMMITTEES_PER_SLOT: number;
export declare const TARGET_COMMITTEE_SIZE: number;

@@ -11,13 +10,15 @@ export declare const MAX_VALIDATORS_PER_COMMITTEE: number;

export declare const CHURN_LIMIT_QUOTIENT: number;
export declare const BASE_REWARDS_PER_EPOCH = 5;
export declare const BASE_REWARDS_PER_EPOCH = 4;
export declare const SHUFFLE_ROUND_COUNT = 90;
export declare const MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: number;
export declare const MIN_GENESIS_TIME = 1578009600;
export declare const TARGET_AGGREGATORS_PER_COMMITTEE = 16;
export declare const DEPOSIT_CONTRACT_ADDRESS = 0;
export declare const DEPOSIT_CONTRACT_TREE_DEPTH: number;
export declare const MIN_DEPOSIT_AMOUNT: BN;
export declare const MAX_EFFECTIVE_BALANCE: BN;
export declare const EJECTION_BALANCE: BN;
export declare const EFFECTIVE_BALANCE_INCREMENT: BN;
export declare const MIN_DEPOSIT_AMOUNT: bigint;
export declare const MAX_EFFECTIVE_BALANCE: bigint;
export declare const EJECTION_BALANCE: bigint;
export declare const EFFECTIVE_BALANCE_INCREMENT: bigint;
export declare const GENESIS_SLOT = 0;
export declare const SAFE_SLOTS_TO_UPDATE_JUSTIFIED = 8;
export declare const GENESIS_EPOCH = 0;

@@ -27,7 +28,7 @@ export declare const BLS_WITHDRAWAL_PREFIX_BYTE: Buffer;

export declare const GENESIS_START_SHARD = 0;
export declare const SECONDS_PER_SLOT = 6;
export declare const SECONDS_PER_SLOT = 12;
export declare const MIN_ATTESTATION_INCLUSION_DELAY: number;
export declare const SLOTS_PER_EPOCH: number;
export declare const MIN_SEED_LOOKAHEAD: number;
export declare const ACTIVATION_EXIT_DELAY: number;
export declare const MAX_SEED_LOOKAHEAD: number;
export declare const SLOTS_PER_ETH1_VOTING_PERIOD: number;

@@ -38,4 +39,2 @@ export declare const ETH1_FOLLOW_DISTANCE: number;

export declare const PERSISTENT_COMMITTEE_PERIOD: number;
export declare const MAX_EPOCHS_PER_CROSSLINK: number;
export declare const MAX_CROSSLINK_EPOCHS: number;
export declare const MIN_EPOCHS_TO_INACTIVITY_PENALTY: number;

@@ -49,3 +48,3 @@ export declare const EPOCHS_PER_HISTORICAL_VECTOR: number;

export declare const PROPOSER_REWARD_QUOTIENT: number;
export declare const INACTIVITY_PENALTY_QUOTIENT: BN;
export declare const INACTIVITY_PENALTY_QUOTIENT: bigint;
export declare const MIN_SLASHING_PENALTY_QUOTIENT: number;

@@ -57,2 +56,1 @@ export declare const MAX_PROPOSER_SLASHINGS: number;

export declare const MAX_VOLUNTARY_EXITS: number;
export declare const MAX_TRANSFERS = 0;
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.MAX_TRANSFERS = exports.MAX_VOLUNTARY_EXITS = exports.MAX_DEPOSITS = exports.MAX_ATTESTATIONS = exports.MAX_ATTESTER_SLASHINGS = exports.MAX_PROPOSER_SLASHINGS = exports.MIN_SLASHING_PENALTY_QUOTIENT = exports.INACTIVITY_PENALTY_QUOTIENT = exports.PROPOSER_REWARD_QUOTIENT = exports.WHISTLEBLOWING_REWARD_QUOTIENT = exports.BASE_REWARD_FACTOR = exports.VALIDATOR_REGISTRY_LIMIT = exports.HISTORICAL_ROOTS_LIMIT = exports.EPOCHS_PER_SLASHINGS_VECTOR = exports.EPOCHS_PER_HISTORICAL_VECTOR = exports.MIN_EPOCHS_TO_INACTIVITY_PENALTY = exports.MAX_CROSSLINK_EPOCHS = exports.MAX_EPOCHS_PER_CROSSLINK = exports.PERSISTENT_COMMITTEE_PERIOD = exports.MIN_VALIDATOR_WITHDRAWAL_DELAY = exports.SLOTS_PER_HISTORICAL_ROOT = exports.ETH1_FOLLOW_DISTANCE = exports.SLOTS_PER_ETH1_VOTING_PERIOD = exports.ACTIVATION_EXIT_DELAY = exports.MIN_SEED_LOOKAHEAD = exports.SLOTS_PER_EPOCH = exports.MIN_ATTESTATION_INCLUSION_DELAY = exports.SECONDS_PER_SLOT = exports.GENESIS_START_SHARD = exports.GENESIS_FORK_VERSION = exports.BLS_WITHDRAWAL_PREFIX_BYTE = exports.GENESIS_EPOCH = exports.GENESIS_SLOT = exports.EFFECTIVE_BALANCE_INCREMENT = exports.EJECTION_BALANCE = exports.MAX_EFFECTIVE_BALANCE = exports.MIN_DEPOSIT_AMOUNT = exports.DEPOSIT_CONTRACT_TREE_DEPTH = exports.DEPOSIT_CONTRACT_ADDRESS = exports.MIN_GENESIS_TIME = exports.MIN_GENESIS_ACTIVE_VALIDATOR_COUNT = exports.SHUFFLE_ROUND_COUNT = exports.BASE_REWARDS_PER_EPOCH = exports.CHURN_LIMIT_QUOTIENT = exports.MIN_PER_EPOCH_CHURN_LIMIT = exports.MAX_VALIDATORS_PER_COMMITTEE = exports.TARGET_COMMITTEE_SIZE = exports.SHARD_COUNT = void 0;
exports.MAX_VOLUNTARY_EXITS = exports.MAX_DEPOSITS = exports.MAX_ATTESTATIONS = exports.MAX_ATTESTER_SLASHINGS = exports.MAX_PROPOSER_SLASHINGS = exports.MIN_SLASHING_PENALTY_QUOTIENT = exports.INACTIVITY_PENALTY_QUOTIENT = exports.PROPOSER_REWARD_QUOTIENT = exports.WHISTLEBLOWING_REWARD_QUOTIENT = exports.BASE_REWARD_FACTOR = exports.VALIDATOR_REGISTRY_LIMIT = exports.HISTORICAL_ROOTS_LIMIT = exports.EPOCHS_PER_SLASHINGS_VECTOR = exports.EPOCHS_PER_HISTORICAL_VECTOR = exports.MIN_EPOCHS_TO_INACTIVITY_PENALTY = exports.PERSISTENT_COMMITTEE_PERIOD = exports.MIN_VALIDATOR_WITHDRAWAL_DELAY = exports.SLOTS_PER_HISTORICAL_ROOT = exports.ETH1_FOLLOW_DISTANCE = exports.SLOTS_PER_ETH1_VOTING_PERIOD = exports.MAX_SEED_LOOKAHEAD = exports.MIN_SEED_LOOKAHEAD = exports.SLOTS_PER_EPOCH = exports.MIN_ATTESTATION_INCLUSION_DELAY = exports.SECONDS_PER_SLOT = exports.GENESIS_START_SHARD = exports.GENESIS_FORK_VERSION = exports.BLS_WITHDRAWAL_PREFIX_BYTE = exports.GENESIS_EPOCH = exports.SAFE_SLOTS_TO_UPDATE_JUSTIFIED = exports.GENESIS_SLOT = exports.EFFECTIVE_BALANCE_INCREMENT = exports.EJECTION_BALANCE = exports.MAX_EFFECTIVE_BALANCE = exports.MIN_DEPOSIT_AMOUNT = exports.DEPOSIT_CONTRACT_TREE_DEPTH = exports.DEPOSIT_CONTRACT_ADDRESS = exports.TARGET_AGGREGATORS_PER_COMMITTEE = exports.MIN_GENESIS_TIME = exports.MIN_GENESIS_ACTIVE_VALIDATOR_COUNT = exports.SHUFFLE_ROUND_COUNT = exports.BASE_REWARDS_PER_EPOCH = exports.CHURN_LIMIT_QUOTIENT = exports.MIN_PER_EPOCH_CHURN_LIMIT = exports.MAX_VALIDATORS_PER_COMMITTEE = exports.TARGET_COMMITTEE_SIZE = exports.MAX_COMMITTEES_PER_SLOT = void 0;
var _bn = _interopRequireDefault(require("bn.js"));
/**

@@ -16,9 +12,9 @@ * @module params/presets/mainnet

// Misc
const SHARD_COUNT = 2 ** 10; // 1024 shards
const MAX_COMMITTEES_PER_SLOT = 2 ** 6; // 64 committees
exports.SHARD_COUNT = SHARD_COUNT;
exports.MAX_COMMITTEES_PER_SLOT = MAX_COMMITTEES_PER_SLOT;
const TARGET_COMMITTEE_SIZE = 2 ** 7; // 128 validators
exports.TARGET_COMMITTEE_SIZE = TARGET_COMMITTEE_SIZE;
const MAX_VALIDATORS_PER_COMMITTEE = 2 ** 12; // 4096
const MAX_VALIDATORS_PER_COMMITTEE = 2 ** 11; // 2048

@@ -32,11 +28,13 @@ exports.MAX_VALIDATORS_PER_COMMITTEE = MAX_VALIDATORS_PER_COMMITTEE;

exports.CHURN_LIMIT_QUOTIENT = CHURN_LIMIT_QUOTIENT;
const BASE_REWARDS_PER_EPOCH = 5;
const BASE_REWARDS_PER_EPOCH = 4;
exports.BASE_REWARDS_PER_EPOCH = BASE_REWARDS_PER_EPOCH;
const SHUFFLE_ROUND_COUNT = 90;
exports.SHUFFLE_ROUND_COUNT = SHUFFLE_ROUND_COUNT;
const MIN_GENESIS_ACTIVE_VALIDATOR_COUNT = 2 ** 16;
const MIN_GENESIS_ACTIVE_VALIDATOR_COUNT = 2 ** 14;
exports.MIN_GENESIS_ACTIVE_VALIDATOR_COUNT = MIN_GENESIS_ACTIVE_VALIDATOR_COUNT;
const MIN_GENESIS_TIME = 1578009600; // Deposit contract
const MIN_GENESIS_TIME = 1578009600;
exports.MIN_GENESIS_TIME = MIN_GENESIS_TIME;
const TARGET_AGGREGATORS_PER_COMMITTEE = 16; // Deposit contract
exports.MIN_GENESIS_TIME = MIN_GENESIS_TIME;
exports.TARGET_AGGREGATORS_PER_COMMITTEE = TARGET_AGGREGATORS_PER_COMMITTEE;
const DEPOSIT_CONTRACT_ADDRESS = 0;

@@ -48,12 +46,12 @@ exports.DEPOSIT_CONTRACT_ADDRESS = DEPOSIT_CONTRACT_ADDRESS;

exports.DEPOSIT_CONTRACT_TREE_DEPTH = DEPOSIT_CONTRACT_TREE_DEPTH;
const MIN_DEPOSIT_AMOUNT = new _bn.default(2 ** 0 * 1e9); // 1,000,000,000 Gwei
const MIN_DEPOSIT_AMOUNT = 2n ** 0n * BigInt(1e9); // 1,000,000,000 Gwei
exports.MIN_DEPOSIT_AMOUNT = MIN_DEPOSIT_AMOUNT;
const MAX_EFFECTIVE_BALANCE = new _bn.default(2 ** 5 * 1e9); // 32,000,000,000 Gwei
const MAX_EFFECTIVE_BALANCE = 2n ** 5n * BigInt(1e9); // 32,000,000,000 Gwei
exports.MAX_EFFECTIVE_BALANCE = MAX_EFFECTIVE_BALANCE;
const EJECTION_BALANCE = new _bn.default(2 ** 4 * 1e9); // 16,000,000,000 Gwei
const EJECTION_BALANCE = 2n ** 4n * BigInt(1e9); // 16,000,000,000 Gwei
exports.EJECTION_BALANCE = EJECTION_BALANCE;
const EFFECTIVE_BALANCE_INCREMENT = new _bn.default(2 ** 0 * 1e9); // 1,000,000,000 Gwei
const EFFECTIVE_BALANCE_INCREMENT = 2n ** 0n * BigInt(1e9); // 1,000,000,000 Gwei
// Initial values

@@ -64,2 +62,4 @@

exports.GENESIS_SLOT = GENESIS_SLOT;
const SAFE_SLOTS_TO_UPDATE_JUSTIFIED = 8;
exports.SAFE_SLOTS_TO_UPDATE_JUSTIFIED = SAFE_SLOTS_TO_UPDATE_JUSTIFIED;
const GENESIS_EPOCH = 0;

@@ -74,8 +74,8 @@ exports.GENESIS_EPOCH = GENESIS_EPOCH;

exports.GENESIS_START_SHARD = GENESIS_START_SHARD;
const SECONDS_PER_SLOT = 6;
const SECONDS_PER_SLOT = 12;
exports.SECONDS_PER_SLOT = SECONDS_PER_SLOT;
const MIN_ATTESTATION_INCLUSION_DELAY = 2 ** 0; // slots || 6 seconds
const MIN_ATTESTATION_INCLUSION_DELAY = 2 ** 0; // slots || 12 seconds
exports.MIN_ATTESTATION_INCLUSION_DELAY = MIN_ATTESTATION_INCLUSION_DELAY;
const SLOTS_PER_EPOCH = 2 ** 6; // slots || 6.4 minutes
const SLOTS_PER_EPOCH = 2 ** 5; // slots || 6.4 minutes

@@ -86,5 +86,5 @@ exports.SLOTS_PER_EPOCH = SLOTS_PER_EPOCH;

exports.MIN_SEED_LOOKAHEAD = MIN_SEED_LOOKAHEAD;
const ACTIVATION_EXIT_DELAY = 2 ** 2; // epochs || 25.6 minutes
const MAX_SEED_LOOKAHEAD = 2 ** 2; // epochs || 25.6 minutes
exports.ACTIVATION_EXIT_DELAY = ACTIVATION_EXIT_DELAY;
exports.MAX_SEED_LOOKAHEAD = MAX_SEED_LOOKAHEAD;
const SLOTS_PER_ETH1_VOTING_PERIOD = 2 ** 10; // slots || ~1.7 hours

@@ -105,9 +105,2 @@

exports.PERSISTENT_COMMITTEE_PERIOD = PERSISTENT_COMMITTEE_PERIOD;
const MAX_EPOCHS_PER_CROSSLINK = 2 ** 6; //epochs || ~7 hours
// should be a small constant times SHARD_COUNT // SLOTS_PER_EPOCH
exports.MAX_EPOCHS_PER_CROSSLINK = MAX_EPOCHS_PER_CROSSLINK;
const MAX_CROSSLINK_EPOCHS = 2 ** 6; // 64
exports.MAX_CROSSLINK_EPOCHS = MAX_CROSSLINK_EPOCHS;
const MIN_EPOCHS_TO_INACTIVITY_PENALTY = 2 ** 2; // 25.6 minutes

@@ -135,3 +128,3 @@ // State list lengths

exports.PROPOSER_REWARD_QUOTIENT = PROPOSER_REWARD_QUOTIENT;
const INACTIVITY_PENALTY_QUOTIENT = new _bn.default(2 ** 25); // 33,554,432
const INACTIVITY_PENALTY_QUOTIENT = 2n ** 25n; // 33,554,432

@@ -158,4 +151,2 @@ exports.INACTIVITY_PENALTY_QUOTIENT = INACTIVITY_PENALTY_QUOTIENT;

exports.MAX_VOLUNTARY_EXITS = MAX_VOLUNTARY_EXITS;
const MAX_TRANSFERS = 0;
exports.MAX_TRANSFERS = MAX_TRANSFERS;
//# sourceMappingURL=mainnet.js.map

@@ -5,19 +5,20 @@ /**

/// <reference types="node" />
import BN from "bn.js";
export declare const SHARD_COUNT = 8;
export declare const MAX_COMMITTEES_PER_SLOT = 4;
export declare const TARGET_COMMITTEE_SIZE = 4;
export declare const MAX_VALIDATORS_PER_COMMITTEE = 4096;
export declare const MAX_VALIDATORS_PER_COMMITTEE = 2048;
export declare const MIN_PER_EPOCH_CHURN_LIMIT: number;
export declare const CHURN_LIMIT_QUOTIENT = 65536;
export declare const BASE_REWARDS_PER_EPOCH = 5;
export declare const BASE_REWARDS_PER_EPOCH = 4;
export declare const SHUFFLE_ROUND_COUNT = 10;
export declare const MIN_GENESIS_TIME = 1578009600;
export declare const MIN_GENESIS_ACTIVE_VALIDATOR_COUNT = 64;
export declare const TARGET_AGGREGATORS_PER_COMMITTEE = 16;
export declare const DEPOSIT_CONTRACT_ADDRESS = 0;
export declare const DEPOSIT_CONTRACT_TREE_DEPTH: number;
export declare const MIN_DEPOSIT_AMOUNT: BN;
export declare const MAX_EFFECTIVE_BALANCE: BN;
export declare const EJECTION_BALANCE: BN;
export declare const EFFECTIVE_BALANCE_INCREMENT: BN;
export declare const MIN_DEPOSIT_AMOUNT: bigint;
export declare const MAX_EFFECTIVE_BALANCE: bigint;
export declare const EJECTION_BALANCE: bigint;
export declare const EFFECTIVE_BALANCE_INCREMENT: bigint;
export declare const GENESIS_SLOT = 0;
export declare const SAFE_SLOTS_TO_UPDATE_JUSTIFIED = 8;
export declare const GENESIS_EPOCH = 0;

@@ -27,7 +28,7 @@ export declare const BLS_WITHDRAWAL_PREFIX_BYTE: Buffer;

export declare const GENESIS_START_SHARD = 0;
export declare const SECONDS_PER_SLOT = 6;
export declare const SECONDS_PER_SLOT = 12;
export declare const MIN_ATTESTATION_INCLUSION_DELAY = 1;
export declare const SLOTS_PER_EPOCH = 8;
export declare const MIN_SEED_LOOKAHEAD: number;
export declare const ACTIVATION_EXIT_DELAY: number;
export declare const MAX_SEED_LOOKAHEAD: number;
export declare const SLOTS_PER_ETH1_VOTING_PERIOD = 16;

@@ -38,4 +39,2 @@ export declare const ETH1_FOLLOW_DISTANCE: number;

export declare const PERSISTENT_COMMITTEE_PERIOD = 2048;
export declare const MAX_EPOCHS_PER_CROSSLINK = 4;
export declare const MAX_CROSSLINK_EPOCHS: number;
export declare const MIN_EPOCHS_TO_INACTIVITY_PENALTY = 4;

@@ -49,3 +48,3 @@ export declare const EPOCHS_PER_HISTORICAL_VECTOR = 64;

export declare const PROPOSER_REWARD_QUOTIENT = 8;
export declare const INACTIVITY_PENALTY_QUOTIENT: BN;
export declare const INACTIVITY_PENALTY_QUOTIENT: bigint;
export declare const MIN_SLASHING_PENALTY_QUOTIENT = 32;

@@ -57,2 +56,1 @@ export declare const MAX_PROPOSER_SLASHINGS: number;

export declare const MAX_VOLUNTARY_EXITS: number;
export declare const MAX_TRANSFERS = 0;
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.MAX_TRANSFERS = exports.MAX_VOLUNTARY_EXITS = exports.MAX_DEPOSITS = exports.MAX_ATTESTATIONS = exports.MAX_ATTESTER_SLASHINGS = exports.MAX_PROPOSER_SLASHINGS = exports.MIN_SLASHING_PENALTY_QUOTIENT = exports.INACTIVITY_PENALTY_QUOTIENT = exports.PROPOSER_REWARD_QUOTIENT = exports.WHISTLEBLOWING_REWARD_QUOTIENT = exports.BASE_REWARD_FACTOR = exports.VALIDATOR_REGISTRY_LIMIT = exports.HISTORICAL_ROOTS_LIMIT = exports.EPOCHS_PER_SLASHINGS_VECTOR = exports.EPOCHS_PER_HISTORICAL_VECTOR = exports.MIN_EPOCHS_TO_INACTIVITY_PENALTY = exports.MAX_CROSSLINK_EPOCHS = exports.MAX_EPOCHS_PER_CROSSLINK = exports.PERSISTENT_COMMITTEE_PERIOD = exports.MIN_VALIDATOR_WITHDRAWAL_DELAY = exports.SLOTS_PER_HISTORICAL_ROOT = exports.ETH1_FOLLOW_DISTANCE = exports.SLOTS_PER_ETH1_VOTING_PERIOD = exports.ACTIVATION_EXIT_DELAY = exports.MIN_SEED_LOOKAHEAD = exports.SLOTS_PER_EPOCH = exports.MIN_ATTESTATION_INCLUSION_DELAY = exports.SECONDS_PER_SLOT = exports.GENESIS_START_SHARD = exports.GENESIS_FORK_VERSION = exports.BLS_WITHDRAWAL_PREFIX_BYTE = exports.GENESIS_EPOCH = exports.GENESIS_SLOT = exports.EFFECTIVE_BALANCE_INCREMENT = exports.EJECTION_BALANCE = exports.MAX_EFFECTIVE_BALANCE = exports.MIN_DEPOSIT_AMOUNT = exports.DEPOSIT_CONTRACT_TREE_DEPTH = exports.DEPOSIT_CONTRACT_ADDRESS = exports.MIN_GENESIS_ACTIVE_VALIDATOR_COUNT = exports.MIN_GENESIS_TIME = exports.SHUFFLE_ROUND_COUNT = exports.BASE_REWARDS_PER_EPOCH = exports.CHURN_LIMIT_QUOTIENT = exports.MIN_PER_EPOCH_CHURN_LIMIT = exports.MAX_VALIDATORS_PER_COMMITTEE = exports.TARGET_COMMITTEE_SIZE = exports.SHARD_COUNT = void 0;
exports.MAX_VOLUNTARY_EXITS = exports.MAX_DEPOSITS = exports.MAX_ATTESTATIONS = exports.MAX_ATTESTER_SLASHINGS = exports.MAX_PROPOSER_SLASHINGS = exports.MIN_SLASHING_PENALTY_QUOTIENT = exports.INACTIVITY_PENALTY_QUOTIENT = exports.PROPOSER_REWARD_QUOTIENT = exports.WHISTLEBLOWING_REWARD_QUOTIENT = exports.BASE_REWARD_FACTOR = exports.VALIDATOR_REGISTRY_LIMIT = exports.HISTORICAL_ROOTS_LIMIT = exports.EPOCHS_PER_SLASHINGS_VECTOR = exports.EPOCHS_PER_HISTORICAL_VECTOR = exports.MIN_EPOCHS_TO_INACTIVITY_PENALTY = exports.PERSISTENT_COMMITTEE_PERIOD = exports.MIN_VALIDATOR_WITHDRAWAL_DELAY = exports.SLOTS_PER_HISTORICAL_ROOT = exports.ETH1_FOLLOW_DISTANCE = exports.SLOTS_PER_ETH1_VOTING_PERIOD = exports.MAX_SEED_LOOKAHEAD = exports.MIN_SEED_LOOKAHEAD = exports.SLOTS_PER_EPOCH = exports.MIN_ATTESTATION_INCLUSION_DELAY = exports.SECONDS_PER_SLOT = exports.GENESIS_START_SHARD = exports.GENESIS_FORK_VERSION = exports.BLS_WITHDRAWAL_PREFIX_BYTE = exports.GENESIS_EPOCH = exports.SAFE_SLOTS_TO_UPDATE_JUSTIFIED = exports.GENESIS_SLOT = exports.EFFECTIVE_BALANCE_INCREMENT = exports.EJECTION_BALANCE = exports.MAX_EFFECTIVE_BALANCE = exports.MIN_DEPOSIT_AMOUNT = exports.DEPOSIT_CONTRACT_TREE_DEPTH = exports.DEPOSIT_CONTRACT_ADDRESS = exports.TARGET_AGGREGATORS_PER_COMMITTEE = exports.MIN_GENESIS_ACTIVE_VALIDATOR_COUNT = exports.MIN_GENESIS_TIME = exports.SHUFFLE_ROUND_COUNT = exports.BASE_REWARDS_PER_EPOCH = exports.CHURN_LIMIT_QUOTIENT = exports.MIN_PER_EPOCH_CHURN_LIMIT = exports.MAX_VALIDATORS_PER_COMMITTEE = exports.TARGET_COMMITTEE_SIZE = exports.MAX_COMMITTEES_PER_SLOT = void 0;
var _bn = _interopRequireDefault(require("bn.js"));
/**

@@ -16,9 +12,9 @@ * @module params/presets/minimal

// Misc
const SHARD_COUNT = 8; // CUSTOMIZED
const MAX_COMMITTEES_PER_SLOT = 4; // Just 4 committees for slot for testing purposes
exports.SHARD_COUNT = SHARD_COUNT;
exports.MAX_COMMITTEES_PER_SLOT = MAX_COMMITTEES_PER_SLOT;
const TARGET_COMMITTEE_SIZE = 4; // CUSTOMIZED
exports.TARGET_COMMITTEE_SIZE = TARGET_COMMITTEE_SIZE;
const MAX_VALIDATORS_PER_COMMITTEE = 4096; // 4096
const MAX_VALIDATORS_PER_COMMITTEE = 2048; // 2048

@@ -32,3 +28,3 @@ exports.MAX_VALIDATORS_PER_COMMITTEE = MAX_VALIDATORS_PER_COMMITTEE;

exports.CHURN_LIMIT_QUOTIENT = CHURN_LIMIT_QUOTIENT;
const BASE_REWARDS_PER_EPOCH = 5;
const BASE_REWARDS_PER_EPOCH = 4;
exports.BASE_REWARDS_PER_EPOCH = BASE_REWARDS_PER_EPOCH;

@@ -40,5 +36,7 @@ const SHUFFLE_ROUND_COUNT = 10; // CUSTOMIZED

exports.MIN_GENESIS_TIME = MIN_GENESIS_TIME;
const MIN_GENESIS_ACTIVE_VALIDATOR_COUNT = 64; // Deposit contract
const MIN_GENESIS_ACTIVE_VALIDATOR_COUNT = 64;
exports.MIN_GENESIS_ACTIVE_VALIDATOR_COUNT = MIN_GENESIS_ACTIVE_VALIDATOR_COUNT;
const TARGET_AGGREGATORS_PER_COMMITTEE = 16; // Deposit contract
exports.MIN_GENESIS_ACTIVE_VALIDATOR_COUNT = MIN_GENESIS_ACTIVE_VALIDATOR_COUNT;
exports.TARGET_AGGREGATORS_PER_COMMITTEE = TARGET_AGGREGATORS_PER_COMMITTEE;
const DEPOSIT_CONTRACT_ADDRESS = 0;

@@ -50,12 +48,12 @@ exports.DEPOSIT_CONTRACT_ADDRESS = DEPOSIT_CONTRACT_ADDRESS;

exports.DEPOSIT_CONTRACT_TREE_DEPTH = DEPOSIT_CONTRACT_TREE_DEPTH;
const MIN_DEPOSIT_AMOUNT = new _bn.default("1000000000"); // 1,000,000,000 Gwei
const MIN_DEPOSIT_AMOUNT = BigInt("1000000000"); // 1,000,000,000 Gwei
exports.MIN_DEPOSIT_AMOUNT = MIN_DEPOSIT_AMOUNT;
const MAX_EFFECTIVE_BALANCE = new _bn.default("32000000000"); // 32,000,000,000 Gwei
const MAX_EFFECTIVE_BALANCE = BigInt("32000000000"); // 32,000,000,000 Gwei
exports.MAX_EFFECTIVE_BALANCE = MAX_EFFECTIVE_BALANCE;
const EJECTION_BALANCE = new _bn.default("16000000000"); // 16,000,000,000 Gwei
const EJECTION_BALANCE = BigInt("16000000000"); // 16,000,000,000 Gwei
exports.EJECTION_BALANCE = EJECTION_BALANCE;
const EFFECTIVE_BALANCE_INCREMENT = new _bn.default("1000000000"); // 1,000,000,000 Gwei
const EFFECTIVE_BALANCE_INCREMENT = BigInt("1000000000"); // 1,000,000,000 Gwei
// Initial values

@@ -66,2 +64,4 @@

exports.GENESIS_SLOT = GENESIS_SLOT;
const SAFE_SLOTS_TO_UPDATE_JUSTIFIED = 8;
exports.SAFE_SLOTS_TO_UPDATE_JUSTIFIED = SAFE_SLOTS_TO_UPDATE_JUSTIFIED;
const GENESIS_EPOCH = 0;

@@ -76,3 +76,3 @@ exports.GENESIS_EPOCH = GENESIS_EPOCH;

exports.GENESIS_START_SHARD = GENESIS_START_SHARD;
const SECONDS_PER_SLOT = 6;
const SECONDS_PER_SLOT = 12;
exports.SECONDS_PER_SLOT = SECONDS_PER_SLOT;

@@ -88,5 +88,5 @@ const MIN_ATTESTATION_INCLUSION_DELAY = 1; // CUSTOMIZED

exports.MIN_SEED_LOOKAHEAD = MIN_SEED_LOOKAHEAD;
const ACTIVATION_EXIT_DELAY = 2 ** 2; // epochs || 25.6 minutes
const MAX_SEED_LOOKAHEAD = 2 ** 2; // epochs || 25.6 minutes
exports.ACTIVATION_EXIT_DELAY = ACTIVATION_EXIT_DELAY;
exports.MAX_SEED_LOOKAHEAD = MAX_SEED_LOOKAHEAD;
const SLOTS_PER_ETH1_VOTING_PERIOD = 16; // CUSTOMIZED

@@ -106,8 +106,2 @@

exports.PERSISTENT_COMMITTEE_PERIOD = PERSISTENT_COMMITTEE_PERIOD;
const MAX_EPOCHS_PER_CROSSLINK = 4; // should be a small constant times SHARD_COUNT // SLOTS_PER_EPOCH
exports.MAX_EPOCHS_PER_CROSSLINK = MAX_EPOCHS_PER_CROSSLINK;
const MAX_CROSSLINK_EPOCHS = 2 ** 6; // 64
exports.MAX_CROSSLINK_EPOCHS = MAX_CROSSLINK_EPOCHS;
const MIN_EPOCHS_TO_INACTIVITY_PENALTY = 4; // State list lengths

@@ -133,3 +127,3 @@

exports.PROPOSER_REWARD_QUOTIENT = PROPOSER_REWARD_QUOTIENT;
const INACTIVITY_PENALTY_QUOTIENT = new _bn.default(2 ** 25); // 33,554,432
const INACTIVITY_PENALTY_QUOTIENT = 2n ** 25n; // 33,554,432

@@ -156,4 +150,2 @@ exports.INACTIVITY_PENALTY_QUOTIENT = INACTIVITY_PENALTY_QUOTIENT;

exports.MAX_VOLUNTARY_EXITS = MAX_VOLUNTARY_EXITS;
const MAX_TRANSFERS = 0;
exports.MAX_TRANSFERS = MAX_TRANSFERS;
//# sourceMappingURL=minimal.js.map
{
"name": "@chainsafe/eth2.0-params",
"version": "0.1.0",
"version": "0.2.0",
"description": "Chain parameters required for eth2.0",
"author": "ChainSafe Systems",
"license": "LGPL-3.0",
"license": "Apache-2.0",
"bugs": {

@@ -14,13 +14,16 @@ "url": "https://github.com/ChainSafe/lodestar/issues"

"files": [
"lib"
"lib/**/*.js",
"lib/**/*.js.map",
"lib/**/*.d.ts"
],
"scripts": {
"prebuild": "rm -rf lib",
"clean": "rm -rf lib && rm -f tsconfig.tsbuildinfo",
"build": "yarn build:lib && yarn build:types",
"build:release": "yarn clean && yarn build",
"build:lib": "babel src -x .ts -d lib --source-maps",
"build:types": "tsc --declaration --outDir lib --emitDeclarationOnly",
"build:types": "tsc --incremental --declaration --outDir lib --emitDeclarationOnly",
"build:docs": "typedoc --exclude src/index.ts --out docs src",
"check-types": "tsc --noEmit --incremental",
"lint": "eslint --ext .ts src/",
"lint-fix": "eslint --ext .ts src/ --fix",
"lint": "eslint --color --ext .ts src/",
"lint:fix": "eslint --color --ext .ts src/ --fix",
"prepublishOnly": "yarn build",

@@ -40,7 +43,9 @@ "test": "yarn run check-types"

"dependencies": {
"@chainsafe/eth2.0-types": "^0.1.0",
"@types/bn.js": "^4.11.4",
"bn.js": "^4.11.8"
},
"gitHead": "6da3875ba842606d12f4241a0347c8fa622f3952"
"devDependencies": {
"@types/chai": "^4.1.7",
"@types/mocha": "^5.2.7",
"chai": "^4.2.0",
"mocha": "^6.2.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc