Skip to content

Incentives: Heartbeat to keep an unlucky node online#5799

Closed
jannotti wants to merge 9 commits intoalgorand:masterfrom
jannotti:heartbeat
Closed

Incentives: Heartbeat to keep an unlucky node online#5799
jannotti wants to merge 9 commits intoalgorand:masterfrom
jannotti:heartbeat

Conversation

@jannotti
Copy link
Copy Markdown
Contributor

This build on top of #5757 . In that PR, it became possible for the network to "suspend" accounts that have not proposed a block in a "long" time (with respect to how often they should have proposed). The assumption is that these accounts have crashed or decided to stop running their node without issuing a keyreg transaction to officially go offline.

However, they might have just been unlucky. This PR introduces a new opcode heartbeat which allows a node to show it is still operating and avoid suspension. The opcode requires a message signed by the participation key of the node that wants to show it is working. Using the partkey allows the node operator to issue the heartbeat without using the spending key (which may be in cold storage, or require using a ledger, etc).

There's a lot left to do in this PR. The main thing is to get algod to issue these heartbeats automatically if the node notices that it has been unlucky and could be suspended soon.

Also changes to use IsEmpty() as much as possible
First cut at computing the expected interval. Uses 10x the expected
interval, but calculating the interval is currently wonky.  Uses the
last round's total online stake, but this round's acct stake.  Also
ignores rewards.
If, by chance, a node does not propose for a long time, they can issue
a transaction to explicitly indicate that they are still online, so
they won't be suspended. They must sign a block seed of recent block
using their particpation key and execute the `heartbeat` opcode on it.
@jannotti jannotti self-assigned this Oct 24, 2023
@jannotti jannotti changed the title Heartbeat Incentives: Heartbeat to keep an unlucky node online Oct 24, 2023
@jannotti jannotti closed this Sep 4, 2024
@jannotti jannotti deleted the heartbeat branch September 4, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant