-
Notifications
You must be signed in to change notification settings - Fork 5
feat: update double echo to use pending CF #418
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #418 +/- ##
==========================================
- Coverage 69.24% 68.75% -0.50%
==========================================
Files 220 220
Lines 11969 12109 +140
==========================================
+ Hits 8288 8325 +37
- Misses 3681 3784 +103 ☔ View full report in Codecov by Sentry. |
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.
This seems like a pretty big change. Do you mind adding more info in the description so reviewers can understand the motivation and consequences a bit better?
289864b
to
04c1af6
Compare
d72275f
to
5e9def2
Compare
e19650d
to
cc9165a
Compare
fa51568
to
12bc779
Compare
c7b386c
to
5336df3
Compare
768a2ca
to
11918dd
Compare
a0b98cb
to
881c2bf
Compare
2db73f9
to
01b85d0
Compare
the task manager (double_echo) will fetch new certificate to broadcast every seconds if needed Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
01b85d0
to
aa11f72
Compare
This reverts commit 59c6141.
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
aa11f72
to
ce340e0
Compare
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.
Lots of good micro-improvments here, good stuff.
I fixed a few typos and log messages, but the rest of my comments are questions or topics best addressed in separate PRs. Feel free to respond to question at your convenience (not a blocker to merge).
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.
Just one nitpick about having a const
for the amount of pending_certificates
we want to fetch with each tick
.
Generally, I would like some explanation how the intented flow is. When we re-deploy the network, how is the pending_certificate
help us? Do we do partial shutdowns and then the nodes pick up, and then get shutdown?
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
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.
👍
Description
This PR is the final one regarding the stabilization of the
soft-fork
playbook fordevnet
.It contains various fixes and changes that allow the network to be upgraded without the need of purging it, allowing the continuity of the delivery while upgrading. This PR biggest change is that the
broadcast
is actively asking for certificates, instead of receiving them from a channel. It allows us to stack incoming certificates in the Storage and process them at node pace. When shutting down, the broadcast will restart from the next certificate still in pending in the Storage.Changes per crates
topos
node up
command, the parsing of theboot_peers
from genesis is needed in order to define theis-bootnode
config value as soon as possible.is-bootnode
is a config value but is not available in the config file. Mostly to prevent anyone of definingis-bootnode = true
directly, relying solely on thegenesis
file.topos-p2p
is-bootnode
from configuration in place of the old valuekademelia
error when bootstrappingtopos-tce-broadcast
task_manager
is handling shutdowntask_manager
will actively request for newpending
certificates on interval (currently 1sec), improvements need to be made on this, it'll be part of another PR.topos-tce-storage
InternalStorageError
to catch when a certificate isCertificateAlreadyPending
PendingResult
also expose aAlreadyPending
Map
trait toiter_at
a specific index, implemented inDBColumn
ValidatorStore
exposes a newget_next_pending_certificates
allowing to get the nextN
certificates in pendingCertificateAlreadyPending
ValidatorStore
implementation ofinsert_certificate_delivered
will now correctly remove the child certificate fromprecedence_pool
after adding it topending_pool
ValidatorPendingTables
is properly fetching the currentpending_id
from the storage when starting, if not, falling back as expected on1
topos-tce
app_context/api
andapp_context/network
mostly)PR Checklist: