• Stars
    star
    917
  • Rank 49,806 (Top 1.0 %)
  • Language
    Go
  • License
    GNU General Publi...
  • Created about 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚡ The official implementation of the MultiversX blockchain protocol, written in golang.
MultiversX

Go Report Card codecov Contributors

mx-chain-go

The go implementation for the MultiversX protocol

Installation and running

In order to join the network as an observer or as a validator, the required steps to build from source and setup explicitly are explained below.

Step 1: install & configure go:

The installation of go should proceed as shown in official golang installation guide https://golang.org/doc/install . In order to run the node, minimum golang version should be 1.17.6.

Step 2: clone the repository and build the binaries:

The main branch that will be used is the master branch. Alternatively, an older release tag can be used.

# set $GOPATH if not set and export to ~/.profile along with Go binary path
$ if [[ $GOPATH=="" ]]; then GOPATH="$HOME/go" fi
$ mkdir -p $GOPATH/src/github.com/multiversx
$ cd $GOPATH/src/github.com/multiversx
$ git clone https://github.com/multiversx/mx-chain-go
$ cd mx-chain-go && git checkout master
$ cd cmd/node && go build

The node depends on the Wasm Virtual Machine, which is automatically managed by the node.

Step 3: creating the node’s identity:

In order to be registered in the MultiversX Network, a node must possess 2 types of (secret key, public key) pairs. One is used to identify the node’s credential used to generate transactions (having the sender field its account address) and the other is used in the process of the block signing. Please note that this is a preliminary mechanism, in the next releases the first (private, public key) pair will be dropped when the staking mechanism will be fully implemented. To build and run the keygenerator, the following commands will need to be run:

$ cd $GOPATH/src/github.com/multiversx/mx-chain-go/cmd/keygenerator
$ go build
$ ./keygenerator

Start the node

Step 4a: Join MultiversX testnet:

Follow the steps outlined here. This is because in order to join the testnet you need a specific node configuration.


OR


Step 4b: copying credentials and starting a node in a separate network:

The previous generated .pem file needs to be copied in the same directory where the node binary resides in order to start the node.

$  cp validatorKey.pem ./../node/config/
$  cd ../node && ./node

The node binary has some flags defined (for a brief description, the user can use --help flag). Those flags can be used to directly alter the configuration values defined in .toml/.json files and can be used when launching more than one instance of the binary.

Running the tests

$ go test ./...	

Compiling new fields in .proto files (should be updated when required PR will be merged in gogo protobuf master branch):

  1. Download protoc compiler: https://github.com/protocolbuffers/protobuf/releases (if you are running under linux on a x64 you might want to download protoc-3.11.4-linux-x86_64.zip)
  2. Expand archive, copy the /include/google folder in /usr/include using
    sudo cp -r google /usr/include
  3. Copy bin/protoc using
    sudo cp protoc /usr/bin
  4. Fetch the repo github.com/multiversx/protobuf
  5. Compile gogo slick & copy binary using
cd protoc-gen-gogoslick
go build
sudo cp protoc-gen-gogoslick /usr/bin/

Done

Progress

Done

  • Cryptography
    • Schnorr Signature
    • Belare-Neven Signature
    • BLS Signature
    • Modified BLS Multi-signature
  • Datastructures
    • Transaction
    • Block
    • Account
    • Trie
  • Execution
    • Transaction
    • Block
    • State update
    • Synchronization
    • Shard Fork choice
  • Peer2Peer - libp2p
  • Consensus - SPoS
  • Sharding - fixed number
    • Transaction dispatcher
    • Transaction
    • State
    • Network - Message dispatching
  • MetaChain
    • Data Structures
    • Block Processor
    • Interceptors/Resolvers
    • Consensus
  • Block K finality scheme
  • VM - K-Framework
    • K Framework go backend
    • IELE Core
    • IELE Core tests
    • IELE Adapter
  • Smart Contracts on a Sharded Architecture
    • Concept reviewed
    • VM integration
    • SC Deployment
  • Governance
    • Concept reviewed
  • Economics
    • Concept reviewed
  • Optimizations
    • Randomness
    • Consensus
  • Bootstrap from storage
  • Testing
    • Unit tests
    • Integration tests
    • TeamCity continuous integration
    • Manual testing
  • Epochs
    • Nodes dispatcher (shuffling)
  • Network sharding
    • Optimized wiring protocol
  • VM
    • EVM Core
    • EVM Core tests
    • EVM Adapter
  • Fee structure
  • Smart Contracts on a Sharded Architecture
    • Async callbacks
  • Testing
    • Automate tests with AWS
    • Nodes Monitoring
  • DEX integration

