Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #19551

Closed (moved)
(moved)
Open
Created Jul 02, 2016 by George Kadianakis@asn

Edge case test fail in shared random code

The test_state_update() test would fail if you run it between 23:30 and 00:00UTC in the following way:

  FAIL src/test/test_shared_random.c:1230: assert(state->n_protocol_runs == 1): 2 vs 1
  [state_update FAILED]
1/1 TESTS FAILED. (0 skipped)

The problem is that when you launch the test at 23:30UTC (reveal phase), sr_state_update() gets called from sr_state_init() and it will prepare the state for the voting round at 00:00UTC (commit phase). Since we transition from reveal to commit phase, this would trigger an unwanted phase transition and increment the n_protocol_runs counter even before the actual test starts.

The solution is to initialize the n_protocol_runs to 0 explicitly in the beginning of the test, as we do for n_reveal_rounds, n_commit_rounds etc.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking