Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 2 additions & 5 deletions include/lantern/consensus/fork_choice.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ struct lantern_fork_choice_block_entry {
LanternValidatorIndex proposer_index;
bool has_validator_count;
uint64_t validator_count;
bool has_justified;
bool has_finalized;
LanternCheckpoint latest_justified;
LanternCheckpoint latest_finalized;
};

struct lantern_fork_choice_state_entry {
Expand Down Expand Up @@ -160,7 +156,8 @@ int lantern_fork_choice_update_checkpoints(
* startup restoration and may move checkpoints backwards when the persisted
* state is behind the temporary anchor checkpoints used during init.
*
* Any provided checkpoint root must already exist in the fork-choice store.
* Restored checkpoints must refer to blocks already materialized in the local
* fork-choice tree.
*/
int lantern_fork_choice_restore_checkpoints(
LanternForkChoice *store,
Expand Down
10 changes: 9 additions & 1 deletion include/lantern/networking/gossipsub_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ struct lantern_gossipsub_service {
char vote_subnet_topic[128];
char aggregated_attestation_topic[128];
const char *data_dir;
const char *devnet;
size_t attestation_subnet_id;
int subscribe_attestation_subnet;
int (*publish_hook)(const char *topic, const uint8_t *payload, size_t payload_len, void *user_data);
Expand All @@ -60,6 +61,9 @@ struct lantern_gossipsub_service {
libp2p_gossipsub_validator_handle_t *vote_validator_handle;
libp2p_gossipsub_validator_handle_t *vote_subnet_validator_handle;
libp2p_gossipsub_validator_handle_t *aggregated_attestation_validator_handle;
char (*extra_vote_subnet_topics)[128];
libp2p_gossipsub_validator_handle_t **extra_vote_subnet_validator_handles;
size_t extra_vote_subnet_topic_count;
};

void lantern_gossipsub_service_init(struct lantern_gossipsub_service *service);
Expand All @@ -76,10 +80,14 @@ int lantern_gossipsub_service_publish_vote(
const LanternSignedVote *vote);
int lantern_gossipsub_service_publish_vote_subnet(
struct lantern_gossipsub_service *service,
const LanternSignedVote *vote);
const LanternSignedVote *vote,
size_t subnet_id);
int lantern_gossipsub_service_publish_aggregated_attestation(
struct lantern_gossipsub_service *service,
const LanternSignedAggregatedAttestation *attestation);
int lantern_gossipsub_service_subscribe_attestation_subnet(
struct lantern_gossipsub_service *service,
size_t subnet_id);
void lantern_gossipsub_service_set_publish_hook(
struct lantern_gossipsub_service *service,
int (*hook)(const char *topic, const uint8_t *payload, size_t payload_len, void *user_data),
Expand Down
Loading
Loading