• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ipfs / ipfs-cluster / 2284
68%
master: 65%

Build:
Build:
LAST BUILD BRANCH: feat/expvar
DEFAULT BRANCH: master
Ran 07 May 2018 05:50AM UTC
Jobs 1
Files 42
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2284

push

travis-ci

hsanjuan
Feat: emancipate Consensus from the Cluster component

This commit promotes the Consensus component (and Raft) to become a fully
independent thing like other components, passed to NewCluster during
initialization. Cluster (main component) no longer creates the consensus
layer internally. This has triggered a number of breaking changes
that I will explain below.

Motivation: Future work will require the possibility of running Cluster
with a consensus layer that is not Raft. The "consensus" layer is in charge
of maintaining two things:
  * The current cluster peerset, as required by the implementation
  * The current cluster pinset (shared state)

While the pinset maintenance has always been in the consensus layer, the
peerset maintenance was handled by the main component (starting by the "peers"
key in the configuration) AND the Raft component (internally)
and this generated lots of confusion: if the user edited the peers in the
configuration they would be greeted with an error.

The bootstrap process (adding a peer to an existing cluster) and configuration
key also complicated many things, since the main component did it, but only
when the consensus was initialized and in single peer mode.

In all this we also mixed the peerstore (list of peer addresses in the libp2p
host) with the peerset, when they need not to be linked.

By initializing the consensus layer before calling NewCluster, all the
difficulties in maintaining the current implementation in the same way
have come to light. Thus, the following changes have been introduced:

* Remove "peers" and "bootstrap" keys from the configuration: we no longer
edit or save the configuration files. This was a very bad practice, requiring
write permissions by the process to the file containing the private key and
additionally made things like Puppet deployments of cluster difficult as
configuration would mutate from its initial version. Needless to say all the
maintenance associated to making sure peers and... (continued)

4846 of 7161 relevant lines covered (67.67%)

390.2 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2284.1 07 May 2018 05:50AM UTC 0
67.67
Travis Job 2284.1
Source Files on build 2284
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2284
  • 33d9cdd3 on github
  • Prev Build on feat/promote-consensus (#2270)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc