Skip to content

Conversation

@masih
Copy link
Member

@masih masih commented May 1, 2024

The simulation has configurations to set the length of an epoch as well as a stabilisation delay before it starts the next instance after one finishes.

Since the original implementation the code has undergone a number of iterations one of which removed epoch from tipset. Since that change, the simulation seem to have been using a fixed next start time upon receiving a decision. The start time is an absolute time; therefore using a fixed time meant that the simulation was not waiting for the configured stabilization in between instances.

Additionally, because the returned start time is used as deliver at timestamp by the simulated network transport alerts may have been fired immediately after a participant received a decision, before all participants finished deciding. This is fine as far as constraints of GPBFT algorithm is concerned. Which is why simulation tests have been passing so far. But it diverges from the intended simulation conditions.

The changes here fix the above issue by setting the next start time to the configured length of one epoch plus the configured stabilization delay relative to the current network time. This means the next instance start progresses as the time in the network does.

Further, the changes here remove the base timestamp field from simulated EC state as it seems to be unused.

The simulation has configurations to set the length of an epoch as well
as a stabilisation delay before it starts the next instance after one
finishes.

Since the original implementation the code has undergone a number of
iterations one of which removed epoch from tipset. Since that change,
the simulation seem to have been using a fixed next start time upon
receiving a decision. The start time is an absolute time; therefore
using a fixed time meant that the simulation was not waiting for
the configured stabilization in between instances.

Additionally, because the returned start time is used as deliver at
timestamp by the simulated network transport alerts may have been fired
immediately after a participant received a decision, before all
participants finished deciding. This is fine as far as constraints of
GPBFT algorithm is concerned. Which is why simulation tests have been
passing so far. But it diverges from the intended simulation conditions.

The changes here fix the above issue by setting the next start time to
the configured length of one epoch plus the configured stabilization
delay _relative to the current network time_. This means the next
instance start progresses as the time in the network does.

Further, the changes here remove the base timestamp field from simulated
EC state as it seems to be unused,
@masih masih requested review from Kubuxu and anorth May 1, 2024 12:03
@masih masih enabled auto-merge May 1, 2024 12:08
@masih masih requested a review from Stebalien May 1, 2024 15:09
@masih masih added this pull request to the merge queue May 1, 2024
Merged via the queue into main with commit 0893647 May 1, 2024
@masih masih deleted the masih/fix-next-instance-start branch May 1, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants