Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

Releases: dat-ecosystem-archive/dat-node

[Security] Ensure writes cannot happen to relative dirs

09 Apr 17:54
b4475d4
Compare
Choose a tag to compare

Update hyperdrive to fix relative path security issue.

v3.5.14...v3.5.15

SLEEP Support!

14 Apr 01:15
a163232
Compare
Choose a tag to compare

2.0.0 - 2017-04-13

Big new release! Hyperdrive version 8 upgrades to our SLEEP file format. The hyperdrive release improves import, transfer speed, and metadata access. It includes a new API much like the node fs API. Lots of cool things!

We've tried to keep the dat-node API changes to a minimum. But we've moved away from using leveldb to storing the metadata, using a flat file format instead. This means the 2.0 release will be incompatible with exiting dat archives.

If you have any old archives, we definitely recommend you upgrade. Any upgrade time will be made up for with more speed!

The major API differences are listed below, we probably forgot some minor changes as several of the underlying modules have changes options or APIs.

Changed

  • Using mirror-folder for importing files - this comes with a new event emitter for importing and different options.
  • Storage is a lot different! You can specify a directory or a storage function, e.g. Dat(ram, cb) now instead of the database.

Removed

  • opts.db option - no more database! You can specify a variety of storage formats as the first argument instead.
  • dat.owner - this is now dat.writable.
  • stats events - we are still in the process of upgrading hyperdrive-stats. Hypercore will also support more stats internally now and we will be transitioning to those soon.
  • Import options - mirror-folder has fewer options on import.

1.4.0 - Network improvements (& .datignore)

09 Mar 01:07
e8baa2d
Compare
Choose a tag to compare

A rainy Wednesday in Portland, OR means it is time for a new release!

The theme for this release is networks! We knew that networks each have their own peculiarities. We are learning that clear network information and debugging tools can help make up for network confusion. Unlike a web server, which may be either on or off, a distributed network can have many states. With this release we try to make those various states clearer.

  • On/Off - Join network will callback after the first round of discovery. With this we can let a user know if a key is offline.
  • Peer Counts - We added some nuance to the peer count. Instead of just one number we can give more information:
    • how many total peers is the user connected to?
    • how many peers have ALL the data?
    • how many peers have sent data to the user?
  • Pause/Resume - We added an API to pause and resume a given archive.

Not network related, but still pretty cool:

  • Dat Ignore - use a .datignore file to ignore anything in your dat directory! 🙈

Next Release

The next minor (or maybe major?) release will be super exciting!!!!! Mafintosh has been busy SLEEPing and getting ready to improve Dat transfer and import speeds a ton. Some details

  • The SLEEP protocol is in action. Each Dat will have a set of files to describe it. This will make it easier to support third party clients and HTTP interfaces.
  • No more leveldb dependency!
  • Lots of transfer and import speed. ⚡️

Digging Into Details - API Updates

Dat Ignore - .datignore

Add a .datignore file to any dat to ignore files on import. Turn it off with the option useDatIgnore = false on the import function call.

Peer Stats - dat.stats.peers

The stats API now has peer counts! We provide a few different peer counts so you can give accurate information about the state of the network.

  • peers.total - total number of connected peers
  • peers.complete - connected peers with a full replication of content data
  • peers.downloadingFrom - connected peers the user has downloaded data from

Note that these are only tallied for current connections (no cache kept for offline peers).

Network Callback - dat.joinNetwork(opts, cb)

dat.joinNetwork([opts], [cb]) now has a callback option. This will callback after the first round of discovery has finished. With that you can check if any peers are online for a given key.

Pause/Resume - dat.pause() & dat.resume()

dat.pause() and dat.resume() allow you to start and stop transfers on demand! It is aliased to join and leave right now but we'll make it fancier soon 💅 .

Complete Changelog

Added

  • .datignore support for ignoring files
  • Callback on joinNetwork after first round of discovery
  • Initial pause and resume API aliased to join and leave
  • stats.peers API with new peer counts

Fixed

  • Better leave network, also closes swarm.
  • Clone options passed to initArchive
  • Set opts.file for archive owner without length
  • createIfMissing passed to level options
  • dat.close() twice sync errors
  • Fix import without options
  • (hyperdrive fix) sparse content archives

Changed

  • Remove automatic finalize for snapshot imports