In progress

  • Smart Contracts on a Sharded Architecture
    • Dependency checker + SC migration
    • Storage rent + SC backup & restore
  • Adaptive State Sharding
    • Splitting
    • Merging
    • Redundancy
  • Privacy
  • Interoperability
  • Optimizations
    • Smart Contract
  • Governance
    • SC for ERD IP
    • Enforced Upgrade mechanism for voted ERD IP
  • Bugfixing

Contribution

Thank you for considering to help out with the source code! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes to MultiversX!

If you'd like to contribute to MultiversX, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base. If you wish to submit more complex changes though, please check up with the core developers first here on GitHub, to ensure those changes are in line with the general philosophy of the project and/or get some early feedback which can make both your efforts much lighter as well as our review and merge procedures quick and simple.

Please make sure your contributions adhere to our coding guidelines:

  • Code must adhere to the official Go formatting guidelines.
  • Code must be documented adhering to the official Go commentary guidelines.
  • Pull requests need to be based on and opened against the master branch.
  • Commit messages should be prefixed with the package(s) they modify.
    • E.g. "outport/process: fixed a typo"

Please see the documentation for more details on the MultiversX protocol.

More Repositories

1

mx-sdk-rs

🦀 MultiversX tool pack in Rust. Contains: a smart contract framework; a complete smart contract build solution; a large collection of example smart contracts; a testing framework and debugger that include a VM model; various other tools.
Rust
170
star
2

mx-deprecated-sdk-monorepo

🛠 This was the original monorepo of Elrond SDK. In May 2021, this repository has been split into multiple repositories, one for each SDK.
129
star
3

mx-exchange-sc

Smart contracts for a decentralized exchange written in Rust
Rust
81
star
4

mx-chain-vm-go

The Virtual Machine for executing WASM Smart Contracts on the MultiversX blockchain. Based on Wasmer, but in principle also supports any other executing engine.
Go
72
star
5

mx-ide-vscode

💻 VS Code extension for developing MultiversX Smart Contracts - Rust, C and C++.
TypeScript
70
star
6

mx-sdk-dapp

A library that holds the core functional logic of a dapp on the MultiversX
TypeScript
66
star
7

mx-template-dapp

TypeScript
62
star
8

mx-sdk-js-core

MultiversX JS Command Line Tools and SDK for interacting with the MultiversX blockchain (in general) and Smart Contracts (in particular).
TypeScript
47
star
9

mx-assets

This repository holds a list of whitelisted tokens in the MultiversX web tools. A whitelisted token can have website and socials URLs, a logo or a description, that will be displayed on MultiversX products, such as the MultiversX Explorer & Web Wallet and xPortal App.
45
star
10

mx-chain-proxy-go

🐙 MultiversX Proxy: The official implementation of the web proxy for the MultiversX blockchain. An intermediary that abstracts away the complexity of sharding, through a friendly HTTP API.
Go
45
star
11

mx-deprecated-starter-dapp

TypeScript
43
star
12

mx-specs

MultiversX specs documentation.
33
star
13

mx-sdk-py-cli

Python Command Line Tools and SDK for interacting with the MultiversX blockchain and dApps.
Python
30
star
14

mx-api-service

Unified REST API facade for providing data related to the MultiversX blockchain
TypeScript
30
star
15

mx-nft-marketplace-sc

Smart contract for ESDT NFT Marketplace
Rust
22
star
16

mx-sdk-py-transaction-decoder

Python
20
star
17

mx-bridge-eth-sc-rs

Smart contracts on the MultiversX side for cross-chain bridge
Rust
19
star
18

mx-deprecated-node-prototype

Elrond Node (Prototype / PoC)
Java
19
star
19

mx-docs

JavaScript
16
star
20

mx-sdk-go

MultiversX GO SDK for interacting with the MultiversX blockchain (in general) and Smart Contracts (in particular).
Go
16
star
21

mx-chain-mainnet-config

MultiversX blockchain node's mainnet configuration repository
Shell
15
star
22

mx-deprecated-sc-examples-clang

MultiversX smart contract examples, in C. Mostly for testing purposes, use Rust instead.
C
15
star
23

mx-battleofyields-site

15
star
24

mx-nft-service

Unified GraphQL for providing information regarding nfts in MultiversX Blockchain and indexing auctions on different marketplaces
TypeScript
12
star
25

mx-ping-pong-sc

Rust
12
star
26

mx-chainlink-sc

Chainlink smart contracts for the MultiversX ecosystem
Rust
12
star
27

mx-vm-iele

VM code, VM tests, and adapters to the MultiversX blockchain node. Not currently in use.
Go
11
star
28

mx-deprecated-core-js

🔐 Lightweight Javascript library to generate accounts and sign transactions for the Elrond Network
JavaScript
11
star
29

mx-sdk-java

MultiversX SDK for interacting with the MultiversX blockchain (in general) and Smart Contracts (in particular).
Java
11
star
30

mx-exchange-service

Decentralized Exchange Service based on GraphQL
TypeScript
11
star
31

mx-chain-observing-squad

Docker images and scripts for setting up an MultiversX Observing Squad
Shell
11
star
32

mx-sdk-nestjs

TypeScript
10
star
33

mx-delegation-sc

Smart contract for managing the legacy staking delegation in MultiversX.
Rust
10
star
34

mx-template-service

TypeScript
10
star
35

mx-bridge-eth-sc-sol

Smart contracts on the Ethereum side for cross-chain bridge
JavaScript
9
star
36

mx-sdk-csharp

MultiversX C# SDK for interacting with the MultiversX blockchain (in general) and Smart Contracts (in particular).
C#
9
star
37

mx-dns-sc

MultiversX DNS smart contract, written in Rust
Rust
9
star
38

mx-nft-collection-minter-sc

Rust
8
star
39

mx-sdk-kotlin

MultiversX kotlin SDK for interacting with the MultiversX blockchain (in general) and Smart Contracts (in particular).
Kotlin
8
star
40

mx-sdk-js-examples

Examples of using erdjs and its satellite packages.
JavaScript
8
star
41

mx-chain-es-indexer-go

The default elastic search indexer module for the mx-chain-go node written in golang
Go
8
star
42

mx-deprecated-wallet-prototype

Elrond Wallet (Prototype / PoC)
HTML
8
star
43

mx-bridge-eth-go

The MultiversX bridge to Ethereum-based chains relayer implementation
Go
8
star
44

mx-chain-vm-common-go

Common structs between VM and node
Go
7
star
45

mx-lend-sc

Rust
7
star
46

mx-template-dapp-nextjs

TypeScript
7
star
47

mx-sdk-cpp

MultiversX C++ Command Line Tools and SDK for interacting with the MultiversX blockchain (in general) and Smart Contracts (in particular).
C++
7
star
48

mx-chain-core-go

mx-chain-go common packages and high level definitions
Go
7
star
49

mx-ledger-nano

MultiversX app for the Ledger Nano S
C
7
star
50

mx-sdk-js-exchange

Utility packages for XExchange interactions
TypeScript
6
star
51

mx-stablecoin-sc

Smart contracts for an over-collateralized stablecoin
Rust
6
star
52

mx-busd-sc

BUSD stablecoin smart contract implementation and tests
Rust
6
star
53

mx-delegation-dapp

TypeScript
6
star
54

mx-polynetwork-bridge-sc

Rust
5
star
55

mx-sdk-js-network-providers

Network Provider (API, Gateway) components (compatible with erdjs).
TypeScript
5
star
56

mx-contracts-rs

MultiversX Rust Smart Contracts
Rust
5
star
57

mx-ping-pong-service-old

TypeScript
4
star
58

mx-chain-testnet-config

MultiversX blockchain node's testnet configuration repository
Shell
4
star
59

mx-distribution-sc

Rust Smart Contract used to distribute ESDT tokens. Used for MEX distribution.
Rust
4
star
60

mx-utils-dapp

TypeScript
4
star
61

mx-sc-actions

Github actions for smart contracts
4
star
62

mx-sdk-js-legacy-native-auth

TypeScript
4
star
63

mx-savings-account-sc

Rust
4
star
64

mx-liquid-staking-sc

Rust
4
star
65

mx-chain-notifier-go

MultiversX notifier driver for events broadcasting
Go
4
star
66

mx-sdk-js-wallet

Core wallet components (generation, signing) for TypeScript (JavaScript).
TypeScript
4
star
67

mx-sdk-py-exchange

Python utility toolkit for xExchange interactions
Python
4
star
68

mx-chain-vm-v1_4-go

Legacy repository for WASM-VM v1.4
Go
4
star
69

mx-deprecated-dapp-core-components

The UI components have been moved to the dapp-core library. Please check https://github.com/ElrondNetwork/dapp-core for more info
TypeScript
4
star
70

mx-sdk-js-wallet-http

Lighweight HTTP utility to generate accounts and sign transactions for the MultiversX blockchain
JavaScript
3
star
71

mx-band-bridge-sc

Band bridge smart contracts for the MultiversX ecosystem
Rust
3
star
72

mx-dex-screener-adapter-service

TypeScript
3
star
73

mx-chain-deploy-go

MultiversX Deployment Tools
Go
3
star
74

mx-chain-devnet-config

MultiversX blockchain node's devnet configuration repository
Shell
3
star
75

mx-vm-executor-rs

VM wasmer 2.2 executor + specialized C API to be used from Go
Rust
3
star
76

mx-sdk-transaction-processor

TypeScript
3
star
77

mx-attestation-sc

General attestation contract written in rust
C
3
star
78

mx-chain-scripts

Shell
3
star
79

mx-sdk-js-wallet-connect-provider

Signing provider for dApps: Wallet Connect.
TypeScript
3
star
80

mx-oracles-go

MultiversX oracle system
Go
3
star
81

mx-sdk-js-native-auth-client

TypeScript
3
star
82

mx-nft-verify-dapp

Quickly and easily verify user ownership of authentic NFTs from any collection.
TypeScript
3
star
83

mx-pre-staking-sc

Phase 1 - Staking rewards
JavaScript
3
star
84

mx-multisig-dapp

TypeScript
2
star
85

mx-bitswing-sc

BitSwing smart contract by Band Protocol
Rust
2
star
86

mx-exchange-tools-sc

Rust
2
star
87

mx-chain-chainwalkers

Go
2
star
88

mx-sdk-js-pem-generator

JavaScript
2
star
89

mx-chain-chainlink-scripts

Shell
2
star
90

mx-template-monorepo-service

TypeScript
2
star
91

mx-delegation-service

TypeScript
2
star
92

mx-sdk-php

MultiversX PHP SDK for interacting with the MultiversX blockchain (in general) and Smart Contracts (in particular).
2
star
93

mx-chain-logger-go

MultiversX logger subsystem, written in Go
Go
2
star
94

mx-chain-vm-v1_2-go

Legacy repository for WASM-VM v1.2
Go
2
star
95

mx-metabonding-sc

Rust
2
star
96

mx-template-sc

MultiversX Smart Contract template
TypeScript
2
star
97

mx-sdk-py-wallet

Wallet components of sdk-py.
Python
1
star
98

mx-sdk-py-core

Core components of sdk-py.
Python
1
star
99

axelar-mvx-relayer

TypeScript
1
star
100

mx-components-big-int

A library for allocating and operating with Go big ints in a more controlled way
Go
1
star