···1919const CommitToChallengeMaxAgeInBlocks = 3
2020const CommitToChallengeMinRange = 1000
2121const CommitToChallengeMaxRange = 10000
2222+const CommitToChallengeTargetInterval = 5000
22232324var CommitToChallengeMaxAge = lo.Must(time.ParseDuration("10s"))
24252525-const CompleteChallengeMaxAgeInBlocks = 3
2626+const CompleteChallengeMaxAgeInBlocks = 4
26272728var CompleteChallengeMaxAge = lo.Must(time.ParseDuration("10s"))
2829···245246 }, nil
246247 }
247248248248- includedHeightBlockMeta := deps.blockStore.LoadBlockMeta(int64(includedOnHeight))
249249- if includedHeightBlockMeta == nil {
249249+ blockAfterMeta := deps.blockStore.LoadBlockMeta(int64(includedOnHeight + 1))
250250+ if blockAfterMeta == nil {
250251 // this shouldn't happen unless the prover is submitting the completion on the same block as the commitment
251252 return &processResult{
252253 Code: 4302,
···254255 }, nil
255256 }
256257257257- if time.Since(includedHeightBlockMeta.Header.Time) > CompleteChallengeMaxAge {
258258+ if time.Since(blockAfterMeta.Header.Time) > CompleteChallengeMaxAge {
258259 // validator must commit to a new challenge
259260 return &processResult{
260261 Code: 4303,
···275276 proofHeight := int64(binary.BigEndian.Uint64(existenceProof.Key))
276277277278 expectedProofHeight := computeHeightToProveInRange(
278278- includedHeightBlockMeta.Header.LastCommitHash.Bytes(),
279279+ blockAfterMeta.Header.LastCommitHash.Bytes(),
279280 tx.Arguments.Validator,
280281 int64(fromHeight),
281282 int64(toHeight),
+2-2
httpapi/server.go
···228228 return
229229 }
230230231231- // broadcastTxCommit will wait for inclusion until the context deadline expires
231231+ // we'll wait for inclusion until the context deadline expires
232232 // in practice we expect operations to be included in about one second
233233- result, err := s.mempoolSubmitter.BroadcastTxCommit(r.Context(), txBytes)
233233+ result, err := s.mempoolSubmitter.BroadcastTx(r.Context(), txBytes, true)
234234 // TODO more robust error handling
235235 if handlePLCError(w, err, "") {
236236 return