Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add task image id #442

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9712749
feat(taskdb): impl Debug/Clone for TaskManager
keroro520 Jan 7, 2025
9dcc66a
feat(host): maintain task_manager instead of creating every time
keroro520 Jan 7, 2025
f5225ca
feat(taskdb): remove get_task_manager
keroro520 Jan 7, 2025
9904017
fix: resolve compilation errors and update test cases for image_id field
keroro520 Dec 30, 2024
8717a8e
feat: add image_id field to ProofRequest and ProofRequestOpt
keroro520 Dec 30, 2024
11a8f8b
feat: implement image id retrieval from environment variables
keroro520 Dec 30, 2024
3fcfc5b
feat: add image_id field to AggregationRequest and update related imp…
keroro520 Dec 30, 2024
af1df52
feat: add error handling for missing image IDs
keroro520 Dec 30, 2024
587fcee
chore: minor modification
keroro520 Dec 30, 2024
bc767e7
refactor: replace From implementation with new constructor for ProofT…
keroro520 Dec 30, 2024
95fb714
refactor: simplify ProofTaskDescriptor constructor with unified new f…
keroro520 Dec 30, 2024
c43ff1b
refactor: update ProofTaskDescriptor usage to use new constructor
keroro520 Dec 30, 2024
72104cc
refactor: simplify ProofTaskDescriptor constructor and remove From tr…
keroro520 Dec 30, 2024
1c26e95
refactor: update all ProofTaskDescriptor::from usages to use new cons…
keroro520 Dec 30, 2024
d7f2161
fix: add image_id field to AggregationOnlyRequest initialization
keroro520 Dec 30, 2024
50168fc
refactor: implement TryFrom(AggregationOnlyRequest) for AggregationTa…
keroro520 Dec 30, 2024
e56cb34
fix: throw error of missing image_id
keroro520 Dec 30, 2024
f600130
feat: add ensure_ensure_proof_request_image_id, ensure_aggregation_re…
keroro520 Dec 30, 2024
5c7dcea
feat(lib): add Prover::{current_proving_image(), current_aggregation_…
keroro520 Dec 27, 2024
76912e4
chore: fix TryInto call
keroro520 Dec 30, 2024
3220790
refactor: derive Default for ProofTaskDescriptor
keroro520 Dec 30, 2024
da7928e
feat(core): add get_proving_image/get_aggregation_image by proof_type
keroro520 Dec 27, 2024
0538053
chore: fix clippy warning
keroro520 Dec 30, 2024
89f9eab
fix: make test
keroro520 Dec 30, 2024
5994c88
feat(host): assert image_id.is_none
keroro520 Jan 6, 2025
6feefbd
chore: fix typo
keroro520 Jan 6, 2025
49944a0
chore: fix clippy
keroro520 Jan 6, 2025
8dbca97
fix(test): config redis url correctly
keroro520 Jan 7, 2025
941e104
test: run case serially
keroro520 Jan 7, 2025
7d46f5f
feat(.github): setup redis
keroro520 Jan 7, 2025
8530537
wkp
keroro520 Jan 7, 2025
3c327ba
wip
keroro520 Jan 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: derive Default for ProofTaskDescriptor
  • Loading branch information
keroro520 committed Jan 7, 2025
commit 3220790837db4167be4dfb979cf097b8c6b59c08
4 changes: 2 additions & 2 deletions provers/risc0/driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,12 @@ impl Prover for Risc0Prover {

fn current_proving_image() -> (&'static [u8], &'static [u32; 8]) {
use crate::methods::risc0_guest::{RISC0_GUEST_ELF, RISC0_GUEST_ID};
(&RISC0_GUEST_ELF, &RISC0_GUEST_ID)
(RISC0_GUEST_ELF, &RISC0_GUEST_ID)
}

fn current_aggregation_image() -> (&'static [u8], &'static [u32; 8]) {
use crate::methods::risc0_aggregation::{RISC0_AGGREGATION_ELF, RISC0_AGGREGATION_ID};
(&RISC0_AGGREGATION_ELF, &RISC0_AGGREGATION_ID)
(RISC0_AGGREGATION_ELF, &RISC0_AGGREGATION_ID)
}
}

Expand Down
2 changes: 1 addition & 1 deletion provers/sp1/driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl Prover for Sp1Prover {
"Sp1 Prover: block {:?} with vk {:?} image_id {}",
output.header.number,
vk.bytes32(),
encode_image_id(&image_id)
encode_image_id(image_id)
);
Sp1ProverClient { client, pk, vk }
})
Expand Down
15 changes: 1 addition & 14 deletions taskdb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl<'a> FromIterator<&'a TaskStatus> for TaskStatus {
}
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash, Default)]
pub struct ProofTaskDescriptor {
pub chain_id: ChainId,
pub block_id: u64,
Expand Down Expand Up @@ -178,19 +178,6 @@ impl ProofTaskDescriptor {
}
}

impl Default for ProofTaskDescriptor {
fn default() -> Self {
Self {
chain_id: Default::default(),
block_id: Default::default(),
blockhash: Default::default(),
proof_system: Default::default(),
prover: Default::default(),
image_id: None,
}
}
}

impl From<ProofTaskDescriptor> for (ChainId, B256) {
fn from(
ProofTaskDescriptor {
Expand Down