This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Description
Currently, mutations can be requested for epochs starting from epoch 1. Epoch 1 is created initially by the sequencer if no previous epoch exists and the tree is still empty (no mutations exist).
The monitor currently needs to request epoch 1 which fails when inclusions proofs are setup to point the previous epoch which is the expected behavior (epoch 0 does not exist).
With
|
var epoch int64 |
|
if in.Epoch > 1 { |
|
epoch = in.Epoch - 1 |
|
} else { |
|
epoch = 1 |
|
} |
|
proofs, err := s.inclusionProofs(ctx, indexes, epoch) |
we introduced a temporary workaround/hack that makes the API work even if epoch 1 (mutation do not exist) is requested.
On the long-run we rather want:
- epoch 2 is the first epoch we want to allow the mutation service to allow as a valid request (mutations might exist)
- use/provide another API to request epoch 1