Logo
    šŸ”

    Filecoin block validation rules

    Creator
    Alex North
    Created
    Jan 29, 2023 10:40 PM
    Project
    Cross-chain interoperability

    This is an expression of the Filecoin block validation algorithm. I’m expressing it here in order to figure out how we might construct a light client.

    Ticket/VRF proof correct
    ?
    Not part of eligibility checks?
    Winning PoSt
    ?
    Requires sector state.
    Parent weight correctly computed
    No
    Requires state
    Rule
    Necessary for light client
    Comments
    Miner address is an ID
    Yes
    Need to extract miner ID for subsequent checks
    Epoch > parent epoch
    Yes
    Must require proper sequence
    Timestamp matches epoch
    No
    Trust full validators to check
    Message syntax, semantics, signatures etc
    No
    Requires messages
    Base fee correctly computed
    No
    Requires messages
    Parent state root from messages
    No
    Requires messages and state
    DRAND beacon correct
    Yes
    Input to election ticket
    Miner signed block (lookback)
    Yes
    Requires ID → worker key association at lookback
    Miner has min power (lookback)
    Yes
    Requires power table at lookback
    Miner wins election (lookback)
    Yes
    Requires power table at lookback
    Miner has non-zero power (parent)
    Yes
    Requires power table at parent
    Miner not in consensus fault (parent)
    Yes
    Requires miner state at parent
    Miner not in fee debt (parent)
    Yes
    Requires miner state at parent

    Verifying election proof winner

    1. Get miner and total power
    2. Obtain DRAND randomness beacon
    3. Verify VRF of (vrf.proof, beacon, public key)
    4. Verify win count computed correctly and >0 from (vrf.proof, miner ID, epoch)

    TODO:

    • Heaviest chain selection rules

    CryptoNet is a Protocol Labs initiative.