Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ipr0310 committed Sep 3, 2024
1 parent 7990b0d commit 0a3c7ab
Showing 1 changed file with 47 additions and 39 deletions.
86 changes: 47 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Signum Node

[![Node Build](https://github.com/signum-network/signum-node/actions/workflows/build.yml/badge.svg)](https://github.com/signum-network/signum-node/actions/workflows/build.yml)
[![GPLv3](https://img.shields.io/badge/license-GPLv3-blue.svg)](LICENSE.txt)
[![Get Support at https://discord.gg/ms6eagX](https://img.shields.io/badge/join-discord-blue.svg)](https://discord.gg/ms6eagX)
Expand All @@ -20,14 +21,14 @@ See [CONTRIBUTING.md](CONTRIBUTING.md)

## Network Specification

- Block time is 4 minutes
- Block time is 4 minutes
- Block size is 375,360 byte
- Minimum transaction size is 184 bytes
- Minimum network fee is 0.01 Signa
- Transactions per second is at least 16
- Smart Transactions per second (multiple payouts) is up to 5,000 [STPS](https://docs.signum.network/signum#ny-smart-layer-10)
- Smart Transactions per second (multiple payouts) is up to 5,000 [STPS](https://docs.signum.network/signum#NYTK1)
- Maximum 1,200,000 balance changes per block
- Total Supply: [2,138,119,200 SIGNA up to block 972k + 100 SIGNA per block after that](https://github.com/signum-network/CIPs/blob/master/cip-0029.md)
- Total Supply: [2,138,119,200 SIGNA up to block 972k + 100 SIGNA per block after that](https://github.com/signum-network/SIPs/blob/master/SIP/sip-29.md)
- Block reward started at 10,000/block in 2014
- Block reward decreased at 5% each month with a minimum mining incentive of 100 SIGNA per block
- Automated burning of subscription interval payment fees and smart contract step fees from block 1,029,000 [SIP-36](https://github.com/signum-network/SIPs/blob/master/SIP/sip-36.md)
Expand Down Expand Up @@ -64,47 +65,48 @@ The important part is that the Java version starts with `11.` (Java 11)

> Tipp: Use [SDK!](https://sdkman.io/usage) for easy installation of Java

## Using an optional RDBMS (MariaDB, PostgreSQL)

Signum Node uses an embedded file based database (H2) as default. But it's possible to use either MariaDB or PostgreSQL as alternative database.

The minimum required version of MariaDB is 10.6.

----
---

### Should I use MariaDB, PostgreSQL or H2?

__H2__ is a very fast file based (embedded) database. Signum Node builds up the entire database out of the box and does not require any further set up.
This makes H2 an interesting choice especially for less-technical users who just want to start and/or run a local (not publicly accessible) node. Choose this, if you want to run just a local node without public exposure and/or
**H2** is a very fast file based (embedded) database. Signum Node builds up the entire database out of the box and does not require any further set up.
This makes H2 an interesting choice especially for less-technical users who just want to start and/or run a local (not publicly accessible) node. Choose this, if you want to run just a local node without public exposure and/or
you don't want to connect to the database while running the node. Furthermore, the resulting database file is easily shareable, such others can use a snapshot and sync from there.

> Update: H2 has proven to be unstable. We do not recommend the usage of H2 anymore
__Sqlite__ is just like H2 a file based (embedded) database. Signum Node builds up the entire database out of the box and does not require any further set up.
This makes Sqlite an interesting choice especially for less-technical users who just want to start and/or run a local (not publicly accessible) node. Choose this, if you want to run just a local node without public exposure.
**Sqlite** is just like H2 a file based (embedded) database. Signum Node builds up the entire database out of the box and does not require any further set up.
This makes Sqlite an interesting choice especially for less-technical users who just want to start and/or run a local (not publicly accessible) node. Choose this, if you want to run just a local node without public exposure.
Furthermore, the resulting database file is easily shareable, such others can use a snapshot and sync from there.
Sqlite is still experimental, and considered as a substitute for H2.

__MariaDB__ and __PostgreSQL__ on the other hand require an additional set-up. It is the better choice for publicly accessible nodes,
as they are considered more stable, especially under higher load.
**MariaDB** and **PostgreSQL** on the other hand require an additional set-up. It is the better choice for publicly accessible nodes,
as they are considered more stable, especially under higher load.

MariaDB and PostgreSQL are not as fast as H2, so expect higher re-synchronisation times.
The performance hit for MariaDB and PostgreSQL is related to the TCP/IP connection, which is per se slower than File-IO (especially for SSDs).
Due to that model concurrent access is possible, i.e. one can run an additional service against the same database, which is not possible with H2, as the file gets locked.

| | Stability | Speed | Setup | Backup | Concurrency | Purpose |
|------------|-----------|------|-------|--------|-------------|----------------------------------|
| H2 | - (1) | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ | | Local Node |
| Sqlite | ⭐⭐ (2) | ⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ | ✅ (3) | Local Node |
| MariaDB | ⭐⭐ ||| | | Public Node, Additional Services |
| PostgreSQL | ⭐⭐ (2) ||| | | Public Node, Additional Services |
| | Stability | Speed | Setup | Backup | Concurrency | Purpose |
| ---------- | --------- | ------ | ------ | ------ | ----------- | -------------------------------- |
| H2 | - (1) | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ || Local Node |
| Sqlite | ⭐⭐ (2) | ⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ | ✅ (3) | Local Node |
| MariaDB | ⭐⭐ | |||| Public Node, Additional Services |
| PostgreSQL | ⭐⭐ (2) | |||| Public Node, Additional Services |

> (1) H2 - even with updated Version 2 - has proven to be unstable and causing database issues - mostly File I/O exceptions, and data inconsistencies.
> (1) H2 - even with updated Version 2 - has proven to be unstable and causing database issues - mostly File I/O exceptions, and data inconsistencies.
> (2) PostgreSQL and Sqlite support is still experimental. So, stability needs to be proven over time, but in general Postgres itself is as least stable/reliable as MariaDB.
> (3) Sqlite supports concurrent reading. Writing is still limited to one writer at a time.
----
---

See in the following documents how to set up for different database

Expand All @@ -129,26 +131,27 @@ Starting with the release version 3.3.0 and higher the concept of the config fil
To run the node for mainnet with the default options, no configuration change is needed.

All default/recommended parameters are defined in code by the Signum Node but you can overwrite the parameter within the config file to suit your needs.
The default values for the available settings are shown in the `conf/node-default.properties` file as commented out.
The default values for the available settings are shown in the `conf/node-default.properties` file as commented out.

### Configuration Hints

**Configure your cash-back**

As an incentive for users to run their own full nodes, [SIP-35](https://github.com/signum-network/SIPs/blob/master/SIP/sip-35.md) introduced the concept of fee *cash-back*.
As an incentive for users to run their own full nodes, [SIP-35](https://github.com/signum-network/SIPs/blob/master/SIP/sip-35.md) introduced the concept of fee _cash-back_.
In order to receive the 25% cashback on the fees for transactions created by your node, set your
own account ID in the configuration file:

```properties
node.cashBackId = 8952122635653861124
```

Note: the example ID above `8952122635653861124` is the [SNA](https://www.sna.signum.network/) account.

The cash-back is paid from block `1,029,000.`

**H2/MariaDB**

By default Signum Node is using H2 (file based) as database.
By default Signum Node is using H2 (file based) as database.
If you like to use MariaDB you will need to adjust your `conf/node.properties`:

```properties
Expand All @@ -162,8 +165,9 @@ Please modify the `DB.Url` to your own specifications (port 3306 is the standard

**UPnP-Portforwarding**

By default the UPnP port forwarding is activated.
By default the UPnP port forwarding is activated.
If you run the node on a VPS you can deactivate this by setting it to "no".

```properties
## Port for incoming peer to peer networking requests, if enabled.
# P2P.Port = 8123
Expand All @@ -174,38 +178,41 @@ P2P.UPnP = no
**Enable SNR**

If you set on the `P2P.myPlatform` a valid Signum address and you fulfill the SNR requirements your node aka the set Signum address will be rewarded with the SNR.
The SNR ([Signum Network Reward](https://signum.community/signum-snr-awards/)) is a community driven bounty paid to all node-operators which run continuous (uptime > 80%) and with the newest release a Signum node.
The SNR ([Signum Network Reward](https://wiki.signum.network/signum-snr-awards/)) is a community driven bounty paid to all node-operators which run continuous (uptime > 80%) and with the newest release a Signum node.

```properties
## My platform, to be announced to peers.
## Enter your Signum address here for SNR rewards, see here: https://signum.community/signum-snr-awards/
## Enter your Signum address here for SNR rewards, see here: https://wiki.signum.network/signum-snr-awards/
P2P.myPlatform = S-ABCD-EFGH-IJKL-MNOP
```

You can check your node using the [explorer](https://explorer.signum.network/peers/).

## Hardware Requirements

The Signum Node is not hardware demanding nor it needs a fast internet connection.
The specifications for the hardware is as follows:

- Minimum : 1 vCPU, 1 GB RAM, 20 GB HD, Minimum Swapfile 2GB (Linux)
- Recommended : 2 vCPU, 2 GB RAM, 20 GB HD, Minimum Swapfile 4GB (Linux)
- Minimum : 1 vCPU, 1 GB RAM, 20 GB HD, Minimum Swapfile 2GB (Linux)
- Recommended : 2 vCPU, 2 GB RAM, 20 GB HD, Minimum Swapfile 4GB (Linux)

**Tuning options**

If you run the minimum requirement you can turn off the `indirectIncomingService` in the config file to reduce CPU and file usage. By default this parameter is activated.

```properties
## Enable the indirect incoming tracker service. This allows you to see transactions where you are paid
## but are not the direct recipient eg. Multi-Outs.
node.indirectIncomingService.enable = false
```


## Testnet

Starting with the Signum node version 3.3.0 and higher the node is able to handle different chains in a multiverse manner. All parameters for a different chain are set in the code section of the node and can be activated by pointing to the other chain aka universe in the config file.
No additional setting is needed.
No additional setting is needed.

In order to run a testnet node adjust your `conf/node.properties` to:

```properties
## Run with a different network
# Testnet network
Expand All @@ -217,7 +224,7 @@ For a MariaDB setup you need to configure a testnet instance in the config file.

### Private Chains

In order to run a private (local) chain with *mock* mining just select the network:
In order to run a private (local) chain with _mock_ mining just select the network:

```properties
node.network = signum.net.MockNetwork
Expand All @@ -232,8 +239,8 @@ Since Version 3.4.3 the new interactive API documentation based on [OpenAPI Spec

You can access it via `<host>:8125/api-doc` (or `<host>:6876/api-doc` for Testnet respectively).

[Read more about the documentation](/openapi/README.md)
[Read more about the documentation](/openapi/README.md)

# Building from sources

## Building the latest stable release
Expand Down Expand Up @@ -271,12 +278,12 @@ Clone the repository as instructed above and run:

## Updating the Phoenix Wallet

Since V3.0 the Phoenix Wallet is available as built-in alternative to the classic wallet.
Since V3.0 the Phoenix Wallet is available as built-in alternative to the classic wallet.
Within a release of the node software automatically the latest available release of the Phoenix wallet will be applied.
As the Phoenix Wallet is a project apart from this repository the node and wallet software have different
release cycles. Therefore, an additional update script (at this moment only for Linux/MacOS) is provided.

Just run `./update-phoenix.sh`, which is available in the distribution package
Just run `./update-phoenix.sh`, which is available in the distribution package

# Releasing

Expand All @@ -294,13 +301,14 @@ See [DOCKER.md](./docker/DOCKER.md) for information on running and building dock

# Database Development

To get more details about how to work with database changes look at [more detailed docs](./DB_DEV).
To get more details about how to work with database changes look at [more detailed docs](./DB_DEV).

# Developers

Main Developer: [jjos2372](https://github.com/jjos2372). Donation address: [S-JJQS-MMA4-GHB4-4ZNZU](https://explorer.signum.network/?action=account&account=3278233074628313816)

Frequent Contributors:
Frequent Contributors:

- [ohager](https://github.com/ohager). Donation address: [S-9K9L-4CB5-88Y5-F5G4Z](https://explorer.signum.network/?action=account&account=16107620026796983538)
- [damccull](https://github.com/damccull). Donation address: [S-GXBA-7JP9-NR7S-DCQ4V](https://explorer.signum.network/address/13657951110994294056)
- [ipr0310](https://github.com/ipr0310). Donation address: [S-36WQ-GYQN-D856-9DUJH](https://explorer.signum.network/address/8629824288351884182)
Expand All @@ -310,8 +318,8 @@ For more information, see [Credits](doc/Credits.md)

# Appendix

* [Version History](doc/History.md)
- [Version History](doc/History.md)

* [Credits](doc/Credits.md)
- [Credits](doc/Credits.md)

* [References/Links](doc/References.md)
- [References/Links](doc/References.md)

0 comments on commit 0a3c7ab

Please sign in to comment.