mirror of
https://github.com/ChainSafe/lodestar.git
synced 2026-01-09 15:48:08 -05:00
@@ -114,6 +114,10 @@ export const {
|
||||
FIELD_ELEMENTS_PER_CELL,
|
||||
FIELD_ELEMENTS_PER_EXT_BLOB,
|
||||
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH,
|
||||
|
||||
PTC_SIZE,
|
||||
MAX_PAYLOAD_ATTESTATIONS,
|
||||
BUILDER_PENDING_WITHDRAWALS_LIMIT,
|
||||
} = activePreset;
|
||||
|
||||
////////////
|
||||
@@ -138,6 +142,7 @@ export const ZERO_HASH_HEX = "0x" + "00".repeat(32);
|
||||
export const BLS_WITHDRAWAL_PREFIX = 0;
|
||||
export const ETH1_ADDRESS_WITHDRAWAL_PREFIX = 1;
|
||||
export const COMPOUNDING_WITHDRAWAL_PREFIX = 2;
|
||||
export const BUILDER_WITHDRAWAL_PREFIX = 3;
|
||||
|
||||
// Domain types
|
||||
|
||||
@@ -152,6 +157,8 @@ export const DOMAIN_SYNC_COMMITTEE = Uint8Array.from([7, 0, 0, 0]);
|
||||
export const DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF = Uint8Array.from([8, 0, 0, 0]);
|
||||
export const DOMAIN_CONTRIBUTION_AND_PROOF = Uint8Array.from([9, 0, 0, 0]);
|
||||
export const DOMAIN_BLS_TO_EXECUTION_CHANGE = Uint8Array.from([10, 0, 0, 0]);
|
||||
export const DOMAIN_BEACON_BUILDER = Uint8Array.from([27, 0, 0, 0]);
|
||||
export const DOMAIN_PTC_ATTESTER = Uint8Array.from([12, 0, 0, 0]);
|
||||
|
||||
// Application specific domains
|
||||
|
||||
@@ -298,3 +305,7 @@ export const BYTES_PER_CELL = FIELD_ELEMENTS_PER_CELL * BYTES_PER_FIELD_ELEMENT;
|
||||
// ssz.fulu.BeaconBlockBody.getPathInfo(['blobKzgCommitments']).gindex
|
||||
export const KZG_COMMITMENTS_GINDEX = 27;
|
||||
export const KZG_COMMITMENTS_SUBTREE_INDEX = KZG_COMMITMENTS_GINDEX - 2 ** KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH;
|
||||
|
||||
// Gloas Misc
|
||||
export const BUILDER_PAYMENT_THRESHOLD_NUMERATOR = 6;
|
||||
export const BUILDER_PAYMENT_THRESHOLD_DENOMINATOR = 10;
|
||||
|
||||
@@ -141,4 +141,9 @@ export const mainnetPreset: BeaconPreset = {
|
||||
FIELD_ELEMENTS_PER_CELL: 64,
|
||||
FIELD_ELEMENTS_PER_EXT_BLOB: 8192,
|
||||
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH: 4,
|
||||
|
||||
// GLOAS
|
||||
PTC_SIZE: 512,
|
||||
MAX_PAYLOAD_ATTESTATIONS: 4,
|
||||
BUILDER_PENDING_WITHDRAWALS_LIMIT: 1048576, // 2**20
|
||||
};
|
||||
|
||||
@@ -142,4 +142,9 @@ export const minimalPreset: BeaconPreset = {
|
||||
FIELD_ELEMENTS_PER_CELL: 64,
|
||||
FIELD_ELEMENTS_PER_EXT_BLOB: 8192,
|
||||
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH: 4,
|
||||
|
||||
// GLOAS
|
||||
PTC_SIZE: 2,
|
||||
MAX_PAYLOAD_ATTESTATIONS: 4,
|
||||
BUILDER_PENDING_WITHDRAWALS_LIMIT: 1048576, // 2**20
|
||||
};
|
||||
|
||||
@@ -103,6 +103,11 @@ export type BeaconPreset = {
|
||||
FIELD_ELEMENTS_PER_CELL: number;
|
||||
FIELD_ELEMENTS_PER_EXT_BLOB: number;
|
||||
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH: number;
|
||||
|
||||
// GLOAS
|
||||
PTC_SIZE: number;
|
||||
MAX_PAYLOAD_ATTESTATIONS: number;
|
||||
BUILDER_PENDING_WITHDRAWALS_LIMIT: number;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -211,6 +216,11 @@ export const beaconPresetTypes: BeaconPresetTypes = {
|
||||
FIELD_ELEMENTS_PER_CELL: "number",
|
||||
FIELD_ELEMENTS_PER_EXT_BLOB: "number",
|
||||
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH: "number",
|
||||
|
||||
// GLOAS
|
||||
PTC_SIZE: "number",
|
||||
MAX_PAYLOAD_ATTESTATIONS: "number",
|
||||
BUILDER_PENDING_WITHDRAWALS_LIMIT: "number",
|
||||
};
|
||||
|
||||
type BeaconPresetTypes = {
|
||||
|
||||
@@ -8,12 +8,18 @@ import {loadConfigYaml} from "../yaml.js";
|
||||
// Not e2e, but slow. Run with e2e tests
|
||||
|
||||
/** https://github.com/ethereum/consensus-specs/releases */
|
||||
const specConfigCommit = "v1.6.0-alpha.5";
|
||||
const specConfigCommit = "v1.6.0-alpha.6";
|
||||
/**
|
||||
* Fields that we filter from local config when doing comparison.
|
||||
* Ideally this should be empty as it is not spec compliant
|
||||
*/
|
||||
const ignoredLocalPresetFields: (keyof BeaconPreset)[] = [];
|
||||
// TODO GLOAS: These fields are supposed to be in the preset. However Gloas's preset in consensus-specs are still not up to date.
|
||||
/// Remove these fields after a spec is released that includes this fix https://github.com/ethereum/consensus-specs/pull/4607
|
||||
const ignoredLocalPresetFields: (keyof BeaconPreset)[] = [
|
||||
"MAX_PAYLOAD_ATTESTATIONS",
|
||||
"PTC_SIZE",
|
||||
"BUILDER_PENDING_WITHDRAWALS_LIMIT",
|
||||
];
|
||||
|
||||
describe("Ensure config is synced", () => {
|
||||
vi.setConfig({testTimeout: 60 * 1000});
|
||||
|
||||
Reference in New Issue
Block a user