Comparing version 0.1.0 to 0.1.2
{ | ||
"name": "plumtree", | ||
"version": "0.1.0", | ||
"version": "0.1.2", | ||
"description": "A javascript implementation of plumtree", | ||
"author": "Antoine Toulme", | ||
"license": "MIT", | ||
"license": "Apache-2.0", | ||
"bugs": { | ||
"url": "https://github.com/atoulme/plumtree/issues" | ||
"url": "https://github.com/tmio/plumtree/issues" | ||
}, | ||
"homepage": "https://github.com/atoulme/plumtree#readme", | ||
"homepage": "https://github.com/tmio/plumtree#readme", | ||
"main": "src/state.ts", | ||
@@ -24,3 +24,3 @@ "scripts": { | ||
"type": "git", | ||
"url": "git+https://github.com:atoulme/plumtree.git" | ||
"url": "git+https://github.com:tmio/plumtree.git" | ||
}, | ||
@@ -32,4 +32,4 @@ "keywords": [ | ||
"dependencies": { | ||
"buffer": "^5.2.1", | ||
"@types/lru-cache": "^5.1.0" | ||
"@types/lru-cache": "^5.1.0", | ||
"buffer": "^5.2.1" | ||
}, | ||
@@ -46,2 +46,3 @@ "devDependencies": { | ||
"@babel/runtime": "^7.0.0-beta.55", | ||
"@polkadot/ts": "^0.1.56", | ||
"@types/chai": "^4.1.7", | ||
@@ -54,3 +55,2 @@ "@types/chai-as-promised": "^7.1.0", | ||
"@typescript-eslint/parser": "^1.3.0", | ||
"@polkadot/ts": "^0.1.56", | ||
"chai": "^4.2.0", | ||
@@ -57,0 +57,0 @@ "chai-as-promised": "^7.1.1", |
@@ -6,6 +6,40 @@ # Plumtree - Push-Lazy-pUsh Multicast TREE, an implementation of Epidemic Broadcast Tree, in Typescript | ||
```typescript | ||
TODO | ||
``` | ||
This project is a library you can embed into any application to provide gossiping capabilities using the [Plumtree](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.190.3504&rep=rep1&type=pdf) paper algorithm. | ||
## [`Peer`](src/peer.ts) | ||
The API defines the notion of a peer as a simple interface. | ||
You can define your own peer attached to a network resource or an identifier. | ||
## [`PeerRepository`](src/peerRepository.ts) | ||
Defines a peer repository that is used to store peers for the duration. The peer repository can have a persistence or clustering strategy - that's out of scope of the library. | ||
The library helpfully defines an `EphemeralPeerRepository`, which keeps peers in memory. | ||
## [`messageHashingFunction`](src/state.ts#29) | ||
The message hashing function used to uniquely determine a hash for a message. | ||
The message hash is used to send attestations to other peers using the IHAVE messages. | ||
## [`messageSender`](src/state.ts#30) | ||
The function to send messages. This is the interface to the network. | ||
## [`messageValidator`](src/state.ts#31) | ||
The function validating messages when receiving them before sending them to other peers. This is optional. By default no validation takes place. | ||
## [`graftDelay`](src/state.ts#32) | ||
The amount of time in milliseconds before a GRAFT message is sent to a peer. | ||
This occurs when a message attestation is received, but no full message was received. | ||
The default value is 5000. | ||
## [`lazyQueueInterval`](src/state.ts#33) | ||
The interval in milliseconds at which attestations should be lazily sent to other peers. | ||
The default value is 5000. | ||
# License | ||
@@ -12,0 +46,0 @@ |
import {Peer} from "./peer"; | ||
/** | ||
* Repository of active peers associating with a gossip tree. | ||
* Repository of active peers associated with a gossip tree. | ||
*/ | ||
@@ -6,0 +6,0 @@ export interface PeerRepository { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
43296
0
0
1
58