diff --git a/README.md b/README.md index abc571a..495bc20 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ Output: ### Example 1: Light sync -In this example, we will run two ethereumjs-clients. The first will be a fast sync client that +In this example, we will run two ethereumjs-clients. The first will be a full sync client that will connect to the rinkeby network and start downloading the blockchain. The second will be a light client that connects to the first client and syncs headers as they are downloaded. @@ -187,7 +187,7 @@ listener. The second client will use libp2p to connect to the first client. Run the first client and start downloading blocks: ``` -ethereumjs --syncmode fast --lightserv true --datadir first --network rinkeby --transports rlpx libp2p:multiaddrs=/ip4/127.0.0.1/tcp/50505/ws +ethereumjs --syncmode full --lightserv true --datadir first --network rinkeby --transports rlpx libp2p:multiaddrs=/ip4/127.0.0.1/tcp/50505/ws ``` Output: @@ -272,7 +272,7 @@ to help contributors better understand how the project is organized. - `/docs` Contains auto-generated API docs. - `/lib/blockchain` Contains the `Chain` class. - `/lib/net` Contains all of the network layer classes including `Peer`, `Protocol` and its subclasses, `Server` and its subclasses, and `PeerPool`. -- `/lib/service` Contains the main Ethereum services (`FastEthereumService` and `LightEthereumService`). +- `/lib/service` Contains the main Ethereum services (`FullEthereumService` and `LightEthereumService`). - `/lib/rpc` Contains the RPC server (optionally) embedded in the client. - `/lib/sync` Contains the various chain synchronizers and `Fetcher` helpers. - `/test` Contains test cases, testing helper functions, mocks and test data. @@ -297,12 +297,12 @@ to help contributors better understand how the project is organized. and `removed` events when new peers are added and removed and also emit the `message` event whenever any of the peers in the pool emit a message. Each `Service` has an associated `PeerPool` and they are used primarily by `Synchronizer`s to help with blockchain synchronization. - `Synchronizer` Subclasses of this class implements a specific blockchain synchronization strategy. They - also make use of subclasses of the `Fetcher` class that help fetch headers and bodies from pool peers. The fetchers internally make use of streams to handle things like queuing and backpressure. - `FastSynchronizer` [**In Progress**] Implements fast syncing of the blockchain - `LightSynchronizer` [**In Progress**] Implements light syncing of the blockchain + also make use of subclasses of the `Fetcher` class that help fetch headers and bodies from pool peers. The fetchers internally make use of streams to handle things like queuing and backpressure. - `FullSynchronizer` [**In Progress**] Implements full syncing of the blockchain - `LightSynchronizer` [**In Progress**] Implements light syncing of the blockchain - `Handler` Subclasses of this class implements a protocol message handler. Handlers respond to incoming requests from peers. - `EthHandler` [**In Progress**] Handles incoming ETH requests - `LesHandler` [**In Progress**] Handles incoming LES requests -- `Service` Subclasses of `Service` will implement specific functionality of a `Node`. For example, the `EthereumService` subclasses will synchronize the blockchain using the fast or light sync protocols. Each service must specify which protocols it needs and define a `start()` and `stop()` function. - - `FastEthereumService` [**In Progress**] Implementation of ethereum fast sync. +- `Service` Subclasses of `Service` will implement specific functionality of a `Node`. For example, the `EthereumService` subclasses will synchronize the blockchain using the full or light sync protocols. Each service must specify which protocols it needs and define a `start()` and `stop()` function. + - `FullEthereumService` [**In Progress**] Implementation of ethereum full sync. - `LightEthereumService` [**In Progress**] Implementation of ethereum light sync. - `WhisperService` [**Not Started**] Implementation of an ethereum whisper node. - `Node` [**In Progress**] Represents the top-level ethereum node, and is responsible for managing the lifecycle of included services. diff --git a/bin/cli.ts b/bin/cli.ts index 6a1b735..bc6ce4b 100755 --- a/bin/cli.ts +++ b/bin/cli.ts @@ -28,7 +28,7 @@ const args = require('yargs') }, syncmode: { describe: 'Blockchain sync mode', - choices: ['light', 'fast'], + choices: ['light', 'full'], default: Config.SYNCMODE_DEFAULT, }, lightserv: { diff --git a/browser/index.ts b/browser/index.ts index c1712dc..b7e1cc9 100644 --- a/browser/index.ts +++ b/browser/index.ts @@ -27,12 +27,12 @@ export * from '../lib/node' // Service export * from '../lib/service/service' -export * from '../lib/service/fastethereumservice' +export * from '../lib/service/fullethereumservice' export * from '../lib/service/lightethereumservice' // Synchronizer export * from '../lib/sync/sync' -export * from '../lib/sync/fastsync' +export * from '../lib/sync/fullsync' export * from '../lib/sync/lightsync' // Utilities @@ -47,7 +47,7 @@ export function createNode(args: any) { const options = { common: new Common({ chain: args.network ?? 'mainnet' }), servers: [new exports.Libp2pServer({ multiaddrs: [], ...args })], - syncmode: args.syncmode ?? 'fast', + syncmode: args.syncmode ?? 'full', db: level(args.db ?? 'ethereumjs'), logger: logger, } diff --git a/lib/blockchain/chain.ts b/lib/blockchain/chain.ts index 3cc56e8..c1cd60f 100644 --- a/lib/blockchain/chain.ts +++ b/lib/blockchain/chain.ts @@ -4,7 +4,7 @@ import Blockchain from '@ethereumjs/blockchain' import { BN, toBuffer } from 'ethereumjs-util' import type { LevelUp } from 'levelup' import { Config } from '../config' - +import VM from '@ethereumjs/vm' /** * The options that the Blockchain constructor can receive. */ @@ -82,6 +82,7 @@ export class Chain extends EventEmitter { public db: LevelUp public blockchain: Blockchain public opened: boolean + public vm: VM private _headers: ChainHeaders = { latest: null, @@ -109,11 +110,15 @@ export class Chain extends EventEmitter { new Blockchain({ db: options.db, common: this.config.common, - validateBlocks: false, - validateConsensus: false, + validateBlocks: true, + validateConsensus: true, }) this.db = this.blockchain.db + this.vm = new VM({ + blockchain: this.blockchain, + common: this.config.common, + }) this.opened = false } diff --git a/lib/config.ts b/lib/config.ts index 8581f1e..fc8541d 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -13,9 +13,9 @@ export interface ConfigOptions { common?: Common /** - * Synchronization mode ('fast' or 'light') + * Synchronization mode ('full' or 'light') * - * Default: 'fast' + * Default: 'full' */ syncmode?: string @@ -101,7 +101,7 @@ export class Config { // hardfork awareness is implemented within the library // Also a fix for https://github.com/ethereumjs/ethereumjs-vm/issues/757 public static readonly COMMON_DEFAULT = new Common({ chain: 'mainnet', hardfork: 'chainstart' }) - public static readonly SYNCMODE_DEFAULT = 'fast' + public static readonly SYNCMODE_DEFAULT = 'full' public static readonly LIGHTSERV_DEFAULT = false public static readonly DATADIR_DEFAULT = `${os.homedir()}/Library/Ethereum` public static readonly TRANSPORTS_DEFAULT = ['rlpx:port=30303', 'libp2p'] diff --git a/lib/index.ts b/lib/index.ts index 046dd5e..e8e1833 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -63,7 +63,7 @@ exports.define('EthereumService', './service/ethereumservice') // Synchronizer exports.define('sync', './sync') exports.define('Synchronizer', './sync/sync') -exports.define('FastSynchronizer', './sync/fastsync') +exports.define('FullSynchronizer', './sync/fullsync') exports.define('LightSynchronizer', './sync/lightsync') // Utilities diff --git a/lib/node.ts b/lib/node.ts index 77d522f..2b9dd30 100644 --- a/lib/node.ts +++ b/lib/node.ts @@ -2,7 +2,7 @@ import events from 'events' import { LevelUp } from 'levelup' import { BootnodeLike } from './types' import { Config } from './config' -import { FastEthereumService, LightEthereumService } from './service' +import { FullEthereumService, LightEthereumService } from './service' export interface NodeOptions { /* Client configuration */ @@ -29,7 +29,7 @@ export interface NodeOptions { export default class Node extends events.EventEmitter { public config: Config - public services: (FastEthereumService | LightEthereumService)[] + public services: (FullEthereumService | LightEthereumService)[] public opened: boolean public started: boolean @@ -44,8 +44,8 @@ export default class Node extends events.EventEmitter { this.config = options.config this.services = [ - this.config.syncmode === 'fast' - ? new FastEthereumService({ + this.config.syncmode === 'full' + ? new FullEthereumService({ config: this.config, db: options.db, }) diff --git a/lib/service/fastethereumservice.ts b/lib/service/fullethereumservice.ts similarity index 88% rename from lib/service/fastethereumservice.ts rename to lib/service/fullethereumservice.ts index 9881ab1..32ebb44 100644 --- a/lib/service/fastethereumservice.ts +++ b/lib/service/fullethereumservice.ts @@ -1,11 +1,11 @@ import { EthereumService, EthereumServiceOptions } from './ethereumservice' -import { FastSynchronizer } from '../sync/fastsync' +import { FullSynchronizer } from '../sync/fullsync' import { EthProtocol } from '../net/protocol/ethprotocol' import { LesProtocol } from '../net/protocol/lesprotocol' import { Peer } from '../net/peer/peer' import { Protocol, BoundProtocol } from '../net/protocol' -interface FastEthereumServiceOptions extends EthereumServiceOptions { +interface FullEthereumServiceOptions extends EthereumServiceOptions { /* Serve LES requests (default: false) */ lightserv?: boolean } @@ -14,20 +14,20 @@ interface FastEthereumServiceOptions extends EthereumServiceOptions { * Ethereum service * @memberof module:service */ -export class FastEthereumService extends EthereumService { - public synchronizer: FastSynchronizer +export class FullEthereumService extends EthereumService { + public synchronizer: FullSynchronizer public lightserv: boolean /** * Create new ETH service - * @param {FastEthereumServiceOptions} + * @param {FullEthereumServiceOptions} */ - constructor(options: FastEthereumServiceOptions) { + constructor(options: FullEthereumServiceOptions) { super(options) this.lightserv = options.lightserv ?? false - this.config.logger.info('Fast sync mode') - this.synchronizer = new FastSynchronizer({ + this.config.logger.info('Full sync mode') + this.synchronizer = new FullSynchronizer({ config: this.config, pool: this.pool, chain: this.chain, diff --git a/lib/service/index.ts b/lib/service/index.ts index 6cf57b9..f3db80e 100644 --- a/lib/service/index.ts +++ b/lib/service/index.ts @@ -4,5 +4,5 @@ export * from './service' export * from './ethereumservice' -export * from './fastethereumservice' +export * from './fullethereumservice' export * from './lightethereumservice' diff --git a/lib/sync/fastsync.ts b/lib/sync/fullsync.ts similarity index 88% rename from lib/sync/fastsync.ts rename to lib/sync/fullsync.ts index cb44a1c..2d63cf0 100644 --- a/lib/sync/fastsync.ts +++ b/lib/sync/fullsync.ts @@ -4,17 +4,27 @@ import { BoundProtocol } from '../net/protocol' import { short } from '../util' import { Synchronizer, SynchronizerOptions } from './sync' import { BlockFetcher } from './fetcher' +import { Block } from '@ethereumjs/block' +import { RunBlockResult } from '@ethereumjs/vm/dist/runBlock' /** - * Implements an ethereum fast sync synchronizer + * Implements an ethereum full sync synchronizer * @memberof module:sync */ -export class FastSynchronizer extends Synchronizer { +export class FullSynchronizer extends Synchronizer { private blockFetcher: BlockFetcher | null constructor(options: SynchronizerOptions) { super(options) this.blockFetcher = null + options.chain.vm.on('beforeBlock', function(block: Block) { + options.config.logger.info("Running block: " + block.header.number.toString()) + }) + // TODO: we don't know which block + options.chain.vm.on('afterBlock', function(blockResults: RunBlockResult){ + options.config.logger.info("Succesfully ran block.") + }) + options.chain.vm.runBlockchain() } /** @@ -22,7 +32,7 @@ export class FastSynchronizer extends Synchronizer { * @return {string} type */ get type(): string { - return 'fast' + return 'full' } /** @@ -107,19 +117,17 @@ export class FastSynchronizer extends Synchronizer { this.pool.size }` ) + this.chain.vm.runBlockchain() }) await this.blockFetcher.fetch() // TODO: Should this be deleted? // @ts-ignore: error: The operand of a 'delete' operator must be optional delete this.blockFetcher return true - - // TO DO: Fetch state trie as well } /** - * Fetch all blocks from current height up to highest found amongst peers and - * fetch entire recent state trie + * Fetch all blocks from current height up to highest found amongst peers * @return Resolves with true if sync successful */ async sync(): Promise { diff --git a/lib/sync/index.ts b/lib/sync/index.ts index 146bd91..57a028e 100644 --- a/lib/sync/index.ts +++ b/lib/sync/index.ts @@ -3,4 +3,4 @@ */ export * from './sync' export * from './lightsync' -export * from './fastsync' +export * from './fullsync' diff --git a/package.json b/package.json index c5453b6..3953261 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "@ethereumjs/block": "^3.0.0-beta.2", "@ethereumjs/blockchain": "^5.0.0-beta.2", "@ethereumjs/common": "^2.0.0-beta.2", + "@ethereumjs/vm": "^5.0.0-beta.2", "chalk": "^2.4.1", "ethereumjs-devp2p": "^3.0.3", "ethereumjs-util": "^7.0.7", diff --git a/test/integration/fastethereumservice.spec.ts b/test/integration/fullethereumservice.spec.ts similarity index 88% rename from test/integration/fastethereumservice.spec.ts rename to test/integration/fullethereumservice.spec.ts index 89ab109..d267834 100644 --- a/test/integration/fastethereumservice.spec.ts +++ b/test/integration/fullethereumservice.spec.ts @@ -1,18 +1,18 @@ import tape from 'tape' import { BN } from 'ethereumjs-util' import { Config } from '../../lib/config' -import { FastEthereumService } from '../../lib/service' +import { FullEthereumService } from '../../lib/service' import MockServer from './mocks/mockserver' import MockChain from './mocks/mockchain' import { destroy } from './util' -tape('[Integration:FastEthereumService]', async (t) => { - async function setup(): Promise<[MockServer, FastEthereumService]> { +tape('[Integration:FullEthereumService]', async (t) => { + async function setup(): Promise<[MockServer, FullEthereumService]> { const loglevel = 'error' const config = new Config({ loglevel }) const server = new MockServer({ config }) const chain = new MockChain({ config }) - const service = new FastEthereumService({ + const service = new FullEthereumService({ config: new Config({ loglevel, servers: [server as any], lightserv: true }), chain, }) diff --git a/test/integration/fastsync.spec.ts b/test/integration/fullsync.spec.ts similarity index 97% rename from test/integration/fastsync.spec.ts rename to test/integration/fullsync.spec.ts index 9d732d4..267ed60 100644 --- a/test/integration/fastsync.spec.ts +++ b/test/integration/fullsync.spec.ts @@ -1,7 +1,7 @@ import tape from 'tape' import { wait, setup, destroy } from './util' -tape('[Integration:FastSync]', async (t) => { +tape('[Integration:FullSync]', async (t) => { t.test('should sync blocks', async (t) => { const [remoteServer, remoteService] = await setup({ location: '127.0.0.2', height: 200 }) const [localServer, localService] = await setup({ location: '127.0.0.1', height: 0 }) diff --git a/test/integration/lightsync.spec.ts b/test/integration/lightsync.spec.ts index c8c0afc..ebb123b 100644 --- a/test/integration/lightsync.spec.ts +++ b/test/integration/lightsync.spec.ts @@ -6,7 +6,7 @@ tape.skip('[Integration:LightSync]', async (t) => { const [remoteServer, remoteService] = await setup({ location: '127.0.0.2', height: 200, - syncmode: 'fast', + syncmode: 'full', }) const [localServer, localService] = await setup({ location: '127.0.0.1', @@ -26,7 +26,7 @@ tape.skip('[Integration:LightSync]', async (t) => { const [remoteServer, remoteService] = await setup({ location: '127.0.0.2', height: 9, - syncmode: 'fast', + syncmode: 'full', }) const [localServer, localService] = await setup({ location: '127.0.0.1', @@ -48,12 +48,12 @@ tape.skip('[Integration:LightSync]', async (t) => { const [remoteServer1, remoteService1] = await setup({ location: '127.0.0.2', height: 9, - syncmode: 'fast', + syncmode: 'full', }) const [remoteServer2, remoteService2] = await setup({ location: '127.0.0.3', height: 10, - syncmode: 'fast', + syncmode: 'full', }) const [localServer, localService] = await setup({ location: '127.0.0.1', diff --git a/test/integration/node.spec.ts b/test/integration/node.spec.ts index e6e0997..4a33c48 100644 --- a/test/integration/node.spec.ts +++ b/test/integration/node.spec.ts @@ -5,7 +5,7 @@ import MockServer from './mocks/mockserver' tape('[Integration:Node]', (t) => { const servers = [new MockServer({ config: new Config({ loglevel: 'error' }) }) as any] - const config = new Config({ servers, syncmode: 'fast', lightserv: false, loglevel: 'error' }) + const config = new Config({ servers, syncmode: 'full', lightserv: false, loglevel: 'error' }) const node = new Node({ config }) t.test('should start/stop', async (t) => { diff --git a/test/integration/util.ts b/test/integration/util.ts index efd5382..ab583f6 100644 --- a/test/integration/util.ts +++ b/test/integration/util.ts @@ -1,5 +1,5 @@ import { Config } from '../../lib/config' -import { FastEthereumService, LightEthereumService } from '../../lib/service' +import { FullEthereumService, LightEthereumService } from '../../lib/service' import MockServer from './mocks/mockserver' import MockChain from './mocks/mockchain' @@ -12,7 +12,7 @@ interface SetupOptions { export async function setup( options: SetupOptions = {} -): Promise<[MockServer, FastEthereumService | LightEthereumService]> { +): Promise<[MockServer, FullEthereumService | LightEthereumService]> { const loglevel = 'error' const config = new Config({ loglevel }) const { location, height, interval, syncmode } = options @@ -26,7 +26,7 @@ export async function setup( const service = syncmode === 'light' ? new LightEthereumService(serviceOpts) - : new FastEthereumService({ + : new FullEthereumService({ ...serviceOpts, lightserv: true, }) @@ -37,7 +37,7 @@ export async function setup( export async function destroy( server: MockServer, - service: FastEthereumService | LightEthereumService + service: FullEthereumService | LightEthereumService ): Promise { await server.stop() await service.stop() diff --git a/test/service/fastethereumservice.spec.ts b/test/service/fullethereumservice.spec.ts similarity index 76% rename from test/service/fastethereumservice.spec.ts rename to test/service/fullethereumservice.spec.ts index 602ace0..b81b069 100644 --- a/test/service/fastethereumservice.spec.ts +++ b/test/service/fullethereumservice.spec.ts @@ -1,11 +1,11 @@ import tape from 'tape-catch' import { Config } from '../../lib/config' -import { FastEthereumService } from '../../lib/service' +import { FullEthereumService } from '../../lib/service' const EventEmitter = require('events') const td = require('testdouble') // TESTS FAILING: replace testdouble w/ something TS friendly? -tape.skip('[FastEthereumService]', (t) => { +tape.skip('[FullEthereumService]', (t) => { class PeerPool extends EventEmitter {} PeerPool.prototype.open = td.func() PeerPool.prototype.close = td.func() @@ -18,25 +18,25 @@ tape.skip('[FastEthereumService]', (t) => { const LesProtocol = td.constructor() td.replace('../../lib/net/protocol/ethprotocol', EthProtocol) td.replace('../../lib/net/protocol/lesprotocol', LesProtocol) - class FastSynchronizer extends EventEmitter {} - FastSynchronizer.prototype.start = td.func() - FastSynchronizer.prototype.stop = td.func() - FastSynchronizer.prototype.open = td.func() - td.replace('../../lib/sync/fastsync', FastSynchronizer) + class FullSynchronizer extends EventEmitter {} + FullSynchronizer.prototype.start = td.func() + FullSynchronizer.prototype.stop = td.func() + FullSynchronizer.prototype.open = td.func() + td.replace('../../lib/sync/fullsync', FullSynchronizer) t.test('should initialize correctly', async (t) => { - const service = new FastEthereumService({ config: new Config({ transports: [] }) }) - t.ok(service.synchronizer instanceof FastSynchronizer, 'fast mode') + const service = new FullEthereumService({ config: new Config({ transports: [] }) }) + t.ok(service.synchronizer instanceof FullSynchronizer, 'full mode') t.equals(service.name, 'eth', 'got name') t.end() }) t.test('should get protocols', async (t) => { - let service = new FastEthereumService({ config: new Config({ transports: [] }) }) - t.ok(service.protocols[0] instanceof EthProtocol, 'fast protocols') + let service = new FullEthereumService({ config: new Config({ transports: [] }) }) + t.ok(service.protocols[0] instanceof EthProtocol, 'full protocols') t.notOk(service.protocols[1], 'no light protocol') - service = new FastEthereumService({ config: new Config({ transports: [], lightserv: true }) }) - t.ok(service.protocols[0] instanceof EthProtocol, 'fast protocols') + service = new FullEthereumService({ config: new Config({ transports: [], lightserv: true }) }) + t.ok(service.protocols[0] instanceof EthProtocol, 'full protocols') t.ok(service.protocols[1] instanceof LesProtocol, 'lightserv protocols') t.end() }) @@ -45,7 +45,7 @@ tape.skip('[FastEthereumService]', (t) => { t.plan(3) const server = td.object() //@ts-ignore allow Config instantiation with object server - const service = new FastEthereumService({ + const service = new FullEthereumService({ config: new Config({ servers: [server] }), }) await service.open() @@ -67,7 +67,7 @@ tape.skip('[FastEthereumService]', (t) => { t.test('should start/stop', async (t) => { const server = td.object() //@ts-ignore allow Config instantiation with object server - const service = new FastEthereumService({ + const service = new FullEthereumService({ config: new Config({ servers: [server] }), }) await service.start() diff --git a/test/sync/fastsync.spec.ts b/test/sync/fullsync.spec.ts similarity index 88% rename from test/sync/fastsync.spec.ts rename to test/sync/fullsync.spec.ts index db711d1..74694fd 100644 --- a/test/sync/fastsync.spec.ts +++ b/test/sync/fullsync.spec.ts @@ -4,24 +4,24 @@ import { Config } from '../../lib/config' import { EventEmitter } from 'events' const td = require('testdouble') -tape('[FastSynchronizer]', (t) => { +tape('[FullSynchronizer]', (t) => { class PeerPool extends EventEmitter {} td.replace('../../lib/net/peerpool', PeerPool) class BlockFetcher extends EventEmitter {} ;(BlockFetcher.prototype as any).fetch = td.func() // eslint-disable-line no-extra-semi td.replace('../../lib/sync/fetcher', { BlockFetcher }) - const FastSynchronizer = require('../../lib/sync/fastsync').FastSynchronizer + const FullSynchronizer = require('../../lib/sync/fullsync').FullSynchronizer t.test('should initialize correctly', async (t) => { const pool = new PeerPool() - const sync = new FastSynchronizer({ config: new Config({ transports: [] }), pool }) + const sync = new FullSynchronizer({ config: new Config({ transports: [] }), pool }) pool.emit('added', { eth: true }) - t.equals(sync.type, 'fast', 'fast type') + t.equals(sync.type, 'full', 'full type') t.end() }) t.test('should open', async (t) => { - const sync = new FastSynchronizer({ + const sync = new FullSynchronizer({ config: new Config({ loglevel: 'error', transports: [] }), pool: new PeerPool(), }) @@ -43,7 +43,7 @@ tape('[FastSynchronizer]', (t) => { t.test('should get height', async (t) => { const pool = new PeerPool() - const sync = new FastSynchronizer({ config: new Config({ transports: [] }), pool }) + const sync = new FullSynchronizer({ config: new Config({ transports: [] }), pool }) const peer = { eth: { getBlockHeaders: td.func(), status: { bestHash: 'hash' } } } const headers = [{ number: 5 }] td.when(peer.eth.getBlockHeaders({ block: 'hash', max: 1 })).thenResolve(headers) @@ -53,7 +53,7 @@ tape('[FastSynchronizer]', (t) => { }) t.test('should find best', async (t) => { - const sync = new FastSynchronizer({ + const sync = new FullSynchronizer({ config: new Config({ transports: [] }), interval: 1, pool: new PeerPool(), @@ -75,7 +75,7 @@ tape('[FastSynchronizer]', (t) => { t.test('should sync', async (t) => { t.plan(3) - const sync = new FastSynchronizer({ + const sync = new FullSynchronizer({ config: new Config({ transports: [] }), interval: 1, pool: new PeerPool(),