Skip to content

Commit

Permalink
add index
Browse files Browse the repository at this point in the history
  • Loading branch information
georgehao committed Jul 8, 2024
1 parent c107078 commit 174c1f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coordinator/test/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,12 @@ func testValidProof(t *testing.T) {

provers[i] = newMockProver(t, "prover_test"+strconv.Itoa(i), coordinatorURL, proofType, version.Version)

proofStatus := verifiedSuccess
exceptProofStatus := verifiedSuccess
proverTask, errCode, errMsg := provers[i].getProverTask(t, proofType)
assert.Equal(t, types.Success, errCode)
assert.Equal(t, "", errMsg)
assert.NotNil(t, proverTask)
provers[i].submitProof(t, proverTask, proofStatus, types.Success)
provers[i].submitProof(t, proverTask, exceptProofStatus, types.Success)
}

// verify proof status
Expand Down
3 changes: 3 additions & 0 deletions database/migrate/migrations/00021_bundle.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ CREATE INDEX idx_bundle_index_desc ON bundle(index DESC) WHERE deleted_at IS NUL
CREATE INDEX idx_bundle_batch_proofs_status ON bundle(batch_proofs_status) WHERE deleted_at IS NULL;
CREATE INDEX idx_bundle_start_batch_index ON bundle(start_batch_index) WHERE deleted_at IS NULL;
CREATE INDEX idx_bundle_end_batch_index ON bundle(end_batch_index) WHERE deleted_at IS NULL;
create index idx_bundle_total_attempts_active_attempts_batch_proofs_status
on bundle (total_attempts, active_attempts, batch_proofs_status)
where deleted_at IS NULL;

COMMENT ON COLUMN bundle.batch_proofs_status IS 'undefined, pending, ready';
COMMENT ON COLUMN bundle.proving_status IS 'undefined, unassigned, assigned, proved (deprecated), verified, failed';
Expand Down

0 comments on commit 174c1f3

Please sign in to comment.