pbft/online.h

40 lines
912 B
C
Raw Permalink Normal View History

2025-01-25 00:01:36 -05:00
#ifndef H_ONL
#define H_ONL
#include "hosts.h"
#include "msg.h"
struct sigkey {
uint32_t key;
};
struct sigpriv {
uint32_t key;
};
uint32_t small_digest(struct msg *request);
void handle_primary_recv_request(struct msg *request, struct sigpriv *privkey);
void handle_send_prepare(struct msg *preprepare, struct sigpriv *privkey);
void handle_send_commit(struct msg *msg, struct msg *prepare,
struct sigpriv *privkey);
void handle_operation(struct msg *msg, struct sigpriv *privkey);
bool prepared(struct msg_log *mlog, int f, struct msg *request, uint32_t view,
uint32_t seq);
bool committed_local(struct msg_log *mlog, int f, struct msg *request,
uint32_t view, uint32_t seq);
uint32_t sign_msg(struct msg *message, struct sigpriv *privkey);
bool validate_signature(struct msg *message, struct sigkey *key);
void *todo_key();
#endif