libp2p
    Preparing search index...

    Interface TopicScoreParams

    interface TopicScoreParams {
        firstMessageDeliveriesCap: number;
        firstMessageDeliveriesDecay: number;
        firstMessageDeliveriesWeight: number;
        invalidMessageDeliveriesDecay: number;
        invalidMessageDeliveriesWeight: number;
        meshFailurePenaltyDecay: number;
        meshFailurePenaltyWeight: number;
        meshMessageDeliveriesActivation: number;
        meshMessageDeliveriesCap: number;
        meshMessageDeliveriesDecay: number;
        meshMessageDeliveriesThreshold: number;
        meshMessageDeliveriesWeight: number;
        meshMessageDeliveriesWindow: number;
        timeInMeshCap: number;
        timeInMeshQuantum: number;
        timeInMeshWeight: number;
        topicWeight: number;
    }
    Index

    Properties

    firstMessageDeliveriesCap: number
    firstMessageDeliveriesDecay: number
    firstMessageDeliveriesWeight: number

    P2: first message deliveries This is the number of message deliveries in the topic. The value of the parameter is a counter, decaying with FirstMessageDeliveriesDecay, and capped by FirstMessageDeliveriesCap. The weight of the parameter MUST be positive (or zero to disable).

    invalidMessageDeliveriesDecay: number
    invalidMessageDeliveriesWeight: number

    P4: invalid messages This is the number of invalid messages in the topic. The value of the parameter is the square of the counter, decaying with InvalidMessageDeliveriesDecay. The weight of the parameter MUST be negative (or zero to disable).

    meshFailurePenaltyDecay: number
    meshFailurePenaltyWeight: number

    P3b: sticky mesh propagation failures This is a sticky penalty that applies when a peer gets pruned from the mesh with an active mesh message delivery penalty. The weight of the parameter MUST be negative (or zero to disable)

    meshMessageDeliveriesActivation: number
    meshMessageDeliveriesCap: number
    meshMessageDeliveriesDecay: number
    meshMessageDeliveriesThreshold: number
    meshMessageDeliveriesWeight: number

    P3: mesh message deliveries This is the number of message deliveries in the mesh, within the MeshMessageDeliveriesWindow of message validation; deliveries during validation also count and are retroactively applied when validation succeeds. This window accounts for the minimum time before a hostile mesh peer trying to game the score could replay back a valid message we just sent them. It effectively tracks first and near-first deliveries, ie a message seen from a mesh peer before we have forwarded it to them. The parameter has an associated counter, decaying with MeshMessageDeliveriesDecay. If the counter exceeds the threshold, its value is 0. If the counter is below the MeshMessageDeliveriesThreshold, the value is the square of the deficit, ie (MessageDeliveriesThreshold - counter)^2 The penalty is only activated after MeshMessageDeliveriesActivation time in the mesh. The weight of the parameter MUST be negative (or zero to disable).

    meshMessageDeliveriesWindow: number
    timeInMeshCap: number
    timeInMeshQuantum: number
    timeInMeshWeight: number

    P1: time in the mesh This is the time the peer has ben grafted in the mesh. The value of the parameter is the time/TimeInMeshQuantum, capped by TimeInMeshCap The weight of the parameter MUST be positive (or zero to disable).

    topicWeight: number

    The weight of the topic.