@chainsafe/lodestar-params
Advanced tools
Comparing version 0.19.0 to 0.20.0
/// <reference types="node" /> | ||
export interface IAltairParams { | ||
SYNC_COMMITTEE_SIZE: number; | ||
SYNC_COMMITTEE_SUBNET_COUNT: number; | ||
SYNC_PUBKEYS_PER_AGGREGATE: number; | ||
INACTIVITY_SCORE_BIAS: bigint; | ||
EPOCHS_PER_SYNC_COMMITTEE_PERIOD: number; | ||
DOMAIN_SYNC_COMMITTEE: Buffer; | ||
DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF: Buffer; | ||
DOMAIN_CONTRIBUTION_AND_PROOF: Buffer; | ||
ALTAIR_FORK_VERSION: Buffer; | ||
ALTAIR_FORK_SLOT: number; | ||
HF1_INACTIVITY_PENALTY_QUOTIENT: bigint; | ||
HF1_MIN_SLASHING_PENALTY_QUOTIENT: number; | ||
HF1_PROPORTIONAL_SLASHING_MULTIPLIER: number; | ||
INACTIVITY_PENALTY_QUOTIENT_ALTAIR: bigint; | ||
MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR: number; | ||
PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR: number; | ||
} | ||
//# sourceMappingURL=interface.d.ts.map |
@@ -24,9 +24,12 @@ "use strict"; | ||
SYNC_PUBKEYS_PER_AGGREGATE: Number64, | ||
INACTIVITY_SCORE_BIAS: BigInt64, | ||
EPOCHS_PER_SYNC_COMMITTEE_PERIOD: Number64, | ||
DOMAIN_SYNC_COMMITTEE: ByteVector4, | ||
DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF: ByteVector4, | ||
DOMAIN_CONTRIBUTION_AND_PROOF: ByteVector4, | ||
ALTAIR_FORK_VERSION: ByteVector4, | ||
ALTAIR_FORK_SLOT: Number64, | ||
HF1_INACTIVITY_PENALTY_QUOTIENT: BigInt64, | ||
HF1_MIN_SLASHING_PENALTY_QUOTIENT: Number64, | ||
HF1_PROPORTIONAL_SLASHING_MULTIPLIER: Number64 | ||
INACTIVITY_PENALTY_QUOTIENT_ALTAIR: BigInt64, | ||
MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR: Number64, | ||
PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR: Number64 | ||
} | ||
@@ -33,0 +36,0 @@ }); |
@@ -14,4 +14,2 @@ "use strict"; | ||
var _phase2 = require("./phase1"); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
@@ -24,5 +22,5 @@ | ||
const BeaconParams = new _ssz.ContainerType({ | ||
fields: _objectSpread(_objectSpread(_objectSpread({}, _phase.Phase0Params.fields), _altair.AltairParams.fields), _phase2.Phase1Params.fields) | ||
fields: _objectSpread(_objectSpread({}, _phase.Phase0Params.fields), _altair.AltairParams.fields) | ||
}); | ||
exports.BeaconParams = BeaconParams; | ||
//# sourceMappingURL=beaconParams.js.map |
@@ -7,7 +7,35 @@ export declare const GENESIS_SLOT = 0; | ||
export declare const JUSTIFICATION_BITS_LENGTH = 4; | ||
export declare const FINALIZED_ROOT_INDEX = 105; | ||
export declare const NEXT_SYNC_COMMITTEE_INDEX = 54; | ||
export declare const MAX_VALID_LIGHT_CLIENT_UPDATES: number; | ||
export declare const MIN_SYNC_COMMITTEE_PARTICIPANTS = 1; | ||
export declare const LIGHT_CLIENT_UPDATE_TIMEOUT: number; | ||
/** | ||
* ```ts | ||
* BigInt(2 ** 64) - BigInt(1); | ||
* ``` | ||
* But approximated to `Number.MAX_SAFE_INTEGER` | ||
*/ | ||
export declare const MAX_VALID_LIGHT_CLIENT_UPDATES: number; | ||
/** | ||
* ```ts | ||
* config.types.altair.BeaconState.getPathGindex(["finalizedCheckpoint", "root"]) | ||
* ``` | ||
*/ | ||
export declare const FINALIZED_ROOT_INDEX = 105; | ||
/** | ||
* ```ts | ||
* Math.floor(Math.log2(FINALIZED_ROOT_INDEX)) | ||
* ``` | ||
*/ | ||
export declare const FINALIZED_ROOT_INDEX_FLOORLOG2 = 6; | ||
/** | ||
* ```ts | ||
* config.types.altair.BeaconState.getPathGindex(["nextSyncCommittee"]) | ||
* ``` | ||
*/ | ||
export declare const NEXT_SYNC_COMMITTEE_INDEX = 55; | ||
/** | ||
* ```ts | ||
* Math.floor(Math.log2(NEXT_SYNC_COMMITTEE_INDEX)) | ||
* ``` | ||
*/ | ||
export declare const NEXT_SYNC_COMMITTEE_INDEX_FLOORLOG2 = 5; | ||
//# sourceMappingURL=constants.d.ts.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.LIGHT_CLIENT_UPDATE_TIMEOUT = exports.MIN_SYNC_COMMITTEE_PARTICIPANTS = exports.MAX_VALID_LIGHT_CLIENT_UPDATES = exports.NEXT_SYNC_COMMITTEE_INDEX = exports.FINALIZED_ROOT_INDEX = exports.JUSTIFICATION_BITS_LENGTH = exports.DEPOSIT_CONTRACT_TREE_DEPTH = exports.BASE_REWARDS_PER_EPOCH = exports.FAR_FUTURE_EPOCH = exports.GENESIS_EPOCH = exports.GENESIS_SLOT = void 0; | ||
exports.NEXT_SYNC_COMMITTEE_INDEX_FLOORLOG2 = exports.NEXT_SYNC_COMMITTEE_INDEX = exports.FINALIZED_ROOT_INDEX_FLOORLOG2 = exports.FINALIZED_ROOT_INDEX = exports.MAX_VALID_LIGHT_CLIENT_UPDATES = exports.LIGHT_CLIENT_UPDATE_TIMEOUT = exports.MIN_SYNC_COMMITTEE_PARTICIPANTS = exports.JUSTIFICATION_BITS_LENGTH = exports.DEPOSIT_CONTRACT_TREE_DEPTH = exports.BASE_REWARDS_PER_EPOCH = exports.FAR_FUTURE_EPOCH = exports.GENESIS_EPOCH = exports.GENESIS_SLOT = void 0; | ||
const GENESIS_SLOT = 0; | ||
@@ -18,18 +18,51 @@ exports.GENESIS_SLOT = GENESIS_SLOT; | ||
exports.DEPOSIT_CONTRACT_TREE_DEPTH = DEPOSIT_CONTRACT_TREE_DEPTH; | ||
const JUSTIFICATION_BITS_LENGTH = 4; //TODO: use ssz to calculate Path(BeaconState)/'finalized_checkpoint'/'root' | ||
const JUSTIFICATION_BITS_LENGTH = 4; | ||
exports.JUSTIFICATION_BITS_LENGTH = JUSTIFICATION_BITS_LENGTH; | ||
const FINALIZED_ROOT_INDEX = 105; //TODO: use ssz to calculate Path(BeaconState)/'next_sync_committee' | ||
const MIN_SYNC_COMMITTEE_PARTICIPANTS = 1; //~27 hours | ||
exports.FINALIZED_ROOT_INDEX = FINALIZED_ROOT_INDEX; | ||
const NEXT_SYNC_COMMITTEE_INDEX = 54; // BigInt(2 ** 64) - BigInt(1); | ||
exports.MIN_SYNC_COMMITTEE_PARTICIPANTS = MIN_SYNC_COMMITTEE_PARTICIPANTS; | ||
const LIGHT_CLIENT_UPDATE_TIMEOUT = 2 ** 13; // Lightclient pre-computed | ||
exports.NEXT_SYNC_COMMITTEE_INDEX = NEXT_SYNC_COMMITTEE_INDEX; | ||
/** | ||
* ```ts | ||
* BigInt(2 ** 64) - BigInt(1); | ||
* ``` | ||
* But approximated to `Number.MAX_SAFE_INTEGER` | ||
*/ | ||
exports.LIGHT_CLIENT_UPDATE_TIMEOUT = LIGHT_CLIENT_UPDATE_TIMEOUT; | ||
const MAX_VALID_LIGHT_CLIENT_UPDATES = Number.MAX_SAFE_INTEGER; | ||
/** | ||
* ```ts | ||
* config.types.altair.BeaconState.getPathGindex(["finalizedCheckpoint", "root"]) | ||
* ``` | ||
*/ | ||
exports.MAX_VALID_LIGHT_CLIENT_UPDATES = MAX_VALID_LIGHT_CLIENT_UPDATES; | ||
const MIN_SYNC_COMMITTEE_PARTICIPANTS = 1; //~27 hours | ||
const FINALIZED_ROOT_INDEX = 105; | ||
/** | ||
* ```ts | ||
* Math.floor(Math.log2(FINALIZED_ROOT_INDEX)) | ||
* ``` | ||
*/ | ||
exports.MIN_SYNC_COMMITTEE_PARTICIPANTS = MIN_SYNC_COMMITTEE_PARTICIPANTS; | ||
const LIGHT_CLIENT_UPDATE_TIMEOUT = 2 ** 13; | ||
exports.LIGHT_CLIENT_UPDATE_TIMEOUT = LIGHT_CLIENT_UPDATE_TIMEOUT; | ||
exports.FINALIZED_ROOT_INDEX = FINALIZED_ROOT_INDEX; | ||
const FINALIZED_ROOT_INDEX_FLOORLOG2 = 6; | ||
/** | ||
* ```ts | ||
* config.types.altair.BeaconState.getPathGindex(["nextSyncCommittee"]) | ||
* ``` | ||
*/ | ||
exports.FINALIZED_ROOT_INDEX_FLOORLOG2 = FINALIZED_ROOT_INDEX_FLOORLOG2; | ||
const NEXT_SYNC_COMMITTEE_INDEX = 55; | ||
/** | ||
* ```ts | ||
* Math.floor(Math.log2(NEXT_SYNC_COMMITTEE_INDEX)) | ||
* ``` | ||
*/ | ||
exports.NEXT_SYNC_COMMITTEE_INDEX = NEXT_SYNC_COMMITTEE_INDEX; | ||
const NEXT_SYNC_COMMITTEE_INDEX_FLOORLOG2 = 5; | ||
exports.NEXT_SYNC_COMMITTEE_INDEX_FLOORLOG2 = NEXT_SYNC_COMMITTEE_INDEX_FLOORLOG2; | ||
//# sourceMappingURL=constants.js.map |
@@ -6,3 +6,2 @@ /** | ||
export * from "./altair"; | ||
export * from "./phase1"; | ||
export * from "./interface"; | ||
@@ -9,0 +8,0 @@ export * from "./beaconParams"; |
@@ -44,16 +44,2 @@ "use strict"; | ||
var _phase2 = require("./phase1"); | ||
Object.keys(_phase2).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; | ||
if (key in exports && exports[key] === _phase2[key]) return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function () { | ||
return _phase2[key]; | ||
} | ||
}); | ||
}); | ||
var _interface = require("./interface"); | ||
@@ -60,0 +46,0 @@ |
@@ -6,4 +6,3 @@ /** | ||
import { IAltairParams } from "./altair"; | ||
import { IPhase1Params } from "./phase1"; | ||
export declare type IBeaconParams = IPhase0Params & IAltairParams & IPhase1Params; | ||
export declare type IBeaconParams = IPhase0Params & IAltairParams; | ||
//# sourceMappingURL=interface.d.ts.map |
@@ -5,10 +5,13 @@ export declare const altairJson: { | ||
SYNC_PUBKEYS_PER_AGGREGATE: number; | ||
INACTIVITY_SCORE_BIAS: number; | ||
EPOCHS_PER_SYNC_COMMITTEE_PERIOD: number; | ||
DOMAIN_SYNC_COMMITTEE: string; | ||
DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF: string; | ||
DOMAIN_CONTRIBUTION_AND_PROOF: string; | ||
ALTAIR_FORK_VERSION: string; | ||
HF1_INACTIVITY_PENALTY_QUOTIENT: number; | ||
HF1_MIN_SLASHING_PENALTY_QUOTIENT: number; | ||
HF1_PROPORTIONAL_SLASHING_MULTIPLIER: number; | ||
ALTAIR_FORK_SLOT: string; | ||
INACTIVITY_PENALTY_QUOTIENT_ALTAIR: number; | ||
MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR: number; | ||
PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR: number; | ||
}; | ||
//# sourceMappingURL=altair.d.ts.map |
@@ -15,11 +15,14 @@ "use strict"; | ||
SYNC_PUBKEYS_PER_AGGREGATE: 64, | ||
INACTIVITY_SCORE_BIAS: 4, | ||
EPOCHS_PER_SYNC_COMMITTEE_PERIOD: 256, | ||
DOMAIN_SYNC_COMMITTEE: "0x07000000", | ||
DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF: "0x08000000", | ||
DOMAIN_CONTRIBUTION_AND_PROOF: "0x09000000", | ||
ALTAIR_FORK_VERSION: "0x01000000", | ||
HF1_INACTIVITY_PENALTY_QUOTIENT: 50331648, | ||
HF1_MIN_SLASHING_PENALTY_QUOTIENT: 64, | ||
HF1_PROPORTIONAL_SLASHING_MULTIPLIER: 2, | ||
ALTAIR_FORK_SLOT: "0xffffffffffffffff" | ||
ALTAIR_FORK_SLOT: "0xffffffffffffffff", | ||
INACTIVITY_PENALTY_QUOTIENT_ALTAIR: 50331648, | ||
MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR: 64, | ||
PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR: 2 | ||
}; | ||
exports.altairJson = altairJson; | ||
//# sourceMappingURL=altair.js.map |
import { IBeaconParams } from "../../interface"; | ||
export declare const commit = "v1.1.0-alpha.2"; | ||
export declare const commit = "v1.1.0-alpha.3"; | ||
export declare const params: IBeaconParams; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -14,4 +14,2 @@ "use strict"; | ||
var _phase2 = require("./phase1"); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
@@ -23,6 +21,6 @@ | ||
const commit = "v1.1.0-alpha.2"; | ||
const commit = "v1.1.0-alpha.3"; | ||
exports.commit = commit; | ||
const params = (0, _utils.createIBeaconParams)(_objectSpread(_objectSpread(_objectSpread({}, _phase.phase0Json), _altair.altairJson), _phase2.phase1Json)); | ||
const params = (0, _utils.createIBeaconParams)(_objectSpread(_objectSpread({}, _phase.phase0Json), _altair.altairJson)); | ||
exports.params = params; | ||
//# sourceMappingURL=index.js.map |
@@ -5,10 +5,13 @@ export declare const altairJson: { | ||
SYNC_PUBKEYS_PER_AGGREGATE: number; | ||
INACTIVITY_SCORE_BIAS: number; | ||
EPOCHS_PER_SYNC_COMMITTEE_PERIOD: number; | ||
DOMAIN_SYNC_COMMITTEE: string; | ||
DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF: string; | ||
DOMAIN_CONTRIBUTION_AND_PROOF: string; | ||
ALTAIR_FORK_VERSION: string; | ||
HF1_INACTIVITY_PENALTY_QUOTIENT: number; | ||
HF1_MIN_SLASHING_PENALTY_QUOTIENT: number; | ||
HF1_PROPORTIONAL_SLASHING_MULTIPLIER: number; | ||
ALTAIR_FORK_SLOT: string; | ||
INACTIVITY_PENALTY_QUOTIENT_ALTAIR: number; | ||
MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR: number; | ||
PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR: number; | ||
}; | ||
//# sourceMappingURL=altair.d.ts.map |
@@ -13,11 +13,14 @@ "use strict"; | ||
SYNC_PUBKEYS_PER_AGGREGATE: 16, | ||
INACTIVITY_SCORE_BIAS: 4, | ||
EPOCHS_PER_SYNC_COMMITTEE_PERIOD: 8, | ||
DOMAIN_SYNC_COMMITTEE: "0x07000000", | ||
ALTAIR_FORK_VERSION: "0x01000000", | ||
HF1_INACTIVITY_PENALTY_QUOTIENT: 50331648, | ||
HF1_MIN_SLASHING_PENALTY_QUOTIENT: 64, | ||
HF1_PROPORTIONAL_SLASHING_MULTIPLIER: 2, | ||
ALTAIR_FORK_SLOT: "0xffffffffffffffff" | ||
DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF: "0x08000000", | ||
DOMAIN_CONTRIBUTION_AND_PROOF: "0x09000000", | ||
ALTAIR_FORK_VERSION: "0x01000001", | ||
ALTAIR_FORK_SLOT: "0xffffffffffffffff", | ||
INACTIVITY_PENALTY_QUOTIENT_ALTAIR: 50331648, | ||
MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR: 64, | ||
PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR: 2 | ||
}; | ||
exports.altairJson = altairJson; | ||
//# sourceMappingURL=altair.js.map |
import { IBeaconParams } from "../../interface"; | ||
export declare const commit = "v1.1.0-alpha.2"; | ||
export declare const commit = "v1.1.0-alpha.3"; | ||
export declare const params: IBeaconParams; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -14,4 +14,2 @@ "use strict"; | ||
var _phase2 = require("./phase1"); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
@@ -23,6 +21,6 @@ | ||
const commit = "v1.1.0-alpha.2"; | ||
const commit = "v1.1.0-alpha.3"; | ||
exports.commit = commit; | ||
const params = (0, _utils.createIBeaconParams)(_objectSpread(_objectSpread(_objectSpread({}, _phase.phase0Json), _altair.altairJson), _phase2.phase1Json)); | ||
const params = (0, _utils.createIBeaconParams)(_objectSpread(_objectSpread({}, _phase.phase0Json), _altair.altairJson)); | ||
exports.params = params; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@chainsafe/lodestar-params", | ||
"version": "0.19.0", | ||
"version": "0.20.0", | ||
"description": "Chain parameters required for lodestar", | ||
@@ -34,4 +34,4 @@ "author": "ChainSafe Systems", | ||
"test": "yarn run check-types", | ||
"test:unit": "mocha 'test/**/*.test.ts'", | ||
"test:e2e": "mocha 'test/**/*.test.ts'" | ||
"test:unit": "mocha 'test/unit/**/*.test.ts'", | ||
"test:e2e": "mocha 'test/e2e/**/*.test.ts'" | ||
}, | ||
@@ -54,3 +54,3 @@ "repository": { | ||
}, | ||
"gitHead": "4e5ae5bf4ab039cc55cd4621a2382d37865cf442" | ||
"gitHead": "9fd4283e8523ebfa39aeb8b9f3330c30cfcd9924" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
115066
65
1331