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

hbbft consensus message memorial (tracking) #17

Closed
5 tasks done
SurfingNerd opened this issue Jun 11, 2021 · 5 comments
Closed
5 tasks done

hbbft consensus message memorial (tracking) #17

SurfingNerd opened this issue Jun 11, 2021 · 5 comments
Assignees
Milestone

Comments

@SurfingNerd
Copy link
Collaborator

SurfingNerd commented Jun 11, 2021

Currently it is very hard to figure out, which node did send it's contribution shares to whom,
and which node did not send any.
it requires a lot of deep analysis of log files, what is very time consuming.

In the long term, it is required for identifying inactive consensus nodes, so the nodes can agree on a malice report for the specific node.

There are different options:

  • provide the information via RPC call
  • continuous output in the log files all few seconds
  • write out as files

Development Branch: https://github.com/SurfingNerd/openethereum-3.x/tree/surfingnerd/hbbft-message-memorium

Settings

Values to Track

Usage of Data

@SurfingNerd
Copy link
Collaborator Author

i can confirm that the system builds the block after receiving enough signatures, but it still receives all messages, what is exactly what we need.
example:

0x59ec…3f5f
2021-07-19 15:43:07  Worker Client1 TRACE consensus  Sending exclusive message to 0x8de7…4354
2021-07-19 15:43:07  Worker Client1 TRACE consensus  Sending exclusive message to 0xe362…4752
2021-07-19 15:43:07  Worker Client1 TRACE consensus  Sending exclusive message to 0xf9f7…a608
2021-07-19 15:43:07  Worker Client2 TRACE consensus  Received message of idx 23558  Message { epoch: 436, content: Subset(Message { proposer_id: 0d..6b, content: Agreement(Message { epoch: 2, content: Term(false) }) }) } from NodeId(0x59ec…3f5f)
2021-07-19 15:43:07  Worker Client2 TRACE consensus  Skipping honey_badger forward to epoch(block) 436, was at epoch(block) 437.
2021-07-19 15:43:07  Worker Client2 TRACE consensus  Received message of idx 21461  Message { epoch: 436, content: Subset(Message { proposer_id: 0d..6b, content: Agreement(Message { epoch: 2, content: Term(false) }) }) } from NodeId(0x0ddc…956b)
2021-07-19 15:43:07  Worker Client2 TRACE consensus  Skipping honey_badger forward to epoch(block) 436, was at epoch(block) 437.
2021-07-19 15:43:07  Worker Client2 TRACE consensus  Received message of idx 21918  Message { epoch: 436, content: Subset(Message { proposer_id: 0d..6b, content: Agreement(Message { epoch: 2, content: Term(false) }) }) } from NodeId(0x11c7…6bc6)
2021-07-19 15:43:07  Worker Client2 TRACE consensus  Skipping honey_badger forward to epoch(block) 436, was at epoch(block) 437.
2021-07-19 15:43:07  Worker Client2 TRACE consensus  Received message of idx 17964  Message { epoch: 436, content: Subset(Message { proposer_id: 0d..6b, content: Agreement(Message { epoch: 2, content: Term(false) }) }) } from NodeId(0xf9f7…a608)
2021-07-19 15:43:07  Worker Client2 TRACE consensus  Skipping honey_badger forward to epoch(block) 436, was at epoch(block) 437.
2021-07-19 15:43:07  Worker Client2 TRACE consensus  Received message of idx 21269  Message { epoch: 436, content: Subset(Message { proposer_id: 0d..6b, content: Agreement(Message { epoch: 2, content: Term(false) }) }) } from NodeId(0xe362…4752)
2021-07-19 15:43:07  Worker Client2 TRACE consensus  Skipping honey_badger forward to epoch(block) 436, was at epoch(block) 437.
2021-07-19 15:43:07  Worker Hbbft1 TRACE engine  replay_cached_messages: Could not query posdao epoch at parent block#436, re-trying later. Probably due to the block not being imported yet.
2021-07-19 15:43:07  Worker Hbbft1 TRACE consensus  Skipping honey_badger forward to epoch(block) 436, was at epoch(block) 437.
2021-07-19 15:43:07  Worker Client2 TRACE consensus  Received sealing message  Message(SignatureShare(0d64..6c52)) from NodeId(0x8de7…4354)
2021-07-19 15:43:07  Worker Client2 TRACE consensus  Skipping honey_badger forward to epoch(block) 436, was at epoch(block) 437.
2021-07-19 15:43:07  Worker Client2 TRACE consensus  Received signature share for block 436 from NodeId(0x8de7…4354)
2021-07-19 15:43:07  Worker Client0 TRACE consensus  Received sealing message  Message(SignatureShare(14a4..db38)) from NodeId(0xf9f7…a608)
2021-07-19 15:43:07  Worker Client0 TRACE consensus  Skipping honey_badger forward to epoch(block) 436, was at epoch(block) 437.
2021-07-19 15:43:07  Worker Client0 TRACE consensus  Received signature share for block 436 from NodeId(0xf9f7…a608)
2021-07-19 15:43:07  Worker Client0 TRACE consensus  Signature for block 436 is ready

@SurfingNerd SurfingNerd changed the title hbbft consensus message tracking hbbft consensus message memorium Jul 26, 2021
@SurfingNerd SurfingNerd changed the title hbbft consensus message memorium hbbft consensus message memorial Jul 27, 2021
@SurfingNerd
Copy link
Collaborator Author

it's better to use an own fork of HBBFT.
Since the messages are only public within the crate.
The only way to access detail information i have found so far is to workaround over serialisation, like json.
The problem with it: the messages contain the byte arrays as well, and JSON serializing/deserialisation of that information becomes very CPU/memory intensive.

@SurfingNerd SurfingNerd changed the title hbbft consensus message memorial hbbft consensus message memorial (tracking) Aug 6, 2021
SurfingNerd added a commit to SurfingNerd/openethereum-3.x that referenced this issue Aug 6, 2021
@SurfingNerd
Copy link
Collaborator Author

state of message memorial should also be written out to the terminal, so we have more tools for error analysis.
this should also include the current state of the hbbft.

@SurfingNerd
Copy link
Collaborator Author

Here is an example of some tracked faulty messages

2023-04-21 22:17:47  Worker Client2 TRACE consensus  Received message of idx 2  Message { epoch: 252, content: Subset(Message { proposer_id: 66..60, content: Broadcast(Value(Proof { #1, root_hash: 858f..3003, value: 435b..f396, .. })) }) } from NodeId(0x66ca…ce60)
2023-04-21 22:17:47  Worker Client2 WARN consensus  Block 252 Node NodeId(0x66ca…ce60) reported fault: SubsetFault(BroadcastFault(MultipleValues))
2023-04-21 22:17:47  Worker Client0 TRACE consensus  Received message of idx 13  Message { epoch: 252, content: Subset(Message { proposer_id: 66..60, content: Broadcast(Echo(Proof { #9, root_hash: 858f..3003, value: 73a4..4b48, .. })) }) } from NodeId(0x66ca…ce60)
2023-04-21 22:17:47  Worker Client0 WARN consensus  Block 252 Node NodeId(0x66ca…ce60) reported fault: SubsetFault(BroadcastFault(MultipleEchos))
2023-04-21 22:17:47  MessageMemorial WARN hbbft_message_memorium  add_message_event_faulty: event.block_num 252 <= last_message_faulty 252
2023-04-21 22:17:47  MessageMemorial WARN hbbft_message_memorium  add_message_event_faulty: event.block_num 252 <= last_message_faulty 252
2023-04-21 22:17:47  Worker Client1 TRACE consensus  Received message of idx 20  Message { epoch: 252, content: Subset(Message { proposer_id: 66..60, content: Broadcast(Echo(Proof { #12, root_hash: 858f..3003, value: 7ddc..da2e, .. })) }) } from NodeId(0x743b…800f)
2023-04-21 22:17:47  Worker Client1 WARN consensus  Block 252 Node NodeId(0x743b…800f) reported fault: SubsetFault(BroadcastFault(MultipleEchos))
2023-04-21 22:17:47  MessageMemorial WARN hbbft_message_memorium  add_message_event_faulty: event.block_num 252 <= last_message_faulty 252
2023-04-21 22:17:48  Worker Client0 TRACE txqueue  [0x0eb1216c15a3e570dc7270b2ed7f2120e97f3903f7866193f4f9484379fc3f58] Rejecting recently rejected: NotAllowed

@SurfingNerd
Copy link
Collaborator Author

Malice Reports get a redesign with the Bonus Score System. We will address it there.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Alpha4 Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

1 participant