solana-labs / solana

Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
https://solanalabs.com
Apache License 2.0
13.19k stars 4.3k forks source link

Make leaders restartable #310

Closed garious closed 5 years ago

garious commented 6 years ago

Postpone writing any entries to the log file until the election completes. Instead only broadcast them to validators. If the election decides the block is invalid, the leader has the option to simply restart.

aeyakovenko commented 6 years ago

I think we should move elections into 0.8.0, focus on validators restarting. just have one public hard coded leader.

rob-solana commented 6 years ago

by "election", do we mean "finality", or leader transfer?

aeyakovenko commented 6 years ago

leader ranking. pick a seed to rank them. we can "secure" the seed with a vdf later

rob-solana commented 6 years ago

it seems to me that leader ranking goes on all the time, and that it'd be safe to persist anything that's pre-most recent finality... @carllin and I discussed this yesterday, weren't sure how to proceed. I think restart is a bad option, given how long that takes.

aeyakovenko commented 6 years ago

You can persist the seed for more then 1 round

On Thu, Sep 6, 2018 at 12:54 PM Rob Walker notifications@github.com wrote:

it seems to me that leader ranking goes on all the time, and that it'd be safe to persist anything that's pre-most recent finality... @carllin https://github.com/carllin and I discussed this yesterday, weren't sure how to proceed. I think restart is a bad option, given how long that takes.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/solana-labs/solana/issues/310#issuecomment-419220528, or mute the thread https://github.com/notifications/unsubscribe-auth/AA-ztsWtsVgPsWMIl_mo5N6hvNGnJ3Xbks5uYX1ZgaJpZM4UZYuS .

-- —— https://solana.com https://t.me/tolyloom

garious commented 6 years ago

Interesting point Rob. So maybe this ticket should be very different. Something like: leader should periodically cache its list of live validators such that if it crashes, it can restart and query one of those validators for the new leader. The request should include the old leader's Pubkey to let the validator know it can no longer serve as leader (in case, the network hadn't figured that out yet).

garious commented 6 years ago

This ticket is unassigned a week before 0.8 release, and implementation strategy is not clear. Removing the milestone target for now.

rob-solana commented 5 years ago

this is obsolete since the forking ledger (db_ledger), which allows any number of forks to co-exist in the ledger, and allows fork-selection to be performed from a persistent store

also: leader selection is deterministic on bank state (stakes)