MCPcopy Index your code
hub / github.com/shardeum/shardeum

github.com/shardeum/shardeum @ITN3.1 sqlite

repository ↗ · DeepWiki ↗ · release ITN3.1 ↗
1,071 symbols 3,008 edges 156 files 226 documented · 21% 22 cross-repo links
README

Shardeum Logo

An EVM-based autoscaling blockchain platform

License Discord Twitter

Table of Contents

Introduction

Shardeum is an innovative EVM-compliant blockchain platform that leverages dynamic state sharding to achieve unprecedented scalability. By implementing a sharding model, Shardeum ensures faster processing times and lower transaction costs without compromising security or decentralization.

Features

  • Scalability: Horizontal scalability through sharding
  • High Performance: Low latency and high throughput
  • Security: Advanced cryptographic techniques and robust consensus protocols
  • Decentralization: Truly decentralized network with no single point of failure
  • Interoperability: EVM compatibility for existing DApps and smart contracts

Getting Started

Prerequisites

  • Node.js (v18.16.1)
  • npm (v9.5.1)
  • Rust (v1.74.1)
  • Docker (optional, for containerized deployment)

Setting Up Your Environment

Shardeum requires specific versions of Nodejs, Rust and other build tools to run.

We have detailed setup instructions in this page

[!IMPORTANT] This is a crucial step, ensure your local environment is correctly set up before proceeding with the next steps

Installation

  1. Clone the repository:
git clone https://github.com/shardeum/shardeum.git
cd shardeum
  1. Install dependencies:
npm ci
  1. Network Configuration:
git apply debug-10-nodes.patch

Learn more about the different config options here

  1. Compile project
npm run prepare
  1. Install the Shardus CLI:
npm install -g shardus
npm update @shardus/archiver

Running the Network Locally

To start a local Shardeum network with 10 nodes, run:

shardus start 10

Running the JSON-RPC Server

  1. Clone the JSON-RPC server repository:
git clone https://github.com/shardeum/json-rpc-server.git
cd json-rpc-server
npm install
  1. Start the server:
npm run start

The default RPC URL is http://localhost:8080.

Testing with MetaMask

To test your local Shardeum network using MetaMask:

  1. Install the MetaMask extension.
  2. Add the Shardeum network to MetaMask:

  3. Network Name: Shardeum

  4. RPC URL: http://localhost:8080
  5. Chain ID: 8082
  6. Currency Symbol: SHM
  7. Block Explorer URL: http://localhost:6001/

  8. Obtaining Test Tokens and Configuring the Genesis File: To receive SHM tokens for testing on your local Shardeum network, you need to add your wallet address to the src/config/genesis.json file. Open this file in a text editor and add an entry for your wallet address with the desired SHM balance like this:

"YOUR-WALLET-ADDRESS": {
    "wei": "200000000000000000000000000"
},

Stopping and Cleaning Up

To stop the network and clean up resources:

shardus stop && shardus clean && rm -rf instances

Health Checks

Diagnostic endpoints to check the health of the node

  • GET /is-alive this endpoint returns 200 if the server is running.
  • GET /is-healthy currently the same as /is-alive but will be expanded.

Contributing

We welcome contributions! Please see our Contribution Guidelines for more information. All contributors are expected to adhere to our Code of Conduct.

Community

License

This project is licensed under the MIT License. See the LICENSE file for details.

Extension points exported contracts — how you extend this code

EVMRunOpts (Interface)
* Base options for the `EVM.runCode()` / `EVM.runCall()` method.
src/evm_v2/types.ts
DependenciesVersions (Interface)
(no doc)
src/index.ts
NodeAccount (Interface)
(no doc)
src/types/NodeAccount.ts
LoadOptions (Interface)
(no doc)
src/shardeum/debugRestoreAccounts.ts
BaseTxReceipt (Interface)
(no doc)
src/vm_v7/types.ts
ShardeumStorageCallbacks (Interface)
(no doc)
src/state/transactionState.ts
Sqlite3Storage (Interface)
(no doc)
src/storage/sqlite3storage.ts
ShardeumStorageCallbacks (Interface)
(no doc)
src/debug/state/transactionState.ts

Core symbols most depended-on inside this repo

log
called by 672
src/evm_v2/interpreter.ts
toString
called by 205
src/debug/trace/traceDataFactory.ts
push
called by 194
src/evm_v2/stack.ts
set
called by 132
src/utils/ContinuationLocalStorage.ts
get
called by 125
src/evm_v2/types.ts
getAccount
called by 52
src/state/shardeumState.ts
add
called by 49
src/vm_v7/bloom/index.ts
toShardusAddress
called by 48
src/shardeum/evmAddress.ts

Shape

Function 454
Method 424
Interface 119
Class 62
Enum 12

Languages

TypeScript100%

Modules by API surface

src/index.ts104 symbols
src/evm_v2/interpreter.ts60 symbols
src/shardeum/shardeumTypes.ts52 symbols
src/state/shardeumState.ts45 symbols
src/debug/state/shardeumState.ts45 symbols
src/utils/serialization/VectorBufferStream.ts35 symbols
src/state/transactionState.ts34 symbols
src/debug/state/transactionState.ts33 symbols
src/storage/sqlite3storage.ts28 symbols
src/evm_v2/evm.ts28 symbols
src/evm_v2/types.ts26 symbols
src/storage/storage.ts19 symbols

Dependencies from manifests, versioned

@ethereumjs/block5.0.0 · 1×
@ethereumjs/common4.0.0 · 1×
@ethereumjs/evm2.0.0 · 1×
@ethereumjs/rlp5.0.0 · 1×
@ethereumjs/statemanager2.0.0 · 1×
@ethereumjs/trie6.0.0 · 1×
@ethereumjs/tx5.0.0 · 1×
@ethereumjs/util9.0.0 · 1×
@ethereumjs/vm7.0.0 · 1×
@mapbox/node-pre-gyp1.0.10 · 1×
@shardus/archiver3.5.6 · 1×

For agents

$ claude mcp add shardeum \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact