Skip to content

initial operator message types#454

Open
vladimir-ea wants to merge 1 commit into
developfrom
ve/operator_types
Open

initial operator message types#454
vladimir-ea wants to merge 1 commit into
developfrom
ve/operator_types

Conversation

@vladimir-ea

@vladimir-ea vladimir-ea commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

operator message types for use on p2p
the operator_id in the messages is just Vec<u8> - we should decide what identifiers we want use:

  • human readable strings - e.g. 'titan_eu'
  • public keys
  • p2p ids
    -?

i will add the p2p impl next.

#[derive(Debug, Decode, Encode, Hash)]
pub struct Demotion {
/// Originating operator, utf8 bytes
operator_id: Vec<u8>,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this id may be unnecessary if we do straight-forward pubsub on p2p (aka floodsub) rather than gossip, since then the originator id is the sending peer id.

#[derive(Debug, Decode, Encode, Hash)]
pub struct Demotion {
/// Originating operator, utf8 bytes
operator_id: Vec<u8>,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets just make this fixed size?

Comment on lines +14 to +16
let mut hasher = DefaultHasher::new();
self.hash(&mut hasher);
(TYPE as u64) << 56 | hasher.finish() >> 8

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FxHasher?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants