2023-10-25 15:01:24 +00:00
|
|
|
create table wdpost_partition_tasks
|
2023-08-30 16:34:11 +00:00
|
|
|
(
|
2023-10-25 15:01:24 +00:00
|
|
|
task_id bigint not null
|
|
|
|
constraint wdpost_partition_tasks_pk
|
2023-10-05 15:52:22 +00:00
|
|
|
primary key,
|
2023-10-25 15:01:24 +00:00
|
|
|
sp_id bigint not null,
|
|
|
|
proving_period_start bigint not null,
|
|
|
|
deadline_index bigint not null,
|
|
|
|
partition_index bigint not null,
|
|
|
|
constraint wdpost_partition_tasks_identity_key
|
|
|
|
unique (sp_id, proving_period_start, deadline_index, partition_index)
|
2023-08-30 16:34:11 +00:00
|
|
|
);
|
|
|
|
|
2023-10-25 15:01:24 +00:00
|
|
|
comment on column wdpost_partition_tasks.task_id is 'harmonytask task ID';
|
|
|
|
comment on column wdpost_partition_tasks.sp_id is 'storage provider ID';
|
|
|
|
comment on column wdpost_partition_tasks.proving_period_start is 'proving period start';
|
|
|
|
comment on column wdpost_partition_tasks.deadline_index is 'deadline index within the proving period';
|
|
|
|
comment on column wdpost_partition_tasks.partition_index is 'partition index within the deadline';
|
|
|
|
|
2023-10-12 17:35:10 +00:00
|
|
|
create table wdpost_proofs
|
|
|
|
(
|
2023-11-04 11:32:27 +00:00
|
|
|
sp_id bigint not null,
|
|
|
|
proving_period_start bigint not null,
|
|
|
|
deadline bigint not null,
|
|
|
|
partition bigint not null,
|
|
|
|
submit_at_epoch bigint not null,
|
|
|
|
submit_by_epoch bigint not null,
|
2023-11-07 13:03:31 +00:00
|
|
|
proof_params bytea,
|
2023-11-03 20:53:15 +00:00
|
|
|
|
2023-11-04 11:32:27 +00:00
|
|
|
submit_task_id bigint,
|
|
|
|
message_cid text,
|
2023-11-03 20:53:15 +00:00
|
|
|
|
|
|
|
constraint wdpost_proofs_identity_key
|
2023-11-04 11:32:27 +00:00
|
|
|
unique (sp_id, proving_period_start, deadline, partition)
|
2023-10-12 17:35:10 +00:00
|
|
|
);
|
2023-11-09 16:24:37 +00:00
|
|
|
|
|
|
|
create table wdpost_recovery_tasks
|
|
|
|
(
|
|
|
|
task_id bigint not null
|
2023-11-13 22:23:29 +00:00
|
|
|
constraint wdpost_recovery_tasks_pk
|
2023-11-09 16:24:37 +00:00
|
|
|
primary key,
|
|
|
|
sp_id bigint not null,
|
|
|
|
proving_period_start bigint not null,
|
|
|
|
deadline_index bigint not null,
|
|
|
|
partition_index bigint not null,
|
2023-11-13 22:23:29 +00:00
|
|
|
constraint wdpost_recovery_tasks_identity_key
|
2023-11-09 16:24:37 +00:00
|
|
|
unique (sp_id, proving_period_start, deadline_index, partition_index)
|
|
|
|
);
|