Merge pull request #1820 from filecoin-project/fix/sink-message-topic-deliveries
sink message topic deliveries
This commit is contained in:
commit
92d58ab191
@ -143,6 +143,13 @@ func (bv *BlockValidator) flagPeer(p peer.ID) {
|
||||
}
|
||||
|
||||
func (bv *BlockValidator) Validate(ctx context.Context, pid peer.ID, msg *pubsub.Message) pubsub.ValidationResult {
|
||||
// track validation time
|
||||
begin := time.Now()
|
||||
defer func() {
|
||||
end := time.Now()
|
||||
log.Infof("block validation time: %s", end.Sub(begin))
|
||||
}()
|
||||
|
||||
stats.Record(ctx, metrics.BlockReceived.M(1))
|
||||
|
||||
recordFailure := func(what string) {
|
||||
|
@ -127,7 +127,8 @@ func GossipSub(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host, nn dtyp
|
||||
// deliveries decay after 10min, cap at 1000 tx
|
||||
FirstMessageDeliveriesWeight: 0.5, // max value is 500
|
||||
FirstMessageDeliveriesDecay: pubsub.ScoreParameterDecay(10 * time.Minute),
|
||||
FirstMessageDeliveriesCap: 1000,
|
||||
//FirstMessageDeliveriesCap: 1000,
|
||||
FirstMessageDeliveriesCap: 1, // we can't yet properly validate them so only confer a tiny boost from delivery
|
||||
|
||||
// Mesh Delivery Failure is currently turned off for messages
|
||||
// This is on purpose as the network is still too small, which results in
|
||||
|
Loading…
Reference in New Issue
Block a user