Skip to content

Commit fcc8dc1

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

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,6 +1644,8 @@ 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!("Now - batch_interval.start: {}", t.now - batch_interval.start);
16471649
let path = TestRunner::upload_path_for_task(&task_id);
16481650
let method = match version {
16491651
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: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,23 +216,25 @@ 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!("report_metadata.time - task_config.not_before: {}", report.report_metadata.time - task_config.as_ref().not_before);
230+
if report.report_metadata.time < task_config.as_ref().not_before {
230231
return Err(DapAbort::ReportRejected {
231-
detail: "The timestamp preceeds the start of the task's validity window".into(),
232+
detail: "The timestamp preceeds the start of the task".into(),
232233
}
233234
.into());
234235
}
235236

237+
236238
if let Some(public_extensions) = &report.report_metadata.public_extensions {
237239
// We can be sure at this point that the ReportMetadata is well formed (as
238240
// the decoding / error checking happens in the extractor).

0 commit comments

Comments
 (0)