{"id":13489265,"url":"https://github.com/sumoprojects/sumokoin","last_synced_at":"2025-04-04T09:08:44.011Z","repository":{"id":47609902,"uuid":"89453021","full_name":"sumoprojects/sumokoin","owner":"sumoprojects","description":"Sumokoin - Digital Cash For Highly-Confidential Transactions","archived":false,"fork":false,"pushed_at":"2024-12-25T06:10:54.000Z","size":41823,"stargazers_count":130,"open_issues_count":0,"forks_count":60,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-03-28T08:07:25.284Z","etag":null,"topics":["cryptocurrency","digital-cash","highly-confidential","sumocoin","sumokoin"],"latest_commit_sha":null,"homepage":"https://www.sumokoin.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sumoprojects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-26T07:45:08.000Z","updated_at":"2025-03-22T21:29:45.000Z","dependencies_parsed_at":"2025-02-02T16:21:01.521Z","dependency_job_id":null,"html_url":"https://github.com/sumoprojects/sumokoin","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumoprojects%2Fsumokoin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumoprojects%2Fsumokoin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumoprojects%2Fsumokoin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumoprojects%2Fsumokoin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sumoprojects","download_url":"https://codeload.github.com/sumoprojects/sumokoin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149501,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptocurrency","digital-cash","highly-confidential","sumocoin","sumokoin"],"created_at":"2024-07-31T19:00:21.487Z","updated_at":"2025-04-04T09:08:43.988Z","avatar_url":"https://github.com/sumoprojects.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# Sumokoin\n\nCopyright (c) 2017-2021, Sumokoin Projects\n\nPortions Copyright (c) 2014-2021, The Monero Project\n\nPortions Copyright (c) 2012-2013, The Cryptonote developers\n\n## Table of Contents\n  - [Development resources](#development-resources)\n  - [Coverage](#coverage)\n  - [Introduction](#introduction)\n  - [Coin Supply \u0026 Emission](#coin-supply-\u0026-emission)\n  - [About this project](#about-this-project)\n  - [License](#license)\n  - [Compiling Sumokoin from source](#compiling-sumokoin-from-source)\n    - [Dependencies](#dependencies)\n  - [Using Tor](#using-tor)\n  - [Pruning](#Pruning)\n  - [Debugging](#Debugging)\n  - [Known issues](#known-issues)\n\n## Development Resources\n\n- Web: [www.sumokoin.org](https://www.sumokoin.org)\n- Mail: [contact@sumokoin.org](mailto:contact@sumokoin.org)\n\nPlease note that code is developed on the [dev branch](https://github.com/sumoprojects/sumokoin/tree/dev), if you want to check out the latest updates, before they are merged on main branch, please refer there. Master branch will always point to a version that we consider stable, so you can download the code by simply typing `git clone https://github.com/sumoprojects/sumokoin.git`\n\n## Coverage\n\n| Type         |    Status |\n|--------------|-----------|\n|Workflows     | [![WorkFlow Status](https://github.com/sumoprojects/sumokoin/workflows/Continuous_Integration_Testing/badge.svg)](https://github.com/sumoprojects/sumokoin/actions)\n\n## Introduction\n\nSumokoin (スモコイン in Japanese) is a fork from Monero, one of the most respectable cryptocurrency well-known for **security, privacy, untraceability** and **active development**. Starting as an educational project, we found that it would be great to create a new coin with high level of privacy by (1) moving forward right away to **Ring Confidential Transactions (RingCT)**, (2) setting **minimum transaction _mixin_ to 12 (current minimum mixin set at 48)** that would greatly reduce chance of being attacked, traced or identified by (blockchain) statistical analysis.\n\nSumokoin, therefore, is a new Monero without its legacy, a _truely fungible_ cryptocurrency among just a few ones in the market.\n\n## Coin Supply \u0026 Emission\u003ca name=\"coin-supply-\u0026-emission\" /\u003e\n\n- **Total supply**: **88,888,888** coins in first 20 years, then **263,000** coins each year for inflation.\nAbout 10% (~8.8 million) was premined to reserve for future development, i.e. **80 million coins available** for community mining.\n- **Coin symbol**: **SUMO**\n- **Coin Units**:\n  + 1 Sumoshi \u0026nbsp;= 0.000000001 **SUMO** (10\u003csup\u003e-9\u003c/sup\u003e - _the smallest coin unit_)\n  + 1 Sumokun = 0.000001 **SUMO** (10\u003csup\u003e-6\u003c/sup\u003e)\n  + 1 Sumosan = 0.001 **SUMO** (10\u003csup\u003e-3\u003c/sup\u003e)\n- **Hash algorithm**: CryptoNight R (cnR, CNv4) (Proof-Of-Work)\n- **Emission scheme**: Sumokoin's block reward changes _every 6-months_ as the following \"Camel\" distribution* (inspired by _real-world mining production_ like of crude oil, coal etc. that is often slow at first,\naccelerated in the next few years before declined and depleted). However, the emission path of Sumokoin is generally not far apart from what of Bitcoin (view charts below).\n\n![](https://i.imgur.com/muvKFKg.jpg)\n\n![](https://i.imgur.com/219P7WW.png)\n\n![](https://i.imgur.com/UV36DfE.png)\n\n\\* The emulated algorithm of Sumokoin block-reward emission can be found in Python and C++ scripts at [scripts](scripts) directory.\n\n## About this Project\n\nThis is the core implementation of Sumokoin. It is open source and completely free to use without restrictions, except for those specified in the license agreement below. There are no restrictions on anyone creating an alternative implementation of Sumokoin that uses the protocol and network in a compatible manner.\n\nAs with many development projects, the repository on Github is considered to be the \"staging\" area for the latest changes. Before changes are merged into that branch on the main repository, they are tested by individual developers in their own branches, submitted as a pull request, and then subsequently tested by contributors who focus on testing and code reviews. That having been said, the repository should be carefully considered before using it in a production environment, unless there is a patch in the repository for a particular show-stopping issue you are experiencing. It is generally a better idea to use a tagged release for stability.\n\n**Anyone is welcome to contribute to Sumokoin's codebase!** If you have a fix or code change, feel free to submit is as a pull request directly to the \"master\" branch. In cases where the change is relatively small or does not affect other parts of the codebase it may be merged in immediately by any one of the collaborators. On the other hand, if the change is particularly large or complex, it is expected that it will be discussed at length either well in advance of the pull request being submitted, or even directly on the pull request.\n\n## License\n\nPlease view [LICENSE](LICENSE)\n\n[![License](https://img.shields.io/badge/license-BSD3-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\n## Compiling Sumokoin from source\n\n### Dependencies\n\nThe following table summarizes the tools and libraries required to build. A\nfew of the libraries are also included in this repository (marked as\n\"Vendored\"). By default, the build uses the library installed on the system,\nand ignores the vendored sources. However, if no library is found installed on\nthe system, then the vendored source will be built and used. The vendored\nsources are also used for statically-linked builds because distribution\npackages often include only shared library binaries (`.so`) but not static\nlibrary archives (`.a`).\n\n| Dep          | Min. version  | Vendored | Debian/Ubuntu pkg    | Arch pkg     | Fedora              | Optional | Purpose         |\n| ------------ | ------------- | -------- | -------------------- | ------------ | ------------------- | -------- | --------------- |\n| GCC          | 5.4.0         | NO       | `build-essential`    | `base-devel` | `gcc`               | NO       |                 |\n| CMake        | 3.5           | NO       | `cmake`              | `cmake`      | `cmake`             | NO       |                 |\n| pkg-config   | any           | NO       | `pkg-config`         | `base-devel` | `pkgconf`           | NO       |                 |\n| Boost        | 1.58          | NO       | `libboost-all-dev`   | `boost`      | `boost-devel`       | NO       | C++ libraries   |\n| OpenSSL      | basically any | NO       | `libssl-dev`         | `openssl`    | `openssl-devel`     | NO       | sha256 sum      |\n| libzmq       | 4.2.0         | NO       | `libzmq3-dev`        | `zeromq`     | `zeromq-devel`      | NO       | ZeroMQ library  |\n| OpenPGM      | ?             | NO       | `libpgm-dev`         | `libpgm`     | `openpgm-devel`     | NO       | For ZeroMQ      |\n| libnorm[2]   | ?             | NO       | `libnorm-dev`        |              |                     | YES      | For ZeroMQ      |\n| libunbound   | 1.4.16        | YES      | `libunbound-dev`     | `unbound`    | `unbound-devel`     | NO       | DNS resolver    |\n| libevent     | ?             | NO       | `libevent-dev`       | `libevent`   | `libevent-devel`    | YES      | For unbound\n| libsodium    | ?             | NO       | `libsodium-dev`      | `libsodium`  | `libsodium-devel`   | NO       | cryptography    |\n| libunwind    | any           | NO       | `libunwind8-dev`     | `libunwind`  | `libunwind-devel`   | YES      | Stack traces    |\n| liblzma      | any           | NO       | `liblzma-dev`        | `xz`         | `xz-devel`          | YES      | For libunwind   |\n| libreadline  | 6.3.0         | NO       | `libreadline6-dev`   | `readline`   | `readline-devel`    | YES      | Input editing   |\n| ldns         | 1.6.17        | NO       | `libldns-dev`        | `ldns`       | `ldns-devel`        | YES      | SSL toolkit     |\n| expat        | 1.1           | NO       | `libexpat1-dev`      | `expat`      | `expat-devel`       | YES      | XML parsing     |\n| GTest        | 1.5           | YES      | `libgtest-dev`[1]    | `gtest`      | `gtest-devel`       | YES      | Test suite      |\n| Doxygen      | any           | NO       | `doxygen`            | `doxygen`    | `doxygen`           | YES      | Documentation   |\n| Graphviz     | any           | NO       | `graphviz`           | `graphviz`   | `graphviz`          | YES      | Documentation   |\n| libhidapi    | ?             | NO       | `libhidapi-dev`      | `hidapi`     | `hidapi-devel`      | YES      | Hardware wallet |\n| libusb       | ?             | NO       | `libusb-1.0-0-dev`   | `libusb`     | `libusbx-devel`     | YES      | Hardware wallet |\n| protoc       | ?             | NO       | `protobuf-compiler`  | `protobuf`   | `protobuf-compiler` | YES      | Hardware wallet |\n| libudev      | ?             | No       | `libudev-dev`        | `systemd`    | `systemd-devel`     | YES      | Hardware wallet |\n\n\n[1] On Debian/Ubuntu `libgtest-dev` only includes sources and headers. You must\nbuild the library binary manually. This can be done with the following command ```sudo apt-get install libgtest-dev \u0026\u0026 cd /usr/src/gtest \u0026\u0026 sudo cmake . \u0026\u0026 sudo make \u0026\u0026 sudo mv libg* /usr/lib/ ```\n[2] libnorm-dev is needed if your zmq library was built with libnorm, and not needed otherwise\n\nInstall all dependencies at once on Debian/Ubuntu:\n\n``` sudo apt update \u0026\u0026 sudo apt install build-essential cmake pkg-config libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev libpgm-dev qttools5-dev-tools libhidapi-dev libusb-1.0-0-dev libudev-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev ccache doxygen graphviz ```\n\nInstall all dependencies at once on macOS with the provided Brewfile:\n``` brew update \u0026\u0026 brew bundle --file=contrib/brew/Brewfile ```\n\nFreeBSD one liner for required to build dependencies\n```pkg install git gmake cmake pkgconf boost-libs libzmq4 libsodium```\n\n### Cloning the repository\n\n`$ git clone https://github.com/sumoprojects/sumokoin`\n\n### Build instructions\n\nSumokoin uses the CMake build system and a top-level [Makefile](Makefile) that\ninvokes cmake commands as needed.\n\n#### On Linux and macOS\n\n* Install the dependencies (see the list above)\n\n    \\- On Ubuntu, essential dependencies can be installed with the following command:\n\n    \tsudo apt update \u0026\u0026 sudo apt install build-essential cmake pkg-config libboost-all-dev libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev doxygen graphviz libpgm-dev libhidapi-dev libusb-dev\n\n* Change to the root of the source code directory and build:\n\n    ```bash\n    cd sumokoin\n    make\n    ```\n\n    *Optional*: If your machine has several cores and enough memory, enable\n    parallel build by running `make -j\u003cnumber of threads\u003e` instead of `make`. For\n    this to be worthwhile, the machine should have one core and about 2GB of RAM\n    available per thread.\n\n    *Note*: The instructions above will compile the most stable release of the\n    Sumokoin software. If you would like to use and test the most recent software,\n    use ```git checkout master```. The master branch may contain updates that are\n    both unstable and incompatible with release software, though testing is always\n    encouraged.\n\n* The resulting executables can be found in `build/release/bin`\n\n* Add `PATH=\"$PATH:$HOME/sumokoin/build/release/bin\"` to `.profile`\n\n* Run Sumokoin with `sumokoind --detach`\n\n* **Optional**: build and run the test suite to verify the binaries:\n\n    ```bash\n    make release-test\n    ```\n\n    *NOTE*: `core_tests` test may take a few hours to complete.\n\n* **Optional**: to build binaries suitable for debugging:\n\n    ```bash\n    make debug\n    ```\n\n* **Optional**: to build statically-linked binaries:\n\n    ```bash\n    make release-static\n    ```\n\nDependencies need to be built with -fPIC. Static libraries usually aren't, so you may have to build them yourself with -fPIC. Refer to their documentation for how to build them.\n\n* **Optional**: build documentation in `doc/html` (omit `HAVE_DOT=YES` if `graphviz` is not installed):\n\n    ```bash\n    HAVE_DOT=YES doxygen Doxyfile\n    ```\n\n#### On the Raspberry Pi\n\nTested on a Raspberry Pi Zero with a clean install of minimal Raspbian Stretch (2017-09-07 or later) from https://www.raspberrypi.org/downloads/raspbian/. If you are using Raspian Jessie, [please see note in the following section](#note-for-raspbian-jessie-users).\n\n* `apt-get update \u0026\u0026 apt-get upgrade` to install all of the latest software\n\n* Install the dependencies for Sumokoin from the 'Debian' column in the table above.\n\n* Increase the system swap size:\n\n    ```bash\n    sudo /etc/init.d/dphys-swapfile stop\n    sudo nano /etc/dphys-swapfile\n    CONF_SWAPSIZE=2048\n    sudo /etc/init.d/dphys-swapfile start\n    ```\n\n* If using an external hard disk without an external power supply, ensure it gets enough power to avoid hardware issues when syncing, by adding the line \"max_usb_current=1\" to /boot/config.txt\n\n* Clone sumokoin and checkout most recent release version:\n\n    ```bash\n    git clone https://github.com/sumoprojects/sumokoin.git\n    cd sumokoin\n    git checkout tags/v0.8.0.0\n    ```\n\n* Build:\n\n    ```bash\n    make release\n    ```\n\n* Wait 4-6 hours\n\n* The resulting executables can be found in `build/release/bin`\n\n* Add `PATH=\"$PATH:$HOME/sumokoin/build/release/bin\"` to `.profile`\n\n* Run Sumokoin with `sumokoind --detach`\n\n* You may wish to reduce the size of the swap file after the build has finished, and delete the boost directory from your home directory\n\n#### *Note for Raspbian Jessie users:*\n\nIf you are using the older Raspbian Jessie image, compiling Sumokoin is a bit more complicated. The version of Boost available in the Debian Jessie repositories is too old to use with Sumokoin, and thus you must compile a newer version yourself. The following explains the extra steps, and has been tested on a Raspberry Pi 2 with a clean install of minimal Raspbian Jessie.\n\n* As before, `apt-get update \u0026\u0026 apt-get upgrade` to install all of the latest software, and increase the system swap size\n\n    ```bash\n    sudo /etc/init.d/dphys-swapfile stop\n    sudo nano /etc/dphys-swapfile\n    CONF_SWAPSIZE=2048\n    sudo /etc/init.d/dphys-swapfile start\n    ```\n\n* Then, install the dependencies for Sumokoin except `libunwind` and `libboost-all-dev`\n\n* Install the latest version of boost (this may first require invoking `apt-get remove --purge libboost*` to remove a previous version if you're not using a clean install):\n\n    ```bash\n    cd\n    wget https://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.bz2\n    tar xvfo boost_1_64_0.tar.bz2\n    cd boost_1_64_0\n    ./bootstrap.sh\n    sudo ./b2\n    ```\n\n* Wait ~8 hours\n\n    ```bash\n    sudo ./bjam cxxflags=-fPIC cflags=-fPIC -a install\n    ```\n\n* Wait ~4 hours\n\n* From here, follow the [general Raspberry Pi instructions](#on-the-raspberry-pi) from the \"Clone sumokoin and checkout most recent release version\" step.\n\n#### On Windows:\n\nBinaries for Windows are built on Windows using the MinGW toolchain within\n[MSYS2 environment](https://www.msys2.org). The MSYS2 environment emulates a\nPOSIX system. The toolchain runs within the environment and *cross-compiles*\nbinaries that can run outside of the environment as a regular Windows\napplication.\n\n**Preparing the build environment**\n\n* Download and install the [MSYS2 installer](https://www.msys2.org), either the 64-bit or the 32-bit package, depending on your system.\n* Open the MSYS shell via the `MSYS2 Shell` shortcut\n* Update packages using pacman:\n\n    ```bash\n    pacman -Syu\n    ```\n\n* Exit the MSYS shell using Alt+F4\n* Edit the properties for the `MSYS2 Shell` shortcut changing \"msys2_shell.bat\" to \"msys2_shell.cmd -mingw64\" for 64-bit builds or \"msys2_shell.cmd -mingw32\" for 32-bit builds\n* Restart MSYS shell via modified shortcut and update packages again using pacman:\n\n    ```bash\n    pacman -Syu\n    ```\n\n\n* Install dependencies:\n\n    To build for 64-bit Windows:\n\n    ```bash\n    pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-unbound\n    ```\n\n    To build for 32-bit Windows:\n\n    ```bash\n    pacman -S mingw-w64-i686-toolchain make mingw-w64-i686-cmake mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-zeromq mingw-w64-i686-libsodium mingw-w64-i686-hidapi mingw-w64-i686-unbound\n    ```\n\n* Open the MingW shell via `MinGW-w64-Win64 Shell` shortcut on 64-bit Windows\n  or `MinGW-w64-Win64 Shell` shortcut on 32-bit Windows. Note that if you are\n  running 64-bit Windows, you will have both 64-bit and 32-bit MinGW shells.\n\n**Cloning**\n\n* To git clone, run:\n\n    ```bash\n    git clone https://github.com/sumoprojects/sumokoin.git\n    ```\n\n**Building**\n\n* Change to the cloned directory, run:\n\n    ```bash\n    cd sumokoin\n    ```\n\n* If you would like a specific [version/tag](https://github.com/sumoprojects/sumokoin/tags), do a git checkout for that version. eg. 'v0.8.0.0'. If you don't care about the version and just want binaries from master, skip this step:\n\n    ```bash\n    git checkout v0.8.0.0\n    ```\n\n* If you are on a 64-bit system, run:\n\n    ```bash\n    make release-static-win64\n    ```\n\n* If you are on a 32-bit system, run:\n\n    ```bash\n    make release-static-win32\n    ```\n\n* The resulting executables can be found in `build/release/bin`\n\n* **Optional**: to build Windows binaries suitable for debugging on a 64-bit system, run:\n\n    ```bash\n    make debug-static-win64\n    ```\n\n* **Optional**: to build Windows binaries suitable for debugging on a 32-bit system, run:\n\n    ```bash\n    make debug-static-win32\n    ```\n\n* The resulting executables can be found in `build/debug/bin`\n\n### On FreeBSD:\n\nThe project can be built from scratch by following instructions for Linux above(but use `gmake` instead of `make`).\nIf you are running Sumokoin in a jail, you need to add `sysvsem=\"new\"` to your jail configuration, otherwise lmdb will throw the error message: `Failed to open lmdb environment: Function not implemented`.\n\n### On OpenBSD:\n\nYou will need to add a few packages to your system. `pkg_add cmake gmake zeromq libiconv boost`.\n\nThe `doxygen` and `graphviz` packages are optional and require the xbase set.\nRunning the test suite also requires `py-requests` package.\n\nBuild sumokoin: `env DEVELOPER_LOCAL_TOOLS=1 BOOST_ROOT=/usr/local gmake release-static`\n\nNote: you may encounter the following error, when compiling the latest version of sumokoin as a normal user:\n\n\tLLVM ERROR: out of memory\n\tc++: error: unable to execute command: Abort trap (core dumped)\n\nThen you need to increase the data ulimit size to 2GB and try again: `ulimit -d 2000000`\n\n### On NetBSD:\n\nCheck that the dependencies are present: `pkg_info -c libexecinfo boost-headers boost-libs protobuf readline libusb1 zeromq git-base pkgconf gmake cmake | more`, and install any that are reported missing, using `pkg_add` or from your pkgsrc tree.  Readline is optional but worth having.\n\nThird-party dependencies are usually under `/usr/pkg/`, but if you have a custom setup, adjust the \"/usr/pkg\" (below) accordingly.\n\nClone the sumokoin repository and checkout the most recent release as described above. Then build sumokoin: `gmake BOOST_ROOT=/usr/pkg LDFLAGS=\"-Wl,-R/usr/pkg/lib\" release`.  The resulting executables can be found in `build/NetBSD/[Release version]/Release/bin/`.\n\n### On Solaris:\n\nThe default Solaris linker can't be used, you have to install GNU ld, then run cmake manually with the path to your copy of GNU ld:\n\n\tmkdir -p build/release\n\tcd build/release\n\tcmake -DCMAKE_LINKER=/path/to/ld -D CMAKE_BUILD_TYPE=Release ../..\n\tcd ../..\n\nThen you can run make as usual.\n\n### Building portable statically linked binaries\n\nBy default, in either dynamically or statically linked builds, binaries target the specific host processor on which the build happens and are not portable to other processors. Portable binaries can be built using the following targets:\n\n* ```make release-static-linux-x86_64``` builds binaries on Linux on x86_64 portable across POSIX systems on x86_64 processors\n* ```make release-static-linux-i686``` builds binaries on Linux on x86_64 or i686 portable across POSIX systems on i686 processors\n* ```make release-static-linux-armv8``` builds binaries on Linux portable across POSIX systems on armv8 processors\n* ```make release-static-linux-armv7``` builds binaries on Linux portable across POSIX systems on armv7 processors\n* ```make release-static-linux-armv6``` builds binaries on Linux portable across POSIX systems on armv6 processors\n* ```make release-static-win64``` builds binaries on 64-bit Windows portable across 64-bit Windows systems\n* ```make release-static-win32``` builds binaries on 64-bit or 32-bit Windows portable across 32-bit Windows systems\n\n### Cross Compiling\n\nYou can also cross-compile static binaries on Linux for Windows and macOS with the `depends` system.\nRead more at [contrib/depends/README.md](contrib/depends/README.md)\n\n* ```make depends target=x86_64-linux-gnu``` for 64-bit linux binaries.\n* ```make depends target=x86_64-w64-mingw32``` for 64-bit windows binaries.\n  * Requires: `python3 g++-mingw-w64-x86-64 wine1.6 bc`\n* ```make depends target=x86_64-apple-darwin14``` for macOS binaries.\n  * Requires: `cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python-pip`, and `pip install setuptools`\n* ```make depends target=i686-linux-gnu``` for 32-bit linux binaries.\n  * Requires: `g++-multilib bc`\n* ```make depends target=i686-w64-mingw32``` for 32-bit windows binaries.\n  * Requires: `python3 g++-mingw-w64-i686`\n* ```make depends target=arm-linux-gnueabihf``` for armv7 binaries.\n  * Requires: `g++-arm-linux-gnueabihf`\n* ```make depends target=aarch64-linux-gnu``` for armv8 binaries.\n  * Requires: `g++-aarch64-linux-gnu`\n* ```make depends target=riscv64-linux-gnu``` for RISC V 64 bit binaries.\n  * Requires: `g++-riscv64-linux-gnu`\n* ```make depends target=x86_64-unknown-freebsd``` for FreeBSD 64-bit binaries.\n  * Requires: `clang-8`\n* ```make depends target=arm-linux-android``` for 32bit android binaries\n* ```make depends target=aarch64-linux-android``` for 64bit android binaries\n\nThe required packages are the names for each toolchain on apt. Depending on your distro, they may have different names.\n\nUsing `depends` might also be easier to compile Sumokoin on Windows than using MSYS. Activate Windows Subsystem for Linux (WSL) with a distro (for example Ubuntu), install the apt `build-essentials` and follow the `depends` steps as depicted above.\n\nThe produced binaries still link libc dynamically. If the binary is compiled on a current distribution, it might not run on an older distribution with an older installation of libc. Passing `-DBACKCOMPAT=ON` to cmake will make sure that the binary will run on systems having at least libc version 2.17.\n\n## Running sumokoind\n\nThe build places the binary in `bin/` sub-directory within the build directory\nfrom which cmake was invoked (repository root by default). To run in\nforeground:\n\n```bash\n./bin/sumokoind\n```\n\nTo list all available options, run `./bin/sumokoind --help`.  Options can be\nspecified either on the command line or in a configuration file passed by the\n`--config-file` argument.  To specify an option in the configuration file, add\na line with the syntax `argumentname=value`, where `argumentname` is the name\nof the argument without the leading dashes, for example `log-level=1`.\n\nTo run in background:\n\n```bash\n    ./bin/sumokoind --log-file sumokoind.log --detach\n```\n\nTo run as a systemd service, copy\n[sumokoind.service](utils/systemd/sumokoind.service) to `/etc/systemd/system/` and\n[sumokoind.conf](utils/conf/sumokoind.conf) to `/etc/`. The [example\nservice](utils/systemd/sumokoind.service) assumes that the user `sumokoin` exists\nand its home is the data directory specified in the [example\nconfig](utils/conf/sumokoind.conf).\n\nIf you're on Mac, you may need to add the `--max-concurrency 1` option to\nsumo-wallet-cli, and possibly sumokoind, if you get crashes refreshing.\n\n## Using Tor\n\n\u003e There is a new, still experimental, [integration with Tor](ANONYMITY_NETWORKS.md). The\n\u003e feature allows connecting over IPv4 and Tor simulatenously - IPv4 is used for\n\u003e relaying blocks and relaying transactions received by peers whereas Tor is\n\u003e used solely for relaying transactions received over local RPC. This provides\n\u003e privacy and better protection against surrounding node (sybil) attacks.\n\nWhile Sumokoin isn't made to integrate with Tor, it can be used wrapped with torsocks, by\nsetting the following configuration parameters and environment variables:\n\n* `--p2p-bind-ip 127.0.0.1` on the command line or `p2p-bind-ip=127.0.0.1` in\n  sumokoind.conf to disable listening for connections on external interfaces.\n* `--no-igd` on the command line or `no-igd=1` in sumokoind.conf to disable IGD\n  (UPnP port forwarding negotiation), which is pointless with Tor.\n* `DNS_PUBLIC=tcp` or `DNS_PUBLIC=tcp://x.x.x.x` where x.x.x.x is the IP of the\n  desired DNS server, for DNS requests to go over TCP, so that they are routed\n  through Tor. When IP is not specified, sumokoind uses the default list of\n  servers defined in [src/common/dns_utils.cpp](src/common/dns_utils.cpp).\n* `TORSOCKS_ALLOW_INBOUND=1` to tell torsocks to allow sumokoind to bind to interfaces\n   to accept connections from the wallet. On some Linux systems, torsocks\n   allows binding to localhost by default, so setting this variable is only\n   necessary to allow binding to local LAN/VPN interfaces to allow wallets to\n   connect from remote hosts. On other systems, it may be needed for local wallets\n   as well.\n* Do NOT pass `--detach` when running through torsocks with systemd, (see\n  [utils/systemd/sumokoind.service](utils/systemd/sumokoind.service) for details).\n* If you use the wallet with a Tor daemon via the loopback IP (eg, 127.0.0.1:9050),\n  then use `--untrusted-daemon` unless it is your own hidden service.\n\nExample command line to start sumokoind through Tor:\n\n```bash\nDNS_PUBLIC=tcp torsocks sumokoind --p2p-bind-ip 127.0.0.1 --no-igd\n```\n\n### Using Tor on Tails\n\nTAILS ships with a very restrictive set of firewall rules. Therefore, you need\nto add a rule to allow this connection too, in addition to telling torsocks to\nallow inbound connections. Full example:\n\n```bash\n    sudo iptables -I OUTPUT 2 -p tcp -d 127.0.0.1 -m tcp --dport 19734 -j ACCEPT\n    DNS_PUBLIC=tcp torsocks ./sumokoind --p2p-bind-ip 127.0.0.1 --no-igd --rpc-bind-ip 127.0.0.1 \\\n        --data-dir /home/amnesia/Persistent/your/directory/to/the/blockchain\n```\n\n## Pruning\n\nAs of June 2021, The full Sumokoin blockchain file is on about 22 GB. One can store a pruned blockchain, which is **less than one\nfourth** in size from the full blockchain size (June 2020 4.6 GB).\nA pruned blockchain can only serve part of the historical chain data to other peers, but is otherwise identical in\nfunctionality to the full blockchain.\nTo use a pruned blockchain, it is best to start the initial sync with --pruned-blockchain. However, it is also possible\nto prune an existing blockchain using the sumo-blockchain-prune tool or using the --pruned-blockchain sumokoind option\nwith an existing chain. If an existing chain exists, pruning will temporarily require disk space to store both the full\nand pruned blockchains.\n\n# Debugging\n\nThis section contains general instructions for debugging failed installs or problems encountered with Sumokoin. First, ensure you are running the latest version built from the Github repo.\n\n### Obtaining stack traces and core dumps on Unix systems\n\nWe generally use the tool `gdb` (GNU debugger) to provide stack trace functionality, and `ulimit` to provide core dumps in builds which crash or segfault.\n\n* To use `gdb` in order to obtain a stack trace for a build that has stalled:\n\nRun the build.\n\nOnce it stalls, enter the following command:\n\n```bash\ngdb /path/to/sumokoind `pidof sumokoind`\n```\n\nType `thread apply all bt` within gdb in order to obtain the stack trace\n\n* If however the core dumps or segfaults:\n\nEnter `ulimit -c unlimited` on the command line to enable unlimited filesizes for core dumps\n\nEnter `echo core | sudo tee /proc/sys/kernel/core_pattern` to stop cores from being hijacked by other tools\n\nRun the build.\n\nWhen it terminates with an output along the lines of \"Segmentation fault (core dumped)\", there should be a core dump file in the same directory as sumokoind. It may be named just `core`, or `core.xxxx` with numbers appended.\n\nYou can now analyse this core dump with `gdb` as follows:\n\n```bash\ngdb /path/to/sumokoind /path/to/dumpfile\n```\n\nPrint the stack trace with `bt`\n\n * If a program crashed and cores are managed by systemd, the following can also get a stack trace for that crash:\n\n```bash\ncoredumpctl -1 gdb\n```\n\n#### To run sumokoin within gdb:\n\nType `gdb /path/to/sumokoind`\n\nPass command-line options with `--args` followed by the relevant arguments\n\nType `run` to run sumokoind\n\n### Analysing memory corruption\n\nThere are two tools available:\n\n#### ASAN\n\nConfigure Sumokoin with the -D SANITIZE=ON cmake flag, eg:\n\n```bash\ncd build/debug \u0026\u0026 cmake -D SANITIZE=ON -D CMAKE_BUILD_TYPE=Debug ../..\n```\n\nYou can then run the Sumokoin tools normally. Performance will typically halve.\n\n#### valgrind\n\nInstall valgrind and run as `valgrind /path/to/sumokoind`. It will be very slow.\n\n### LMDB\n\nInstructions for debugging suspected blockchain corruption as per @HYC\n\nThere is an `mdb_stat` command in the LMDB source that can print statistics about the database but it's not routinely built. This can be built with the following command:\n\n```bash\ncd ~/sumokoin/src/lmdb/db_drivers/liblmdb \u0026\u0026 make\n```\n\nThe output of `mdb_stat -ea \u003cpath to blockchain dir\u003e` will indicate inconsistencies in the blocks, block_heights and block_info table.\n\nThe output of `mdb_dump -s blocks \u003cpath to blockchain dir\u003e` and `mdb_dump -s block_info \u003cpath to blockchain dir\u003e` is useful for indicating whether blocks and block_info contain the same keys.\n\nThese records are dumped as hex data, where the first line is the key and the second line is the data.\n\n# Known Issues\n\n## Protocols\n\n### Socket-based\n\nBecause of the nature of the socket-based protocols that drive sumokoin, certain protocol weaknesses are somewhat unavoidable at this time. While these weaknesses can theoretically be fully mitigated, the effort required (the means) may not justify the ends. As such, please consider taking the following precautions if you are a sumokoin node operator:\n\n- Run `sumokoind` on a \"secured\" machine. If operational security is not your forte, at a very minimum, have a dedicated a computer running `sumokoind` and **do not** browse the web, use email clients, or use any other potentially harmful apps on your `sumokoind` machine. **Do not click links or load URL/MUA content on the same machine**. Doing so may potentially exploit weaknesses in commands which accept \"localhost\" and \"127.0.0.1\".\n- If you plan on hosting a public \"remote\" node, start `sumokoind` with `--restricted-rpc`. This is a must.\n\n### Blockchain-based\n\nCertain blockchain \"features\" can be considered \"bugs\" if misused correctly. Consequently, please consider the following:\n\n- When receiving sumokoin, be aware that it may be locked for an arbitrary time if the sender elected to, preventing you from spending that sumokoin until the lock time expires. You may want to hold off acting upon such a transaction until the unlock time lapses. To get a sense of that time, you can consider the remaining blocktime until unlock as seen in the `show_transfers` command.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumoprojects%2Fsumokoin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumoprojects%2Fsumokoin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumoprojects%2Fsumokoin/lists"}