Skip to content

Commit

Permalink
job
Browse files Browse the repository at this point in the history
  • Loading branch information
rkdud007 committed Apr 19, 2024
1 parent 3b9c67b commit 82c3df9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
12 changes: 2 additions & 10 deletions crates/delegator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
tokio::select! {
Ok(Some(_)) = stdin.next_line() => {
// TODO: Turn this into a real job generation
let job = Job {
reward: 100,
num_of_steps: 10,
private_input: vec![1, 2, 3],
public_input: vec![4, 5, 6],
cpu_air_prover_config: vec![7, 8, 9],
cpu_air_params: vec![10, 11, 12],
};
let serialized_job = (job).serialize_job();
send_topic_tx.send(serialized_job).await?;

send_topic_tx.send([1,2, 3].to_vec()).await?;
},
Some(event) = message_stream.next() => {
info!("{:?}", event);
Expand Down
4 changes: 2 additions & 2 deletions crates/executor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
Event::Message { message, .. } => {
// Received a new-job message from the network
if message.topic == gossipsub_ident_topic(Network::Sepolia, Topic::NewJob).into() {
let deserialized_job = Job::deserialize_job(&message.data);
info!("Received a new job: {:?}", deserialized_job);

info!("Received a new job: {:?}", message);
}
// Received a picked-job message from the network
if message.topic == gossipsub_ident_topic(Network::Sepolia, Topic::PickedJob).into() {
Expand Down

0 comments on commit 82c3df9

Please sign in to comment.