-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
1,294 additions
and
1,061 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ venv | |
.venvs | ||
.venv | ||
/.pytest_cache | ||
*.swp | ||
|
||
build/ | ||
output/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Mainnet preset - Whisk | ||
|
||
# Misc | ||
# --------------------------------------------------------------- | ||
# `uint64(4)` | ||
CURDLEPROOFS_N_BLINDERS: 4 | ||
# `uint64(2**14)` | ||
WHISK_CANDIDATE_TRACKERS_COUNT: 16384 | ||
# `uint64(2**13)` must be < WHISK_CANDIDATE_TRACKERS_COUNT | ||
WHISK_PROPOSER_TRACKERS_COUNT: 8192 | ||
# `Epoch(2**8)` | ||
WHISK_EPOCHS_PER_SHUFFLING_PHASE: 256 | ||
# `uint64(2**7 - CURDLEPROOFS_N_BLINDERS)` | ||
WHISK_VALIDATORS_PER_SHUFFLE: 124 | ||
# `Epoch(2)` | ||
WHISK_PROPOSER_SELECTION_GAP: 2 | ||
# `uint64(2**15)` TODO: will be replaced by a fix format once there's a serialized format | ||
WHISK_MAX_SHUFFLE_PROOF_SIZE: 32768 | ||
# `uint64(2**10)` TODO: will be replaced by a fix format once there's a serialized format | ||
WHISK_MAX_OPENING_PROOF_SIZE: 1024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal preset - Whisk | ||
|
||
# Misc | ||
# --------------------------------------------------------------- | ||
# [customized] | ||
CURDLEPROOFS_N_BLINDERS: 4 | ||
# [customized] | ||
WHISK_CANDIDATE_TRACKERS_COUNT: 32 | ||
# [customized] | ||
WHISK_PROPOSER_TRACKERS_COUNT: 16 | ||
# [customized] | ||
WHISK_EPOCHS_PER_SHUFFLING_PHASE: 4 | ||
# [customized] | ||
WHISK_VALIDATORS_PER_SHUFFLE: 4 | ||
# [customized] | ||
WHISK_PROPOSER_SELECTION_GAP: 1 | ||
# `uint64(2**15)` TODO: will be replaced by a fix format once there's a serialized format | ||
WHISK_MAX_SHUFFLE_PROOF_SIZE: 32768 | ||
# `uint64(2**10)` TODO: will be replaced by a fix format once there's a serialized format | ||
WHISK_MAX_OPENING_PROOF_SIZE: 1024 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Definitions in context.py | ||
PHASE0 = 'phase0' | ||
ALTAIR = 'altair' | ||
BELLATRIX = 'bellatrix' | ||
CAPELLA = 'capella' | ||
DENEB = 'deneb' | ||
EIP6110 = 'eip6110' | ||
EIP7002 = 'eip7002' | ||
WHISK = 'whisk' | ||
|
||
|
||
|
||
# The helper functions that are used when defining constants | ||
CONSTANT_DEP_SUNDRY_CONSTANTS_FUNCTIONS = ''' | ||
def ceillog2(x: int) -> uint64: | ||
if x < 1: | ||
raise ValueError(f"ceillog2 accepts only positive values, x={x}") | ||
return uint64((x - 1).bit_length()) | ||
def floorlog2(x: int) -> uint64: | ||
if x < 1: | ||
raise ValueError(f"floorlog2 accepts only positive values, x={x}") | ||
return uint64(x.bit_length() - 1) | ||
''' | ||
|
||
|
||
OPTIMIZED_BLS_AGGREGATE_PUBKEYS = ''' | ||
def eth_aggregate_pubkeys(pubkeys: Sequence[BLSPubkey]) -> BLSPubkey: | ||
return bls.AggregatePKs(pubkeys) | ||
''' | ||
|
||
|
||
ETH2_SPEC_COMMENT_PREFIX = "eth2spec:" |
Oops, something went wrong.