stellar-core is the backbone of the Stellar network. It maintains a local copy of the ledger, communicating and staying in sync with other instances of stellar-core on the network. Optionally, stellar-core can store historical records of the ledger and participate in consensus.
C++ C Objective-C M4 Logos Shell
Latest commit c59ed34 Jan 14, 2017 @latobarita latobarita committed on GitHub Merge pull request #1122 from vogel/fuzz-fixes
Fuzz fixes

Reviewed-by: jedmccaleb
Failed to load latest commit information.
Builds/VisualStudio2015 Fix windows (VS) compile errors. Nov 10, 2016
docs don't double-hash the transaction Oct 13, 2016
lib allow removing items from lru_cache based on predicate Dec 19, 2016
m4 Use full pathnames for libraries rather than -l flags. Dec 16, 2016
src Merge pull request #1122 from vogel/fuzz-fixes Jan 14, 2017
.clang-format Tighten formatting closer to LLVM default (actually libc++) and back … Dec 16, 2014
.dir-locals.el don't double-hash the transaction Oct 13, 2016
.gitattributes fixing the handling of the Peers table (in progress). Feb 21, 2015
.gitignore changes for VS2015 Update 1 Dec 1, 2015
.gitmodules Overhaul of the make system. Jul 15, 2015
.travis.yml Remove redundant stanza from testing. Apr 11, 2015
AUTHORS first cut at automake Dec 1, 2014 Added bug template / how to file issues Nov 12, 2015 Update Nov 9, 2015
COPYING Updated COPYING file with links Sep 10, 2015
ChangeLog first cut at automake Dec 1, 2014
INSTALL-Windows.txt Mention Windows 64 as prerequisite Jun 22, 2016 Update Aug 5, 2016
LICENSE-APACHE.txt Add copyright year and holder name Apr 7, 2015 fix --signtxn so you can specify network to sign for Oct 13, 2016
NEWS Anticipated news! Mar 25, 2015
README fix clean targets so make distcheck works. Jul 15, 2015 Updated docs about running tests May 29, 2016 fix clean targets so make distcheck works. Jul 15, 2015 Use system sqlite library by default. Jul 16, 2015 Use full pathnames for libraries rather than -l flags. Dec 16, 2016
install-sh autotools Nov 26, 2014
make-mks use recursive Makefile in lib/ Jul 31, 2015
stellar-core.supp Firm up name of program to 'stellar-core', close #302 Mar 24, 2015 Fix Jan 4, 2016

Build Status


Stellar-core is a replicated state machine that maintains a local copy of a cryptographic ledger and processes transactions against it, in consensus with a set of peers. It implements the Stellar Consensus Protocol, a federated consensus protocol. It is written in C++11 and runs on Linux, OSX and Windows. Learn more by reading the overview document.


Documentation of the code's layout and abstractions, as well as for the functionality available, can be found in ./docs.


See Installation


See Contributing

Reporting issues

Software has bugs, or maybe you have an idea for a change in stellar-core.


  1. do a search of issues in case there is one already tracking the one you ran into.
  2. search open issues (not addressed yet) using the filter is:open (default). If you have new information, include it into the issue.
  3. search closed issues by removing the is:open filter. Two possibilities here:
    • the issue was resolved in a newer version - then you just need to install the version with the fix
    • the issue was closed for some reason. You may decide to reopen it depending on context. Make sure to explain why the issue should be re-opened.

For bugs being opened/re-opened, simply paste and fill the into the issue.

Running tests

run tests with: src/stellar-core --test

run one test with: src/stellar-core --test testName

run one test category with: src/stellar-core --test '[categoryName]'

Categories (or tags) can be combined: AND-ed (by juxtaposition) or OR-ed (by comma-listing).

Tests tagged as [.] or [hide] are not part of the default test test.

supported test options can be seen with src/stellar-core --test --help

display tests timing information: src/stellar-core --test -d yes '[categoryName]'

xml test output (includes nested section information): src/stellar-core --test -r xml '[categoryName]'

Running tests against postgreSQL

There are two options. The easiest is to have the test suite just create a temporary postgreSQL database cluster in /tmp and delete it after the test. That will happen by default if you run make check.

You can also create a temporary database cluster manually, by running ./src/test/selftest-pg bash to get a shell, then running tests manually. The advantage of this is that you can examine the database log in $PGDATA/pg_log/ after running tests, as well as manually inspect the database with psql.

Finally, you can use an existing database cluster so long as it has databases named test0, test1, ..., test9, and test. Do set this up, make sure your PGHOST and PGUSER environment variables are appropriately set, then run the following from bash:

for i in $(seq 0 9) ''; do
    psql -c "create database test$i;"

Running stress tests

We adopt the convention of tagging a stress-test for subsystem foo as [foo-stress][stress][hide].

Then, running

  • stellar-core --test [stress] will run all the stress tests,
  • stellar-core --test [foo-stress] will run the stress tests for subsystem foo alone, and
  • neither stellar-core --test nor stellar-core --test [foo] will run stress tests.