Skip to content

Fullnode after generating the fraud proof does not immediately force stop the node #947

Description

@gupadhyaya

The fullnode after generating and broadcasting the fraud proof, exists the SyncLoop silently and upon receiving the gossiped fraud proof, cancels the context. This could lead to fullnode never stopping gracefully. This can be fixed partially by capturing the cancel event (which only happens upon receiving the fraud proof) and stopping the node gracefully.

func (n *FullNode) OnStart() error {
  ...
  ...
  go func(ctx context.Context) {
		  select {
		  case <-ctx.Done():
			  n.Stop()
		  default:
		  }
  }(n.ctx)
  return nil
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C:state-fraud-proofsComponent: State Fraud Proofs (generation and validation)blocked

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions