Skip to content

Commit

Permalink
Merge tag 'neo-v0.11.0' into v14.x.x
Browse files Browse the repository at this point in the history
neo-v0.11.0
  • Loading branch information
Gavin Norman committed Apr 23, 2019
2 parents 5a1e359 + 5ab0e0d commit b051bb7
Show file tree
Hide file tree
Showing 95 changed files with 17,415 additions and 78 deletions.
4 changes: 1 addition & 3 deletions Build.mak
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export ASSERT_ON_STOMPING_PREVENTION=1

override LDFLAGS += -llzo2 -lebtree -lrt -lgcrypt -lgpg-error -lglib-2.0 -lpcre
override DFLAGS += -w

ifeq ($(DVER),1)
Expand All @@ -14,9 +15,6 @@ $B/fakedht: override LDFLAGS += -llzo2 -lebtree -lrt -lpcre

all += $B/fakedht

$O/%unittests: override LDFLAGS += -llzo2 -lebtree -lrt -lpcre

$O/test-fakedht: override LDFLAGS += -llzo2 -lebtree -lrt -lpcre
$O/test-fakedht: $B/fakedht

$B/dhtapp: $C/src/dummydhtapp/main.d
Expand Down
21 changes: 21 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,27 @@ Table (DHT), including:
The test is run, in this repo, on a fake node, but it can be reused in other
repos to test real node implementations. (``src.dhttest``)

A Tale of Two Protocols
-----------------------

The code in this repo is currently in transition. There exist two parallel
client/server architectures in the repo, a new architecture (dubbed "neo") --
based on the core code in the ``swarm/neo`` package -- and a legacy architecture
-- based on the core code located in the other packages of ``swarm``. The neo
protocol is being introduced in stages, progressively adding features to the
core client and server code over a series of alpha releases in a separate branch
(named ``neo``).

Note that the DHT client and node defined in this repo support *both* neo and
legacy features.

When the alpha releases are considered stable, the ``neo`` branch will be merged
into the main release branch (currently ``v13.x.x``).

When sufficient neo features have been implemented and the legacy protocol is no
longer in active use, the legacy protocol will be deprecated and eventually
removed.

Dependencies
============

Expand Down
2 changes: 1 addition & 1 deletion beaver.Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM sociomantictsunami/dlang:v2
FROM sociomantictsunami/dlang:v3
1 change: 0 additions & 1 deletion docker/build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
set -xe

# Install dependencies
apt-get update
apt-get install -y \
liblzo2-dev \
libebtree6-dev \
Expand Down
12 changes: 12 additions & 0 deletions relnotes/connect.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### Simple methods to connect to a node or cluster

`dhtproto.client.mixins.NeoSupport`

The blocking API now has three additional methods named `connect`. These add
either a single node (specified either by address & port or purely by port) or
a cluster of nodes (specified by a config file) to the registry, and then blocks
the current `Task` until the hash range of all nodes has been fetched.

These new methods are intended to simplify use of the DHT client in test code
and scripts.

15 changes: 15 additions & 0 deletions relnotes/ctor.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### New, ultra-minimal client ctor for use in scripts/tests

`dhtproto.client.DhtClient`

The existing constructors require an epoll instance and various user-specified
configuration settings. The newly added constructor allows a DHT client to be
instantiated with no configuration whatsoever:

```
auto dht = new DhtClient; // uses Task-scheduler's epoll instance
```

This greatly reduces the amount of boilerplate required to use a DHT client in
a script or test.

8 changes: 8 additions & 0 deletions relnotes/neo.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### Neo protocol is now mainstream

`dhtproto.client.DhtClient`

The DHT client now has the facility to use the neo protocol. For full
documentation on the DHT neo protocol and requests, see
`dhtproto.client.README.md`.

Loading

0 comments on commit b051bb7

Please sign in to comment.