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

Beacon attester #1191

Closed
mkalinin opened this issue Sep 26, 2018 · 1 comment
Closed

Beacon attester #1191

mkalinin opened this issue Sep 26, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@mkalinin
Copy link
Contributor

mkalinin commented Sep 26, 2018

Abstract

Implement attestation logic and attester service.

Requirements

Main source of requirements should be the spec. Attestation is a process of signing off on a segment of canonical chain.
Attestation service is a service that triggers attestation logic in a specific slot that validator is assigned to, its functionality should be pretty similar to ProposerService. There was a reasonable suggestion to use AttestationRecord for single attestation in the way it would be used for aggregated signature, with only one bit set in a bitfield and a signature that is aggregated with nothing.

AttesterService should produce an attestation after block with slot number that attester is assigned to has been imported. Attestation awaiting should be cancelled If block with that slot number does not occur in 2 * CYCLE_LENGTH slots or its slot number becomes less than number of last finalized slot.

AttesterService should start producing an attestation at Genesis.timestamp + slot * SLOT_DURATION + SLOT_DURATION / 2 where slot is a number of slot that attester is assigned to. And it should attest to the head of canonical chain, whatever block it will be.

One more thing that should be kept in mind is a way service is linked with committees, it's described in Per block processing section:

Verify that the parent.slot_number % len(get_shards_and_committees_for_slot(crystallized_state, parent.slot_number)[0].committee)'th attester in get_shards_and_committees_for_slot(crystallized_state, parent.slot_number)[0] is part of the first (ie. item 0 in the array) AttestationRecord object; this attester can be considered to be the proposer of the parent block. In general, when a block is produced, it is broadcasted at the network layer along with the attestation from its proposer.

Basically, it reads about proposer only but other validators from mentioned committee must attest in that slot.

@mkalinin mkalinin added this to the Beacon milestone Sep 26, 2018
@zilm13 zilm13 self-assigned this Sep 26, 2018
@mkalinin
Copy link
Contributor Author

Implemented in #1210

zilm13 added a commit that referenced this issue Oct 20, 2018
Sharding/beacon attester, resolves #1190, resolves #1191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants