-
Notifications
You must be signed in to change notification settings - Fork 146
Add testnet chain and Xiao Long Bao state machine #489
Add testnet chain and Xiao Long Bao state machine #489
Conversation
8a56ff9
to
93d1cfe
Compare
93d1cfe
to
eef8272
Compare
GENESIS_SLOT=GENESIS_SLOT, | ||
GENESIS_EPOCH=slot_to_epoch(GENESIS_SLOT, SLOTS_PER_EPOCH), | ||
TARGET_COMMITTEE_SIZE=2, | ||
SHARD_COUNT=2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With SLOTS_PER_EPOCH
== 4, TARGET_COMMITTEE_SIZE
== 2 and SHARD_COUNT
== 2, does this mean we need at least 16 validators?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I understand, do we need to specify 16 validators somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah just that in #465 we use 8 validators. Not a problem. Ignore me. 😅
1fb1e8b
to
6d0f035
Compare
6d0f035
to
150155d
Compare
Slot, | ||
) | ||
|
||
GENESIS_SLOT = Slot(2**32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙈Just realized that I defined GENESIS_SLOT in the chain constants and in the state machine. It seems wrong to treat them as a constant in the state machine and should be parameterizable from the chain. But maybe access this constant from the Serenity config for the time being and address the issue after #896 to resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#896?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pytest.mark.parametrize( | ||
"sm_klass", | ||
( | ||
XiaoLongBaoStateMachine, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding SerenityStateMachine
? Would it pass the test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It passes the test.
) | ||
from .constants import ( | ||
TESTNET_CHAIN_ID, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move it after from eth2.beacon.state_machines.forks.serenity.configs import ...
.
Co-Authored-By: ChihChengLiang <[email protected]>
What was wrong?
Part of #488
We need a state machine class and a chain class for the testnet. Unfortunately, for the state machine it requires a specific name. A choice with better taste than foo might be food, and the lowest hanging food outside of the coworking space is the Xiao Long Bao.
How was it fixed?
Cute Animal Picture