Skip to content

Commit

Permalink
Nix Update (#39)
Browse files Browse the repository at this point in the history
* Nix update

* Update README.md

---------

Co-authored-by: Mihailo Milenkovic <[email protected]>
  • Loading branch information
fare and Mixa84 authored Jul 19, 2024
1 parent 763a63f commit 308a5a6
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 26 deletions.
21 changes: 21 additions & 0 deletions README-nix.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,24 @@ that would be used by Nix, you may enter a nix shell as follows:
```shell
nix-shell
```

You may then configure with the following command:
```bash
configurePhase
```

And build with this one:
```bash
buildPhase
```

Finally, you can run the tests with:
```bash
checkPhase
```

The `./src/` directory will have been added to your `PATH`
so you can run commands simply with:
```bash
elements-cli -?
```
61 changes: 37 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,64 @@
Sequentia Project blockchain platform
====================================
# Sequentia Project blockchain platform
Sequentia is a Bitcoin sidechain dedicated to asset tokenization and decentralized exchanges.

https://sequentia.io/

Sequentia is a Bitcoin sidechain dedicated to asset tokenization and decentralized exchanges.

Current code is based on Elements Version: 23.2.1

Quick Ubuntu build instructions for development:
-----
## Installing Prerequisistes

Install build tools
### Install build tools
On Ubuntu (and probably Debian), you should be able to install the prerequisite
build tools with the following command:
```bash
sudo apt install ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3
```
Setup ccache:
YMMV on other software distributions.

### Setup ccache
You may achieve speedups when building and rebuilding by using ccache,
that you may install and configure as follows:
```bash
sudo /usr/sbin/update-ccache-symlinks
echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc
source ~/.bashrc
```
Build:

## Configure and Build

### Prepare configuration

```bash
./autogen.sh
make -j$(nproc) -C depends NO_QT=1 NO_NATPMP=1 NO_UPNP=1 NO_ZMQ=1 NO_USDT=1
export CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site NOWARN_CXXFLAGS='-Wno-deprecated -Wno-unused-result'
```

### Configure
```bash
./configure --enable-any-asset-fees --enable-debug --disable-bench --disable-tests --disable-fuzz-binary
make -j$(nproc)
```

Modes
-----
Note that the `--enable-any-asset-fees` flag is an addition by Sequentia,
that will configure RPC documentation to denominate fee rates
using RFU and rfa instead of BTC and sat.

### Last But Not Least, Build
```bash
make -j$(nproc)
```

Elements supports a few different pre-set chains for syncing. Note though some are intended for QA and debugging only:
## Modes
Elements supports a few different pre-set chains for syncing.
Note though some are intended for QA and debugging only:

* Liquid mode: `elementsd -chain=liquidv1` (syncs with Liquid network)
* Bitcoin mainnet mode: `elementsd -chain=main` (not intended to be run for commerce)
* Bitcoin testnet mode: `elementsd -chain=testnet3`
* Bitcoin regtest mode: `elementsd -chain=regtest`
* Elements custom chains: Any other `-chain=` argument. It has regtest-like default parameters that can be over-ridden by the user by a rich set of start-up options.

Confidential Assets
----------------
## Confidential Assets
The latest feature in the Elements blockchain platform is Confidential Assets,
the ability to issue multiple assets on a blockchain where asset identifiers
and amounts are blinded yet auditable through the use of applied cryptography.
Expand All @@ -52,10 +69,9 @@ and amounts are blinded yet auditable through the use of applied cryptography.
* [Confidential Assets Demo](https://github.com/ElementsProject/confidential-assets-demo)
* [Elements Code Tutorial](https://elementsproject.org/elements-code-tutorial/overview) covering blockchain configuration and how to use the main features.

Features of the Elements blockchain platform
----------------
## Features of the Elements blockchain platform

Compared to Bitcoin itself, it adds the following features:
Compared to Bitcoin itself, Elements adds the following features:
* [Confidential Assets][asset-issuance]
* [Confidential Transactions][confidential-transactions]
* [Federated Two-Way Peg][federated-peg]
Expand All @@ -75,8 +91,7 @@ Additional RPC commands and parameters:
The CI (Continuous Integration) systems make sure that every pull request is built for Windows, Linux, and macOS,
and that unit/sanity tests are run automatically.

License
-------
## License
Elements is released under the terms of the MIT license. See [COPYING](COPYING) for more
information or see http://opensource.org/licenses/MIT.

Expand All @@ -87,14 +102,12 @@ information or see http://opensource.org/licenses/MIT.
[asset-issuance]: https://elementsproject.org/features/issued-assets
[schnorr-signatures]: https://elementsproject.org/features/schnorr-signatures

What is the Elements Project?
-----------------
## What is the Elements Project?
Elements is an open source, sidechain-capable blockchain platform. It also allows experiments to more rapidly bring technical innovation to the Bitcoin ecosystem.

Learn more on the [Elements Project website](https://elementsproject.org)

https://github.com/ElementsProject/elementsproject.github.io

Secure Reporting
------------------
## Secure Reporting
See [our vulnerability reporting guide](SECURITY.md)
5 changes: 3 additions & 2 deletions pkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ let
nixpkgs-gerbil = systemPkgs.fetchFromGitHub {
owner = "MuKnIO";
repo = "nixpkgs";
rev = "b34dfaf64b324157ee3bed43b319f947ca4e93f1";
sha256 = "sha256-sY1OtbCe4bYA8/izsR+wMCP+25QvGeeHe6H9eJ3FF0U=";
rev = "3494555347ea7c4c2a273b5308cde2d8f30424ea";
sha256 = "sha256-0Rlh/mUFi3s3flhlDK0WSb0TPD0MAiHcRrHq15I6Sso=";
};
pg = import nixpkgs-gerbil {};
pkgs = import nixpkgs-repo {
Expand Down Expand Up @@ -71,6 +71,7 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-boost-libdir=${boost.out}/lib"
"--disable-bench"
"--enable-any-asset-fees"
] ++ lib.optionals (!doCheck) [
"--disable-tests"
"--disable-gui-tests"
Expand Down
1 change: 1 addition & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ in pkgs.mkShell {
# Until gerbil-support includes static compilation objects,
# let's not use gerbilLoadPath and instead copy the sources into the writable GERBIL_PATH.
shellHook = ''
export PATH=$PWD/src:$PATH
export GERBIL_PATH=$PWD/.gerbil
mkdir -p $GERBIL_PATH
chmod -R u+w .gerbil
Expand Down

0 comments on commit 308a5a6

Please sign in to comment.