Skip to content

Commit 77ab628

Browse files
committed
Continue tracking down issues
1 parent 1210a9c commit 77ab628

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

crates/daphne-server/src/storage_proxy_connection/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub struct RequestBuilder<'d, B: DurableMethod, P: AsRef<[u8]>> {
5757
request: DurableRequest<P>,
5858
}
5959

60-
impl<'d, B: DurableMethod + Debug, P: AsRef<[u8]>> RequestBuilder<'d, B, P> {
60+
impl<B: DurableMethod + Debug, P: AsRef<[u8]>> RequestBuilder<'_, B, P> {
6161
#[tracing::instrument(skip_all, fields(path = ?self.path))]
6262
pub async fn send<R>(self) -> Result<R, Error>
6363
where

crates/daphne-server/tests/e2e/e2e.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,6 +1644,11 @@ async fn leader_collect_taskprov_ok(version: DapVersion) {
16441644
)
16451645
.unwrap();
16461646

1647+
println!("Now - not_before: {}", t.now - task_config.not_before);
1648+
println!(
1649+
"Now - batch_interval.start: {}",
1650+
t.now - batch_interval.start
1651+
);
16471652
let path = TestRunner::upload_path_for_task(&task_id);
16481653
let method = match version {
16491654
DapVersion::Draft09 => &Method::PUT,

crates/daphne/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ impl DapTaskParameters {
585585
)
586586
.unwrap()
587587
.into_opted_in(&taskprov::OptInParam {
588-
not_before: now,
588+
not_before: now - (now % self.time_precision) - 1,
589589
num_agg_span_shards: self.num_agg_span_shards,
590590
});
591591

crates/daphne/src/roles/leader/mod.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,19 +216,23 @@ pub async fn handle_upload_req<A: DapLeader>(
216216
.into());
217217
}
218218

219-
// Check that the report was generated after the task's `not_before` time.
220-
if report.report_metadata.time < task_config.as_ref().not_before {
219+
if report.report_metadata.time
220+
< task_config.as_ref().not_before - task_config.as_ref().time_precision
221+
{
221222
return Err(DapAbort::ReportRejected {
222-
detail: "The timestamp preceeds the start of the task".into(),
223+
detail: "The timestamp preceeds the start of the task's validity window".into(),
223224
}
224225
.into());
225226
}
226227

227-
if report.report_metadata.time
228-
< task_config.as_ref().not_before - task_config.as_ref().time_precision
229-
{
228+
// Check that the report was generated after the task's `not_before` time.
229+
println!(
230+
"report_metadata.time - task_config.not_before: {}",
231+
report.report_metadata.time - task_config.as_ref().not_before
232+
);
233+
if report.report_metadata.time < task_config.as_ref().not_before {
230234
return Err(DapAbort::ReportRejected {
231-
detail: "The timestamp preceeds the start of the task's validity window".into(),
235+
detail: "The timestamp preceeds the start of the task".into(),
232236
}
233237
.into());
234238
}

0 commit comments

Comments
 (0)