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

SIMD-0046: Optimistic cluster restart automation #46

Open
wants to merge 127 commits into
base: main
Choose a base branch
from
Open
Changes from 16 commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
2e99b5b
Add repair and restart proposal.
wen-coding Apr 10, 2023
03277f1
Update proposals/0024-repair-and-restart.md
wen-coding Apr 12, 2023
7b71cad
Update proposals/0024-repair-and-restart.md
wen-coding Apr 12, 2023
996d1ab
Update proposals/0024-repair-and-restart.md
wen-coding Apr 12, 2023
de72626
Add protocol overview and lint changes.
wen-coding Apr 12, 2023
8f32e6c
Merge branch 'smart-restart-proposal' of github.com:wen-coding/solana…
wen-coding Apr 12, 2023
4feeb64
Change threshold value from 47% to 34%.
wen-coding Apr 12, 2023
0aff4cd
Add introduction, and update default slots to send.
wen-coding Apr 15, 2023
e29d83c
Remove snapshot generation from the new restart protocol and lint cha…
wen-coding Apr 17, 2023
b0b2d47
Change must have block threshold.
wen-coding Apr 18, 2023
838429d
Update the proposal to reflect changes in discussion.
wen-coding Apr 19, 2023
1049463
Add the wait before restart.
wen-coding Apr 19, 2023
6e4a5cd
Change Heaviest selection algorithm.
wen-coding Apr 20, 2023
8cb6ef6
Make linter happy.
wen-coding Apr 26, 2023
df5932d
Shorten title to make linter happy.
wen-coding Apr 26, 2023
5050a7c
Add details of messages and change command line.
wen-coding Apr 26, 2023
90134b5
Fix typos on numbers.
wen-coding Apr 27, 2023
85f62b4
Update proposals/0024-repair-and-restart.md
wen-coding May 1, 2023
eafd745
Make linter happy.
wen-coding May 1, 2023
ecccadf
All messages need to keep flowing before restart.
wen-coding May 2, 2023
e143136
A snapshot should be generated first in a restart.
wen-coding May 4, 2023
57b3b16
Use Gossip instead of direct messaging in restart.
wen-coding May 9, 2023
4b99230
Require 80% of the people receive 80% of Heaviest.
wen-coding May 10, 2023
198e742
Add security check and some other changes.
wen-coding May 11, 2023
7bd9b74
Update proposals/0024-repair-and-restart.md
wen-coding May 12, 2023
a44eeff
Update proposals/0024-repair-and-restart.md
wen-coding May 12, 2023
6147af1
Update proposals/0024-repair-and-restart.md
wen-coding May 12, 2023
bffcd1d
Update proposals/0024-repair-and-restart.md
wen-coding May 12, 2023
ebc0cec
Update proposals/0024-repair-and-restart.md
wen-coding May 12, 2023
dc9209f
Update proposals/0024-repair-and-restart.md
wen-coding May 12, 2023
eefa087
Update proposals/0024-repair-and-restart.md
wen-coding May 12, 2023
4145325
Update proposals/0024-repair-and-restart.md
wen-coding May 12, 2023
6aeda83
Update proposals/0024-repair-and-restart.md
wen-coding May 12, 2023
78c0e5b
Update proposals/0024-repair-and-restart.md
wen-coding May 12, 2023
a938546
Add some terminologies.
wen-coding May 12, 2023
63d3252
Merge branch 'smart-restart-proposal' of github.com:wen-coding/solana…
wen-coding May 12, 2023
ebd1935
Rewording a few paragraphs to make things clear.
wen-coding May 15, 2023
deee8ec
Fix a few small sentences.
wen-coding May 15, 2023
9f013a0
Remove .bak file.
wen-coding May 15, 2023
5420a17
Update proposals/0024-repair-and-restart.md
wen-coding May 16, 2023
323ee80
Update proposals/0024-repair-and-restart.md
wen-coding May 16, 2023
3b3ef2d
Update proposals/0024-repair-and-restart.md
wen-coding May 16, 2023
87813b8
Fix a few wordings.
wen-coding May 16, 2023
5b69c78
This proposal is actually proposal 46.
wen-coding May 16, 2023
fac8526
Make linter happy.
wen-coding May 16, 2023
351e675
Fixes.
wen-coding May 18, 2023
b130ee3
Add description of when to enter next step.
wen-coding May 19, 2023
3234699
Make linter happy.
wen-coding May 19, 2023
76f63bb
Make linter happy.
wen-coding Jun 6, 2023
18b3d87
Update proposals/0046-optimistic-cluster-restart-automation.md
wen-coding Jul 17, 2023
813c2cf
Try indent some paragraphs.
wen-coding Jul 18, 2023
2c21911
Merge branch 'smart-restart-proposal' of github.com:wen-coding/solana…
wen-coding Jul 18, 2023
3fd02f1
Backtick all new terminologies.
wen-coding Jul 18, 2023
a9447b4
Make linter happy.
wen-coding Jul 18, 2023
e913703
Update proposals/0046-optimistic-cluster-restart-automation.md
wen-coding Jul 18, 2023
eb359ac
Remove unnecessary paragraph.
wen-coding Jul 18, 2023
82fcd22
Merge branch 'smart-restart-proposal' of github.com:wen-coding/solana…
wen-coding Jul 18, 2023
192b01c
Update proposals/0046-optimistic-cluster-restart-automation.md
wen-coding Jul 18, 2023
c4d3e3e
Update proposals/0046-optimistic-cluster-restart-automation.md
wen-coding Jul 18, 2023
8a9990d
Change percent from u8 to u16.
wen-coding Jul 18, 2023
3167a08
Merge branch 'smart-restart-proposal' of github.com:wen-coding/solana…
wen-coding Jul 18, 2023
21878c8
Make linter happy.
wen-coding Jul 18, 2023
879e92d
Remove command line reference.
wen-coding Jul 18, 2023
5b58b8a
Revise the threshold for block repair.
wen-coding Jul 19, 2023
d817520
Make linter happy again.
wen-coding Jul 19, 2023
fdc7534
Remove 80% reference when we mean RESTART_STAKE_THRESHOLD.
wen-coding Jul 19, 2023
6b2a0b2
Rename HeaviestFork to RestartHeaviestFork.
wen-coding Jul 19, 2023
6fcc5cf
Rename LastVotedForkSlots to RestartLastVotedForkSlots.
wen-coding Jul 19, 2023
7614587
Change format of examples.
wen-coding Jul 19, 2023
ba1c9d4
Change format of the bullet list.
wen-coding Jul 19, 2023
2dffa19
Change reasoning of 81000 slots.
wen-coding Jul 19, 2023
5635ad3
Replace silent repair with new name "wen restart".
wen-coding Jul 20, 2023
7adb22b
Try to make linter happy.
wen-coding Jul 20, 2023
16e4ec8
Make linter happy again.
wen-coding Jul 20, 2023
3fa3b9a
Back to the title linter likes.
wen-coding Jul 20, 2023
b6fc273
Add cluster restart slot to the doc.
wen-coding Jul 20, 2023
005caae
Small fixes.
wen-coding Jul 21, 2023
5fcbcd1
Add handling for oscillating info.
wen-coding Jul 24, 2023
8f7f752
Make linter happy.
wen-coding Jul 24, 2023
50d5bcb
Add epoch boundary handling.
wen-coding Jul 26, 2023
397e98b
Add cluster wide threshold calculation across Epoch boundary.
wen-coding Jul 26, 2023
6190f35
Update cross epoch stake selection.
wen-coding Jul 27, 2023
e4e8d84
Correct mistake in description.
wen-coding Jul 27, 2023
51e81d9
Make it clear we are generating incremental snapshot.
wen-coding Aug 1, 2023
ac0940f
Fix typo
wen-coding Aug 2, 2023
3805d7a
Add more reasoning about how HeaviestFork is picked.
wen-coding Aug 4, 2023
0466a12
Make linter happy.
wen-coding Aug 4, 2023
6613293
Change indent.
wen-coding Aug 9, 2023
dd60570
Make linter happy.
wen-coding Aug 9, 2023
b415733
Rework the proof.
wen-coding Aug 9, 2023
acb041f
Update proposals/0046-optimistic-cluster-restart-automation.md
wen-coding Aug 14, 2023
d85ce34
Explain 81000 slots and issue hard fork before snapshot generation.
wen-coding Aug 14, 2023
07cbb0c
Merge branch 'smart-restart-proposal' of github.com:wen-coding/solana…
wen-coding Aug 14, 2023
eb99eac
Use a hard limit for must-have blocks and accept new
wen-coding Aug 14, 2023
30a4d38
Reverse the order of bits to be consistent with EpochSlots.
wen-coding Aug 18, 2023
28373b0
Update restart descriptions.
wen-coding Sep 8, 2023
9558fcb
Update 81k to 64k.
wen-coding Nov 18, 2023
1e9ea74
Update the find heaviest algorithm and proof.
wen-coding Mar 12, 2024
4ceebbb
Update the proof for heaviest fork, we don't need to check stakes.
wen-coding Mar 12, 2024
f0d933c
Update notations in proof.
wen-coding Mar 12, 2024
821456d
Explain the 42% constant.
wen-coding May 23, 2024
891d5ea
Explain 5% as well.
wen-coding May 24, 2024
613384d
Small fixes.
wen-coding May 24, 2024
75306bd
Update stake calculation when crossing Epoch boundaries.
wen-coding Aug 3, 2024
bafaac5
Merge branch 'solana-foundation:main' into smart-restart-proposal
wen-coding Aug 12, 2024
f65c6aa
Update exit criteria when crossing Epoch boundary.
wen-coding Aug 19, 2024
31c358e
Merge branch 'smart-restart-proposal' of github.com:wen-coding/solana…
wen-coding Aug 19, 2024
bf5529f
Add RestartHeaviestFork round 2.
wen-coding Sep 4, 2024
6fb1cf7
Make linter happy.
wen-coding Sep 4, 2024
9baa635
Use round 0 and round 1 instead of round 1 and 2.
wen-coding Sep 4, 2024
4f5469c
Replace previous HeaviestFork stage with a leader based design.
wen-coding Sep 12, 2024
22dfc57
Update the abstract as well.
wen-coding Sep 12, 2024
560dd4d
Update wording.
wen-coding Sep 12, 2024
683a43a
Update company info.
wen-coding Sep 12, 2024
a722bc6
Update the exit condition of step 2.
wen-coding Sep 12, 2024
4e531bb
Clarify step 4.
wen-coding Sep 12, 2024
4ac10f2
Fix typo.
wen-coding Sep 12, 2024
cfbcb5b
Rename the leader to coordinator. Add the final HeaviestFork aggregat…
wen-coding Sep 21, 2024
eb81566
Fix the correctness proof.
wen-coding Oct 5, 2024
a9ac86c
Fix the correctness proof.
wen-coding Oct 5, 2024
b8185eb
Clarify that we pick the slot first then replay to get hash.
wen-coding Oct 22, 2024
fac38b6
Change status to Review
wen-coding Oct 22, 2024
7c9d098
Some small fixes.
wen-coding Nov 2, 2024
79b3be7
Fix typo.
wen-coding Nov 8, 2024
ab33197
Add proof for the 33% limit.
wen-coding Nov 14, 2024
331fe01
Make linter happy.
wen-coding Nov 15, 2024
d22ba4a
Make linter happy.
wen-coding Nov 15, 2024
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
185 changes: 185 additions & 0 deletions proposals/0024-repair-and-restart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
---
simd: '0024'
title: Repair and start in a cluster restart
wen-coding marked this conversation as resolved.
Show resolved Hide resolved
authors:
- Wen Xu (Solana Labs)
category: Standard
type: Core
status: Draft
created: 2023-04-07
feature: (fill in with feature tracking issues once accepted)
---

