Skip to content

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13,734 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DecentralChain Node (node-scala)

DecentralChain is an open-source blockchain platform forked from Dcc 1.6.x. This repository (node-scala) is the Scala-based full node for the DecentralChain network, featuring the RIDE smart contract language.

Overview

The DecentralChain node connects to the blockchain network and provides:

  • Processing and validation of transactions
  • Generation and storage of blocks
  • Network communication with other nodes
  • REST API (compatible with Dcc API)
  • Extensions management

Getting started

Prerequisites:

  • Java 25 JDK — Eclipse Temurin 25 recommended
  • A network configuration file: node/decentralchain-testnet.conf joins the DCC testnet; node/decentralchain-sample.conf documents every option.

Linux:

# Install Eclipse Temurin 25 (recommended)
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo apt-key add -
echo "deb https://packages.adoptium.net/artifactory/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/adoptium.list
sudo apt-get update && sudo apt-get install -y temurin-25-jdk

Mac (with Homebrew):

brew install --cask temurin@25

Build and run from source (Linux / macOS / Windows with Temurin 25):

sbt node/Universal/packageZipTarball
tar xzf node/target/universal/decentralchain-*.tgz -C /tmp
/tmp/decentralchain-*/bin/node node/decentralchain-testnet.conf

Or with Docker:

docker run -d --name dcc-node -v "$PWD/node/decentralchain-testnet.conf:/etc/dcc/dcc.conf" -p 6868:6868 ghcr.io/decentral-america/node-scala:1.8.3

Configuration

Network-specific default configurations are available in network-defaults.conf.

Development

The node can be built and installed wherever Java can run.

Setup the environment

# Ubuntu — Eclipse Temurin 25 JDK
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo apt-key add -
echo "deb https://packages.adoptium.net/artifactory/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/adoptium.list
sudo apt-get update && sudo apt-get install -y temurin-25-jdk
# or
# brew install --cask temurin@25                        # Mac

Install SBT (Scala Build Tool) for your platform: Linux | Mac | Windows

Clone this repo

git clone https://github.com/Decentral-America/node-scala.git
cd node-scala

Compile and run tests

sbt checkPR

Run integration tests (optional)

sbt node-it/docker
sbt -Ddcc.it.max-parallel-suites=1 node-it/test

Build packages

sbt packageAll                   # Mainnet
sbt -Dnetwork=testnet packageAll # Testnet

Install DEB package

sudo dpkg -i node/target/*.deb

Configure IntelliJ IDEA (optional)

  1. Click Add configuration (or Edit configurations...).
  2. Click + to add a new configuration, choose Application.
  3. Specify:
    • Main class: com.decentralchain.Application
    • Program arguments: /path/to/configuration
    • Use classpath of module: extension-module
  4. Click OK.
  5. Run this configuration.

Contributing

Fork the repository and use a feature branch. Pull requests are welcome.

For major changes, please open an issue first. Please follow the code of conduct.

Links

Licence

The code in this project is licensed under MIT license. This project contains a GPL-3.0-only dependency (io.decentralchain:curve25519); distributions that include it are a combined work under GPL-3.0. See THIRD_PARTY_NOTICES.md

Acknowledgements

We use YourKit full-featured Java Profiler to make the DecentralChain node faster. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications.

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages