You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
register_notary() returns bool: Adds an entry to notary_registry, updates the notary pool (notary_pool, notary_pool_len, etc.), locks a deposit of size NOTARY_DEPOSIT, and returns True on success. Checks:
Deposit size: msg.value >= NOTARY_DEPOSIT
Uniqueness: notary_registry[msg.sender] does not exist
deregister_notary() returns bool: Sets the deregistered period in the notary_registry entry, updates the notary pool (notary_pool, notary_pool_len, etc.), and returns True on success. Checks:
add_header(shard_id, chunk_root, period) returns bool: anyone can call this function at anytime. The first header to get included for a given shard in a given period gets in, all others don’t. Returns True on success. This function just emits a log.
HeaderAdded log (emitted from SMC add_header function)
v1
shard_iduint256# pointer to shardchunk_rootbytes32# pointer to collation bodyperiodint128# (current block number / PERIOD_LENGTH)proposer_addressaddress# the address of proposer
v2 compressed
shard_idbytes1# pointer to shardchunk_rootbytes32# pointer to collation bodyperiodbytes3# (current block number / PERIOD_LENGTH)proposer_addressaddress# the address of proposer
get_committee(shard_id, period) returns a list of addresses: use the last block hash h before this period as the seed. Selecting notary_pool[sha3(h) % notary_pool_size], notary_pool[sha3(h + 1) % notary_pool_size], .... notary_pool[sha3(h + (COMMITTEE_SIZE - 1)) % notary_pool_size] notaries from notary_pool.
submit_vote(shard_id, chunk_root, period) returns bool: Sampled notaries call this function to submit vote, returns True on success. This function just emits a log.
Vote log (emitted from SMC submit_vote function)
v1
shard_iduint256# pointer to shardchunk_rootbytes32# pointer to collation bodyperiodint128# (current block number / PERIOD_LENGTH)notary_addressaddress# the address of notary
v2 compressed
shard_idbytes1# pointer to shardchunk_rootbytes32# pointer to collation bodyperiodbytes3# (current block number / PERIOD_LENGTH)notary_addressaddress# the address of notary
The text was updated successfully, but these errors were encountered:
What is wrong?
Old sharding spec + A minimal sharding protocol
How can it be fixed
COLLATOR_DEPOSIT
->NOTARY_DEPOSIT
COMMITTEE_SIZE
:= 135QUORUM_SIZE
:= 90register_notary() returns bool
: Adds an entry tonotary_registry
, updates the notary pool (notary_pool
,notary_pool_len
, etc.), locks a deposit of sizeNOTARY_DEPOSIT
, and returnsTrue
on success. Checks:msg.value >= NOTARY_DEPOSIT
notary_registry[msg.sender]
does not existderegister_notary() returns bool
: Sets the deregistered period in thenotary_registry
entry, updates the notary pool (notary_pool
,notary_pool_len
, etc.), and returnsTrue
on success. Checks:notary_registry[msg.sender]
existsrelease_natory() returns bool
: Removes an entry fromnotary_registry
, releases the notary deposit, and returnsTrue
on success. Checks:notary_registry[msg.sender]
existsnotary_registry[msg.sender].deregistered != 0
floor(block.number / PERIOD_LENGTH) > notary_registry[msg.sender].deregistered + NOTARY_LOCKUP_LENGTH
add_header(shard_id, chunk_root, period) returns bool
: anyone can call this function at anytime. The first header to get included for a given shard in a given period gets in, all others don’t. ReturnsTrue
on success. This function just emits a log.HeaderAdded
log (emitted from SMCadd_header
function)get_committee(shard_id, period) returns a list of addresses
: use the last block hashh
before this period as the seed. Selectingnotary_pool[sha3(h) % notary_pool_size], notary_pool[sha3(h + 1) % notary_pool_size], .... notary_pool[sha3(h + (COMMITTEE_SIZE - 1)) % notary_pool_size]
notaries fromnotary_pool
.submit_vote(shard_id, chunk_root, period) returns bool
: Sampled notaries call this function to submit vote, returnsTrue
on success. This function just emits a log.Vote
log (emitted from SMCsubmit_vote
function)The text was updated successfully, but these errors were encountered: