-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/worker/client: Better handle latest round queries with verification
When a query is requesting to be executed against the latest round and the runtime reports a consensus verifier error, use an earlier round instead as the latest round may not yet be verifiable by the light client as it needs to wait for the validator signatures.
- Loading branch information
Showing
3 changed files
with
62 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
go/worker/client: Better handle latest round queries with verification | ||
|
||
When a query is requesting to be executed against the latest round and | ||
the runtime reports a consensus verifier error, use an earlier round | ||
instead as the latest round may not yet be verifiable by the light | ||
client as it needs to wait for the validator signatures. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package protocol | ||
|
||
import ( | ||
"github.com/oasisprotocol/oasis-core/go/common/errors" | ||
) | ||
|
||
// ModuleVerifierName is the name of the consensus verifier module inside the runtime. | ||
const ModuleVerifierName = "verifier" | ||
|
||
// ErrVerifierVerificationFailed is the error returned when consensus verifier fails to verify the | ||
// passed consensus light block. | ||
var ErrVerifierVerificationFailed = errors.New(ModuleVerifierName, 2, "verifier: light block verification failed") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters