Go to file
Anton Kaliaev f6539737de
new pubsub package
comment out failing consensus tests for now

rewrite rpc httpclient to use new pubsub package

import pubsub as tmpubsub, query as tmquery

make event IDs constants
EventKey -> EventTypeKey

rename EventsPubsub to PubSub

mempool does not use pubsub

rename eventsSub to pubsub

new subscribe API

fix channel size issues and consensus tests bugs

refactor rpc client

add missing discardFromChan method

add mutex

rename pubsub to eventBus

remove IsRunning from WSRPCConnection interface (not needed)

add a comment in broadcastNewRoundStepsAndVotes

rename registerEventCallbacks to broadcastNewRoundStepsAndVotes

See https://dave.cheney.net/2014/03/19/channel-axioms

stop eventBuses after reactor tests

remove unnecessary Unsubscribe

return subscribe helper function

move discardFromChan to where it is used

subscribe now returns an err

this gives us ability to refuse to subscribe if pubsub is at its max
capacity.

use context for control overflow

cache queries

handle err when subscribing in replay_test

rename testClientID to testSubscriber

extract var

set channel buffer capacity to 1 in replay_file

fix byzantine_test

unsubscribe from single event, not all events

refactor httpclient to return events to appropriate channels

return failing testReplayCrashBeforeWriteVote test

fix TestValidatorSetChanges

refactor code a bit

fix testReplayCrashBeforeWriteVote

add comment

fix TestValidatorSetChanges

fixes from Bucky's review

update comment [ci skip]

test TxEventBuffer

update changelog

fix TestValidatorSetChanges (2nd attempt)

only do wg.Done when no errors

benchmark event bus

create pubsub server inside NewEventBus

only expose config params (later if needed)

set buffer capacity to 0 so we are not testing cache

new tx event format: key = "Tx" plus a tag {"tx.hash": XYZ}

This should allow to subscribe to all transactions! or a specific one
using a query: "tm.events.type = Tx and tx.hash = '013ABF99434...'"

use TimeoutCommit instead of afterPublishEventNewBlockTimeout

TimeoutCommit is the time a node waits after committing a block, before
it goes into the next height. So it will finish everything from the last
block, but then wait a bit. The idea is this gives it time to hear more
votes from other validators, to strengthen the commit it includes in the
next block. But it also gives it time to hear about new transactions.

waitForBlockWithUpdatedVals

rewrite WAL crash tests

Task:
test that we can recover from any WAL crash.

Solution:
the old tests were relying on event hub being run in the same thread (we
were injecting the private validator's last signature).

when considering a rewrite, we considered two possible solutions: write
a "fuzzy" testing system where WAL is crashing upon receiving a new
message, or inject failures and trigger them in tests using something
like https://github.com/coreos/gofail.

remove sleep

no cs.Lock around wal.Save

test different cases (empty block, non-empty block, ...)

comments

add comments

test 4 cases: empty block, non-empty block, non-empty block with smaller part size, many blocks

fixes as per Bucky's last review

reset subscriptions on UnsubscribeAll

use a simple counter to track message for which we panicked

also, set a smaller part size for all test cases
2017-10-30 00:32:22 -05:00
.github CODEOWNERS file 2017-10-04 23:44:55 -04:00
DOCKER update docker readme [ci skip] 2017-10-02 12:59:32 -04:00
benchmarks Replace ResultsCh with ResponsesCh 2017-10-24 17:45:13 +01:00
blockchain new pubsub package 2017-10-30 00:32:22 -05:00
certifiers Separated out certifiers.Commit from rpc structs 2017-10-25 16:43:18 +02:00
cmd/tendermint docs: comb through step by step 2017-10-23 19:11:51 -04:00
config Amount -> Power. Closes #166 2017-09-21 14:59:27 -04:00
consensus new pubsub package 2017-10-30 00:32:22 -05:00
docs docs: fixup abci guide 2017-10-23 20:56:49 -04:00
mempool new pubsub package 2017-10-30 00:32:22 -05:00
node new pubsub package 2017-10-30 00:32:22 -05:00
p2p fix test using uncommon names 2017-10-28 20:29:11 -07:00
proxy abci.Info takes a struct; less merkleeyes 2017-09-22 11:42:40 -04:00
rpc new pubsub package 2017-10-30 00:32:22 -05:00
scripts fixes from review 2017-10-25 21:54:56 -04:00
state new pubsub package 2017-10-30 00:32:22 -05:00
test test: update for abci-cli consolidation. shell formatting 2017-10-27 23:09:50 -04:00
types new pubsub package 2017-10-30 00:32:22 -05:00
version version bump 2017-10-27 11:54:20 -04:00
.codecov.yml test: remove codecov patch threshold 2016-12-20 01:47:59 -05:00
.editorconfig [.editorconfig] add rule for .proto files [ci skip] 2017-07-19 12:29:10 +03:00
.gitignore fixes per Bucky's review 2017-10-24 12:14:21 +04:00
CHANGELOG.md new pubsub package 2017-10-30 00:32:22 -05:00
CODE_OF_CONDUCT.md Add Code of Conduct 2017-06-19 15:46:15 +02:00
CONTRIBUTING.md readme & al., update links to docs 2017-09-18 16:23:22 -04:00
INSTALL.md cleanup CONTRIBUTING.md, part of https://github.com/zramsay/tendermint/issues/7 2017-07-28 16:45:03 -04:00
LICENSE GPLv3 -> Apache2.0 2016-07-18 11:51:37 -04:00
Makefile rpc/lib/client: jitter test updates and only to-be run on releases 2017-10-25 19:20:55 -07:00
README.md readme points to ecosystem doc; add lotion, clean up 2017-10-02 23:46:35 -04:00
Vagrantfile bump up Golang version to 1.9.0 2017-10-02 12:59:32 -04:00
circle.yml collect and add docker logs to CircleCI artifacts (Refs #387) 2017-02-14 19:02:11 +04:00
glide.lock new pubsub package 2017-10-30 00:32:22 -05:00
glide.yaml new pubsub package 2017-10-30 00:32:22 -05:00

README.md

Tendermint

Byzantine-Fault Tolerant State Machine Replication. Or Blockchain for short.

version API Reference Rocket.Chat license

Branch Tests Coverage
master CircleCI codecov
develop CircleCI codecov

NOTE: This is alpha software. Please contact us if you intend to run it in production.

Tendermint Core is Byzantine Fault Tolerant (BFT) middleware that takes a state transition machine - written in any programming language - and securely replicates it on many machines.

For more information, from introduction to install to application development, Read The Docs.

Install

To download pre-built binaries, see our downloads page.

To install from source, you should be able to:

go get -u github.com/tendermint/tendermint/cmd/tendermint

For more details (or if it fails), read the docs.

Resources

Tendermint Core

All resources involving the use of, building application on, or developing for, tendermint, can be found at Read The Docs. Additional information about some - and eventually all - of the sub-projects below, can be found at Read The Docs.

Sub-projects

  • ABCI, the Application Blockchain Interface
  • Go-Wire, a deterministic serialization library
  • Go-Crypto, an elliptic curve cryptography library
  • TmLibs, an assortment of Go libraries used internally
  • IAVL, Merkleized IAVL+ Tree implementation

Tools

Applications

More

Contributing

Yay open source! Please see our contributing guidelines.

Versioning

SemVer

Tendermint uses SemVer to determine when and how the version changes. According to SemVer, anything in the public API can change at any time before version 1.0.0

To provide some stability to Tendermint users in these 0.X.X days, the MINOR version is used to signal breaking changes across a subset of the total public API. This subset includes all interfaces exposed to other processes (cli, rpc, p2p, etc.), as well as parts of the following packages:

  • types
  • rpc/client
  • config
  • node

Exported objects in these packages that are not covered by the versioning scheme are explicitly marked by // UNSTABLE in their go doc comment and may change at any time. Functions, types, and values in any other package may also change at any time.

Upgrades

In an effort to avoid accumulating technical debt prior to 1.0.0, we do not guarantee that breaking changes (ie. bumps in the MINOR version) will work with existing tendermint blockchains. In these cases you will have to start a new blockchain, or write something custom to get the old data into the new chain.

However, any bump in the PATCH version should be compatible with existing histories (if not please open an issue).

Code of Conduct

Please read, understand and adhere to our code of conduct.