Skip to content

Commit 308a5a6

Browse files
fareMixa84
andauthored
Nix Update (ElementsProject#39)
* Nix update * Update README.md --------- Co-authored-by: Mihailo Milenkovic <mihailo.milenkovic84@gmail.com>
1 parent 763a63f commit 308a5a6

4 files changed

Lines changed: 62 additions & 26 deletions

File tree

README-nix.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,24 @@ that would be used by Nix, you may enter a nix shell as follows:
5858
```shell
5959
nix-shell
6060
```
61+
62+
You may then configure with the following command:
63+
```bash
64+
configurePhase
65+
```
66+
67+
And build with this one:
68+
```bash
69+
buildPhase
70+
```
71+
72+
Finally, you can run the tests with:
73+
```bash
74+
checkPhase
75+
```
76+
77+
The `./src/` directory will have been added to your `PATH`
78+
so you can run commands simply with:
79+
```bash
80+
elements-cli -?
81+
```

README.md

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,64 @@
1-
Sequentia Project blockchain platform
2-
====================================
1+
# Sequentia Project blockchain platform
2+
Sequentia is a Bitcoin sidechain dedicated to asset tokenization and decentralized exchanges.
33

44
https://sequentia.io/
55

6-
Sequentia is a Bitcoin sidechain dedicated to asset tokenization and decentralized exchanges.
7-
86
Current code is based on Elements Version: 23.2.1
97

10-
Quick Ubuntu build instructions for development:
11-
-----
8+
## Installing Prerequisistes
129

13-
Install build tools
10+
### Install build tools
11+
On Ubuntu (and probably Debian), you should be able to install the prerequisite
12+
build tools with the following command:
1413
```bash
1514
sudo apt install ccache build-essential libtool autotools-dev automake pkg-config bsdmainutils python3
1615
```
17-
Setup ccache:
16+
YMMV on other software distributions.
17+
18+
### Setup ccache
19+
You may achieve speedups when building and rebuilding by using ccache,
20+
that you may install and configure as follows:
1821
```bash
1922
sudo /usr/sbin/update-ccache-symlinks
2023
echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc
2124
source ~/.bashrc
2225
```
23-
Build:
26+
27+
## Configure and Build
28+
29+
### Prepare configuration
30+
2431
```bash
2532
./autogen.sh
2633
make -j$(nproc) -C depends NO_QT=1 NO_NATPMP=1 NO_UPNP=1 NO_ZMQ=1 NO_USDT=1
2734
export CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site NOWARN_CXXFLAGS='-Wno-deprecated -Wno-unused-result'
35+
```
36+
37+
### Configure
38+
```bash
2839
./configure --enable-any-asset-fees --enable-debug --disable-bench --disable-tests --disable-fuzz-binary
29-
make -j$(nproc)
3040
```
3141

32-
Modes
33-
-----
42+
Note that the `--enable-any-asset-fees` flag is an addition by Sequentia,
43+
that will configure RPC documentation to denominate fee rates
44+
using RFU and rfa instead of BTC and sat.
45+
46+
### Last But Not Least, Build
47+
```bash
48+
make -j$(nproc)
49+
```
3450

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

3755
* Liquid mode: `elementsd -chain=liquidv1` (syncs with Liquid network)
3856
* Bitcoin mainnet mode: `elementsd -chain=main` (not intended to be run for commerce)
3957
* Bitcoin testnet mode: `elementsd -chain=testnet3`
4058
* Bitcoin regtest mode: `elementsd -chain=regtest`
4159
* 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.
4260

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

55-
Features of the Elements blockchain platform
56-
----------------
72+
## Features of the Elements blockchain platform
5773

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

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

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

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

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

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

98-
Secure Reporting
99-
------------------
112+
## Secure Reporting
100113
See [our vulnerability reporting guide](SECURITY.md)

pkgs.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ let
99
nixpkgs-gerbil = systemPkgs.fetchFromGitHub {
1010
owner = "MuKnIO";
1111
repo = "nixpkgs";
12-
rev = "b34dfaf64b324157ee3bed43b319f947ca4e93f1";
13-
sha256 = "sha256-sY1OtbCe4bYA8/izsR+wMCP+25QvGeeHe6H9eJ3FF0U=";
12+
rev = "3494555347ea7c4c2a273b5308cde2d8f30424ea";
13+
sha256 = "sha256-0Rlh/mUFi3s3flhlDK0WSb0TPD0MAiHcRrHq15I6Sso=";
1414
};
1515
pg = import nixpkgs-gerbil {};
1616
pkgs = import nixpkgs-repo {
@@ -71,6 +71,7 @@ stdenv.mkDerivation rec {
7171
configureFlags = [
7272
"--with-boost-libdir=${boost.out}/lib"
7373
"--disable-bench"
74+
"--enable-any-asset-fees"
7475
] ++ lib.optionals (!doCheck) [
7576
"--disable-tests"
7677
"--disable-gui-tests"

shell.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ in pkgs.mkShell {
1414
# Until gerbil-support includes static compilation objects,
1515
# let's not use gerbilLoadPath and instead copy the sources into the writable GERBIL_PATH.
1616
shellHook = ''
17+
export PATH=$PWD/src:$PATH
1718
export GERBIL_PATH=$PWD/.gerbil
1819
mkdir -p $GERBIL_PATH
1920
chmod -R u+w .gerbil

0 commit comments

Comments
 (0)