## Summary

Improve the current [cluster restart](https://docs.solana.com/running-validator/restart-cluster)
procedure such that validators can automatically figure out confirmed slots
wen-coding marked this conversation as resolved.
Show resolved Hide resolved
and then proceed to restart if everything looks fine.

## Motivation
wen-coding marked this conversation as resolved.
Show resolved Hide resolved

Currently during a cluster restart, validator operators need to decide latest
optimistically confirmed slot, then restart the validators with new commandline
arguments.

The current process involves a lot of human intervention, if people make a
mistake in deciding the highest optimistically confirmed slot, it could mean
rollback of user transactions after those transactions have been confirmed,
which is not acceptable.
mvines marked this conversation as resolved.
Show resolved Hide resolved

We aim to automate the finding of highest optimistically confirmed slot and
wen-coding marked this conversation as resolved.
Show resolved Hide resolved
block data distribution, so that we can lower the possibility of human mistakes
in the cluster restart process.

## Alternatives Considered

See [Handling Common Solana Outages](https://docs.google.com/document/d/1RkNAyz-5aKvv5FF44b8SoKifChKB705y5SdcEoqMPIc)
mvines marked this conversation as resolved.
Show resolved Hide resolved
for details.

There are many proposals about automatically detecting that the cluster is
in an outage so validators should enter a recovery process automatically.

While getting human out of the loop greatly improves recovery speed,
automaticlly restarting the whole cluster still seems risky. Because if
the recovery process itself doesn't work, it might be some time before
we can get human's attention. And it doesn't solve the cases where new binary
is needed. So for now we still plan to have human in the loop.

## Detailed Design

The new protocol tries to make all 80% restarting validators get the same
Copy link
Contributor

Choose a reason for hiding this comment

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

80% is an implementation detail. it would be better presented as a variable with numerical value declared once, in case there is discussion to be had about the chosen value. this is an issue throughout the document

Copy link
Author

Choose a reason for hiding this comment

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

That's fair, I added RESTART_STAKE_THRESHOLD in the terminologies section.

Copy link
Contributor

Choose a reason for hiding this comment

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

are the static "80%" strings throughout some other variable or do they just need to be replaced still?

Copy link
Author

Choose a reason for hiding this comment

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

Good point, I changed what should be changed, the rest are concrete numbers in examples.

data blocks and the same set of last votes among them, then they can probably
wen-coding marked this conversation as resolved.
Show resolved Hide resolved
make the same decision and then proceed.
mvines marked this conversation as resolved.
Show resolved Hide resolved

The steps roughly look like this:

1. Everyone freezes, no new blocks, no new votes, and no Turbine
wen-coding marked this conversation as resolved.
Show resolved Hide resolved
mvines marked this conversation as resolved.
Show resolved Hide resolved
wen-coding marked this conversation as resolved.
Show resolved Hide resolved

2. Make all blocks which can potentially have been optimistically confirmed
before the freeze propagate to everyone

3. Make restart participants' last votes before the freeze propagate to
wen-coding marked this conversation as resolved.
Show resolved Hide resolved
everyone

4. Now see if enough people can optimistically agree on one block (same slot
wen-coding marked this conversation as resolved.
Show resolved Hide resolved
and hash) to restart from

4.1 If yes, proceed and restart

4.2 If no, freeze and print out what you think is wrong, wait for human
wen-coding marked this conversation as resolved.
Show resolved Hide resolved
mvines marked this conversation as resolved.
Show resolved Hide resolved

A new command line arg --RepairAndRestart is added. When the cluster is in need
of a restart, we assume at least 80% will restart with this arg. Any validators
restarted with this arg does not participate in the normal Turbine protocol,
update its vote, or generate new blocks until all of the following steps are
completed.
wen-coding marked this conversation as resolved.
Show resolved Hide resolved

### Gossip last vote before the restart and ancestors on that fork

Send direct message LastVotedForkSlots to everyone, it contains the last voted
slot on its tower and the ancestor slots on the last voted fork and is sent in
a compressed bitmap like the EpicSlots data structure. The number of ancestor
slots sent is hard coded at 81000, because that's 400ms * 8100 = 9 hours, we
assume most restart decisions to be made in 9 hours. If a validator restarts
after 9 hours past the outage, it cannot join the restart this way. If enough
validators failed to restart within 9 hours, then use the old restart method.

The fields of LastVotedForkSlots are:

- `last_voted_slot`: the slot last voted, this also serves as last_slot for the
mvines marked this conversation as resolved.
Show resolved Hide resolved
wen-coding marked this conversation as resolved.
Show resolved Hide resolved
bit vector.
- `last_voted_hash`: the bank hash of the slot last voted slot.
- `slots`: compressed bit vector representing the slots on the last voted fork,
last slot is always last_voted_slot, first slot is last_voted_slot-8100.
mvines marked this conversation as resolved.
Show resolved Hide resolved

### Aggregate, repair, and replay the slots in LastVotedForkSlots
mvines marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

this heading makes me think the section should be a numbered list with a more general heading along the lines "repair ledgers up to the restart slot"

Copy link
Author

Choose a reason for hiding this comment

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

Changed

Copy link
Contributor

Choose a reason for hiding this comment

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

bah! looks like md formatting isn't helping us much here. just renders as a giant wall of text. gonna have to switch to manual mode i think...

something like this will be a little easier on the eyes

### Silent repair mode
1. **Repair ledger up to restart slot**
   some text

   another paragraph
   1. nested numbered list
      
      with a second paragraph
   1.

   continuing the outer numbered list
   * also unordered lists

     with multiple paragraphs

   * another item

   retvrn 
1. **Gossip current heaviest fork**
   ...

Copy link
Author

Choose a reason for hiding this comment

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

Changed.


Aggregate the slots in received LastVotedForkSlots messages, whenever some slot
has enough stake to be optimistically confirmed and it's missing locally, start
the repair process for this slot.

We calculate "enough" stake as follows. When there are 80% validators joining
the restart, assuming 5% restarted validators can make mistakes in voting, any
block with more than 67% - 5% - (100-80)% = 42% could potentially be

Choose a reason for hiding this comment

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

I don't understand this calculation.
What if the other 100% - 42% = 58% pick some other block?
Why should the minority 42% block be optimistically confirmed?

Why should ever a block with less than 67% vote be optimistically confirmed?

Copy link
Author

Choose a reason for hiding this comment

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

The goal here is to prevent false negative (if a slot was oc'ed before the restart, you must pick it here), not to prevent false positive (it's okay if we pick a slot here which isn't oc'ed). Because when we select Heaviest later we should see the competing fork and count the votes accordingly.

Copy link
Contributor

Choose a reason for hiding this comment

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

prolly add the motivation and justification for these values to the document

Copy link
Author

Choose a reason for hiding this comment

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

Added.

optimistically confirmed before the restart. If there are 85% validators in the
restart, then any block with more than 67% - 5% - (100-85)% = 47% could be
optimistically confirmed before the restart.
wen-coding marked this conversation as resolved.
Show resolved Hide resolved

### Gossip current heaviest fork
wen-coding marked this conversation as resolved.
Show resolved Hide resolved

After receiving LastVotedForkSlots from 80% of the validators and reparing
wen-coding marked this conversation as resolved.
Show resolved Hide resolved
slots with "enough" stake, replay all blocks and pick the heaviest fork as
follows:

1. Pick block and update root for all blocks with more than 67% votes

2. If a picked block has more than one children, check if the votes on the
heaviest child is over threshold:

2.1 If vote_on_child + stake_on_validators_not_in_restart >= 62%, pick child.
For example, if 80% validators are in restart, child has 42% votes, then
42 + (100-80) = 62%, pick child. 62% is chosen instead of 67% because 5%
could make the wrong votes.

Choose a reason for hiding this comment

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

similarly here, I am not sure why it is safe to go below 67%?!

Copy link
Author

Choose a reason for hiding this comment

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

The goal here is to prevent false negative at all costs and it's okay to have false positive. Let's say X is the first block having only 62% but not 67%, we know if 75% of the validators decide to pick this fork, it will be instantly oc'ed and we won't kick another oc'ed slot out. Does that make sense?

Copy link
Contributor

Choose a reason for hiding this comment

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

similarly, add the motivation and justification in the doc

Copy link
Author

Choose a reason for hiding this comment

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

Added.


2.2 Otherwise stop traversing the tree and use last picked block.

After deciding heaviest block, Gossip
wen-coding marked this conversation as resolved.
Show resolved Hide resolved
Heaviest(X, Hash(X), received_heaviest_stake) out, where X is the latest picked
Copy link
Contributor

Choose a reason for hiding this comment

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

let's give this message a more descriptive name.

all of these messages should probably have a common prefix as well.

so maybe something like ClusterRestartHeaviestCandidateFork?

Copy link
Author

Choose a reason for hiding this comment

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

That seems really long, and I'm wondering whether we can later use these messages outside restart. For now I'm just renaming Heaviest to HeaviestFork

Copy link
Contributor

Choose a reason for hiding this comment

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

imo this needs to have cluster-restart context in the name. remember the gossip is general and used for much more than this special purpose

Copy link
Author

Choose a reason for hiding this comment

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

Renamed to RestartHeaviestFork.

block. We also send out stake of received Heaviest messages so that we can
proceed to next step when enough validators are ready.

The fields of the Heaviest message is:

- `slot`: slot of the picked block.
- `hash`: bank hash of the picked block.
- `received`: total of stakes of the validators it received Heaviest messages
from.

### Proceed to restart if everything looks okay, halt otherwise

If things go well, all 80% of the validators should find the same heaviest
fork. But we are only sending slots instead of bank hashes in
LastVotedForkSlots, so it's possible that a duplicate block can make the
cluster unable to reach consensus. If at least 2/3 of the people agree on one
wen-coding marked this conversation as resolved.
Show resolved Hide resolved
slot, they should proceed to restart from this slot. Otherwise validators
should halt and send alerts for human attention.
mvines marked this conversation as resolved.
Show resolved Hide resolved

Also, there might be 5% of the validators not sending Heaviest, so we only
require that 75% of the people received 75% of the Heaviest messages and they
all agree on one block and hash.

So after a validator sees that 75% of the validators received 75% of the votes,
wait for 10 more minutes so that the message it sent out have propagated, then
Copy link
Contributor

Choose a reason for hiding this comment

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

i don't see what this ten minute wait is gaining us? if there is sufficient gossip message propagation delay as to destabilize the restart, we're just going to have the same instability, only ten minutes later.

assuming the intention is to elide any gossip propagation delay, perhaps it would be more effective to synchronize on wall time by breaking it into five minute intervals and waiting for the next full interval to expire? that way we're waiting somewhere between 9m59s and 5m00s, starting within the max skew of the restart set's system clocks.

i believe we already have some excessive wallclock skew warnings built into gossip (or elsewhere in the startup procedure?), so hopefully it's been corrected for all nodes and not actually worse than any gossip propagation delay 😅

Copy link
Author

Choose a reason for hiding this comment

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

I wanted to avoid the situation where 80saw80 isn't propagated to all validators in restart before Gossip peers all go into restart mode. Because currently CRDS_GOSSIP_PUSH_MSG_TIMEOUT_MS is 30 seconds, so after 80% received Heaviest, the message takes at most 30 seconds to propagate to everyone. I think waiting for 2 minutes should be enough.

Copy link
Contributor

Choose a reason for hiding this comment

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

my point was that using a static delay doesn't do anything to improve synchronization because the nodes will all start and end that sleep out of sync by the gossip network delay. the suggestion to delay until fixed wall clock intervals instead of a static delay will improve the situation so long as wall clock skew across the cluster is tighter than the gossip network delay.

Copy link
Author

Choose a reason for hiding this comment

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

Ah, that's good point, changed. Also the interval is 2 minutes now.

do the following:

- Issue a hard fork at the highest oc slot and change shred version in Gossip.
- Execute the current --wait-for-supermajority logic and wait for 75%.
mvines marked this conversation as resolved.
Show resolved Hide resolved
mvines marked this conversation as resolved.
Show resolved Hide resolved
mvines marked this conversation as resolved.
Show resolved Hide resolved

## Impact

This proposal adds a new RepairAndRestart mode to validators, during this phase
the validators will not participate in normal cluster activities, which is the
same as now. Compared to today's cluster restart, the new mode may mean more
network bandwidth and memory on the restarting validators, but it guarantees
the safety of optimistically confirmed user transactions, and validator admins
don't need to manually generate and download snapshots again.

## Security Considerations

The two added Gossip messages LastVotedForkSlots and Heavist will only be sent
mvines marked this conversation as resolved.
Show resolved Hide resolved
and processed when the validator is restarted in RepairAndRestart mode. So
random validator restarting in the new mode will not bring extra burden to the
system.

Non-conforming validators could send out wrong LastVotedForkSlots and Heaviest
messages to mess with cluster restarts, these should be included in the
Slashing rules in the future.

## Backwards Compatibility

This change is backward compatible with previous versions, because validators
only enter the new mode during new restart mode which is controlled by a
command line argument. All current restart arguments like
--wait-for-supermajority and --expected-bank-hash will be kept as is for now.
However, this change does not work until at least 80% installed the new binary
and they are willing to use the new methods for restart.
mvines marked this conversation as resolved.
Show resolved Hide resolved