Skip to content

Building a decentralized network N42 is building a decentralized network that empowers people and reshapes the future, due to challenges of scalability, fairness, and trust in today’s digital age.

License

Notifications You must be signed in to change notification settings

n42blockchain/N42-go

Repository files navigation

N42 Blockchain

Go GitHub Workflow Status GitHub License GitHub Issues GitHub Pull Requests GitHub Stars GitHub Forks

Introduction

N42 introduces a secure, efficient, and globally interconnected digital ecosystem, empowering developers to build applications with maximum autonomy and interoperability. Designed as a high-performance public blockchain, N42 utilizes Go for its exceptional concurrency, scalability, and ease of deployment, ensuring a robust and highly efficient environment.

With its modular and sharded architecture, N42 provides advanced transaction throughput and data processing capabilities, critical for developing a globally connected digital infrastructure. Its permissionless design facilitates seamless integration and efficient data exchange across diverse application environments, laying the foundation for the next generation of decentralized internet services.

Disclaimer: This software is currently a tech preview. We will do our best to keep it stable and avoid breaking changes, but we make no guarantees.

System Requirements

  • Storage: ≥ 200 GB (SSD or NVMe recommended; HDD not recommended)
  • Memory: ≥ 16 GB RAM
  • CPU: 64-bit architecture
  • Go Version: ≥ 1.19

Building from Source

Linux and macOS

To build N42 from source, you must have the latest version of Go installed.

Clone the repository and compile:

git clone https://github.com/N42world/n42.git
cd n42
make n42
./build/bin/n42

Windows

Windows users may run N42 in three ways:

  • Native binaries: Build using Chocolatey
  • Docker: See docker-compose.yml
  • WSL2 (Windows Subsystem for Linux):
    • Install and build as on Linux
    • Ensure storage is on Linux filesystem for best performance

Docker Container

Docker allows easy building and running without installing dependencies on the host OS.

See: docker-compose.yml, Dockerfile

Convenient Docker commands:

make images # Build Docker images containing N42 binaries
make up     # docker-compose up -d && docker-compose logs -f
make down   # docker-compose down && clean docker data
make start  # docker-compose start && docker-compose logs -f
make stop   # docker-compose stop

Executables

N42 includes one main executable located in the cmd directory:

Command Description
n42 Main CLI client, provides JSON RPC endpoints over HTTP transports. Use n42 --help for options.

Network Ports

Port Protocol Purpose Exposure
61015 UDP Discovery v5 Public
61016 TCP libp2p Communication Public
20012 TCP JSON RPC over HTTP Public
20013 TCP JSON RPC over Websocket Public
20014 TCP Secure JSON RPC (JWT Auth) Authenticated
4000 TCP Blockchain Explorer Public
6060 TCP Metrics & Profiling (pprof) Private

License

N42 is licensed under the GNU General Public License v3.0.

About

Building a decentralized network N42 is building a decentralized network that empowers people and reshapes the future, due to challenges of scalability, fairness, and trust in today’s digital age.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published