-
Notifications
You must be signed in to change notification settings - Fork 296
Replay prevention on proposal generation #1857
Replay prevention on proposal generation #1857
Conversation
Signed-off-by: Nikita Alekseev <[email protected]>
…edger/iroha into feature/replay_proposal_generation
Signed-off-by: Nikita Alekseev <[email protected]>
Signed-off-by: Nikita Alekseev <[email protected]>
Signed-off-by: Nikita Alekseev <[email protected]>
Signed-off-by: Nikita Alekseev <[email protected]>
Signed-off-by: Nikita Alekseev <[email protected]>
}, | ||
[this](const auto &status) { | ||
log_->warn( | ||
"Received already processed batch. Duplicate transaction: {}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the log it will be unclear, where messages about one batch end and another starts. I propose to add some splitters to the messages, so it would be:
Batch 1:
Received already processed batch. Duplicate transaction 395gjfr8g49
Received already processed batch. Duplicate transaction fc409mir43k
Batch 42:
Received already processed batch. Duplicate transaction fk4590owfje
Of course, the information can be extracted from tx hashes, but for usability it will be better, if it were understood from the first glance
@@ -13,7 +13,7 @@ | |||
#include <unordered_map> | |||
|
|||
#include <tbb/concurrent_queue.h> | |||
|
|||
#include "ametsuchi/tx_presence_cache.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't forward declaration here and include in .cpp work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Nikita Alekseev <[email protected]>
Signed-off-by: Nikita Alekseev <[email protected]>
Description of the Change
This PR adds replay prevention during proposal generation in on demand ordering service.
Benefits
Replay prevention
Possible Drawbacks
All batches must be checked via cache