ethereum / ethereumj

DEPRECATED! Java implementation of the Ethereum yellowpaper. For JSON-RPC and other client features check Ethereum Harmony
GNU Lesser General Public License v3.0
2.18k stars 1.1k forks source link

Propose blocks with attestations #1192

Closed mkalinin closed 5 years ago

mkalinin commented 5 years ago

Abstract

Feature blocks created by BeaconProposer with attestations.

Requirements

AttestationRecord is defined by the spec. There should be a pool with pending attestations that holds distinct attestation records that are coming from attesters. The pool is updated either on newly came attestation record or on newly imported block, attestations that came within the block must be evicted from the pool. There should be a background task that constantly aggregates attestations with same chain segment.

Attestation aggregation consists of setting bits in a bitfield and aggregated signature calculation. Note, only attestations that refer to same chain segment can be aggregated. When pending attestation pool is updated, previous attestation aggregation task should be cancelled and superseded with a new one unless it's locked by proposer. Proposer locks the most recent aggregation task, waits until it's finished and then includes produced attestation records into a block it is working on.

zilm13 commented 5 years ago

resolved with #1219