Skip to content

Commit

Permalink
Merge branch 'master' into fix/tag-peers-on-graft
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain committed Aug 29, 2023
2 parents aa07178 + a2981f9 commit 41414c5
Show file tree
Hide file tree
Showing 120 changed files with 15,447 additions and 13,328 deletions.
74 changes: 74 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,80 @@
* chore: update cd action by @mpetrunic in https://github.com/ChainSafe/js-libp2p-gossipsub/pull/245


## [10.1.0](https://github.com/ChainSafe/js-libp2p-gossipsub/compare/v10.0.0...v10.1.0) (2023-08-22)


### Features

* unbundle fixed-label metrics ([bb5596d](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/bb5596dca786e59d930ed58b6dc05c80925786b2))
* unbundle fixed-label metrics ([#460](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/460)) ([bb5596d](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/bb5596dca786e59d930ed58b6dc05c80925786b2))


### Bug Fixes

* export supporting metrics types ([#462](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/462)) ([09296bd](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/09296bd915839b6bbbffcf7ea31be64ba3f4bc20))
* revise onPrevalidationResult metrics ([#464](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/464)) ([e51f248](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/e51f248b621b600b34741b452601a5a80a3b5ebd))

## [10.0.0](https://github.com/ChainSafe/js-libp2p-gossipsub/compare/v9.1.0...v10.0.0) (2023-08-03)


### ⚠ BREAKING CHANGES

* stream close methods are now asyc, requires [email protected] or later

### Features

* close streams gracefully ([#458](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/458)) ([3153ebf](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/3153ebff847cdfa560a094e1cd6b559090a24614))
* track time to publish a message ([#451](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/451)) ([83b8e61](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/83b8e61e700f45743940e33b8ca2c28c1e18a1d5))


### Bug Fixes

* track publish time in second ([#457](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/457)) ([7c3fc8d](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/7c3fc8d2aa47070434a87d576c10d5aaeb047277))

## [9.1.0](https://github.com/ChainSafe/js-libp2p-gossipsub/compare/v9.0.0...v9.1.0) (2023-06-29)


### Features

* add UnsubscribeBackoff param ([#447](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/447)) ([ec570ca](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/ec570cadb2ea4e327f204038c85b86ccc7555802))


### Bug Fixes

* check backoff when join ([#444](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/444)) ([fd8c61b](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/fd8c61b18d6deccb19a375c913dfe3dec9a0dfeb))
* correct metric in handlePrune() ([#440](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/440)) ([cbdae04](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/cbdae0463868673de9ae59b7a357aedfeb085e0a))


### Miscellaneous

* track backoff time for connected peers ([#445](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/445)) ([8646b4d](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/8646b4d3c1255474cb86478eca4279dd18f11580))

## [9.0.0](https://github.com/ChainSafe/js-libp2p-gossipsub/compare/v8.0.1...v9.0.0) (2023-06-20)


### ⚠ BREAKING CHANGES

* reportMessageValidationResult to accept peer id string ([#432](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/432))

### Features

* track async validation delay from first seen ([#435](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/435)) ([e2505d6](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/e2505d668ac9b34e8889562d975ed71ec1866b33))


### Bug Fixes

* reportMessageValidationResult to accept peer id string ([a963680](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/a963680fd9fb1da55e28e15c8e5469b9fe7dfbfa))
* reportMessageValidationResult to accept peer id string ([#432](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/432)) ([a963680](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/a963680fd9fb1da55e28e15c8e5469b9fe7dfbfa))

## [8.0.1](https://github.com/ChainSafe/js-libp2p-gossipsub/compare/v8.0.0...v8.0.1) (2023-06-15)


### Bug Fixes

* unbundle 2-label metrics ([#433](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/433)) ([1e33bb2](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/1e33bb279d28126d369eb0aea7978dca79a48f4b))
* unhandle protocol on stop ([#438](https://github.com/ChainSafe/js-libp2p-gossipsub/issues/438)) ([549641b](https://github.com/ChainSafe/js-libp2p-gossipsub/commit/549641bf4a728709119509252a6a19ff0cd42b8c))

## [8.0.0](https://github.com/ChainSafe/js-libp2p-gossipsub/compare/v7.0.0...v8.0.0) (2023-05-16)


Expand Down
57 changes: 39 additions & 18 deletions dist/index.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions dist/src/constants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ export declare const GossipsubPrunePeers = 16;
* before attempting to re-graft.
*/
export declare const GossipsubPruneBackoff: number;
/**
* Backoff to use when unsuscribing from a topic. Should not resubscribe to this topic before it expired.
*/
export declare const GossipsubUnsubscribeBackoff: number;
/**
* GossipsubPruneBackoffTicks is the number of heartbeat ticks for attempting to prune expired
* backoff timers.
Expand Down Expand Up @@ -196,4 +200,6 @@ export declare const ACCEPT_FROM_WHITELIST_DURATION_MS = 1000;
* The default MeshMessageDeliveriesWindow to be used in metrics.
*/
export declare const DEFAULT_METRIC_MESH_MESSAGE_DELIVERIES_WINDOWS = 1000;
/** Wait for 1 more heartbeats before clearing a backoff */
export declare const BACKOFF_SLACK = 1;
//# sourceMappingURL=constants.d.ts.map
2 changes: 1 addition & 1 deletion dist/src/constants.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions dist/src/constants.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/constants.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 16 additions & 14 deletions dist/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import { Logger } from '@libp2p/logger';
import type { PeerId } from '@libp2p/interface-peer-id';
import { EventEmitter } from '@libp2p/interfaces/events';
import { type Logger } from '@libp2p/logger';
import type { PeerId } from '@libp2p/interface/peer-id';
import { EventEmitter } from '@libp2p/interface/events';
import { MessageCache } from './message-cache.js';
import { RPC, IRPC } from './message/rpc.js';
import { PeerScore, PeerScoreParams, PeerScoreThresholds, PeerScoreStatsDump } from './score/index.js';
import { RPC, type IRPC } from './message/rpc.js';
import { PeerScore, type PeerScoreParams, type PeerScoreThresholds, type PeerScoreStatsDump } from './score/index.js';
import { IWantTracer } from './tracer.js';
import { MetricsRegister, TopicStrToLabel } from './metrics.js';
import { MsgIdFn, TopicStr, MsgIdStr, PeerIdStr, FastMsgIdFn, AddrInfo, DataTransform, MsgIdToStrFn, PublishOpts } from './types.js';
import { type MetricsRegister, type TopicStrToLabel } from './metrics.js';
import { type MsgIdFn, type TopicStr, type MsgIdStr, type PeerIdStr, type FastMsgIdFn, type AddrInfo, type DataTransform, type MsgIdToStrFn, type PublishOpts } from './types.js';
import type { GossipsubOptsSpec } from './config.js';
import { Message, PublishResult, PubSub, PubSubEvents, PubSubInit, StrictNoSign, StrictSign, TopicValidatorFn, TopicValidatorResult } from '@libp2p/interface-pubsub';
import type { Registrar } from '@libp2p/interface-registrar';
import type { Message, PublishResult, PubSub, PubSubEvents, PubSubInit, TopicValidatorFn } from '@libp2p/interface/pubsub';
import { StrictSign, StrictNoSign, TopicValidatorResult } from '@libp2p/interface/pubsub';
import type { Registrar } from '@libp2p/interface-internal/registrar';
import { InboundStream, OutboundStream } from './stream.js';
import { DecodeRPCLimits } from './message/decodeRpc.js';
import { ConnectionManager } from '@libp2p/interface-connection-manager';
import { PeerStore } from '@libp2p/interface-peer-store';
import { type DecodeRPCLimits } from './message/decodeRpc.js';
import type { ConnectionManager } from '@libp2p/interface-internal/connection-manager';
import type { PeerStore } from '@libp2p/interface/peer-store';
export declare const multicodec: string;
export interface GossipsubOpts extends GossipsubOptsSpec, PubSubInit {
/** if dial should fallback to floodsub */
Expand Down Expand Up @@ -55,6 +56,7 @@ export interface GossipsubOpts extends GossipsubOptsSpec, PubSubInit {
/** override constants for fine tuning */
prunePeers?: number;
pruneBackoff?: number;
unsubcribeBackoff?: number;
graftFloodThreshold?: number;
opportunisticGraftPeers?: number;
opportunisticGraftTicks?: number;
Expand Down Expand Up @@ -350,7 +352,7 @@ export declare class GossipSub extends EventEmitter<GossipsubEvents> implements
*
* @param id
* @param topic
* @param interval - backoff duration in milliseconds
* @param intervalMs - backoff duration in milliseconds
*/
private doAddBackoff;
/**
Expand Down Expand Up @@ -425,7 +427,7 @@ export declare class GossipSub extends EventEmitter<GossipsubEvents> implements
*
* This should only be called once per message.
*/
reportMessageValidationResult(msgId: MsgIdStr, propagationSource: PeerId, acceptance: TopicValidatorResult): void;
reportMessageValidationResult(msgId: MsgIdStr, propagationSource: PeerIdStr, acceptance: TopicValidatorResult): void;
/**
* Sends a GRAFT message to a peer
*/
Expand Down
Loading

0 comments on commit 41414c5

Please sign in to comment.