• Stars
    star
    309
  • Rank 135,306 (Top 3 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 2 years ago
  • Updated 25 days ago

Reviews

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

Repository Details

Papyrus is a StarkNet full node written in Rust.

GitHub Workflow Status Project license Pull Requests welcome

Table of Contents

โš ๏ธ Disclaimer

โš ๏ธ ๐Ÿšง Papyrus is still being built therefore breaking changes might happen often so use it at your own risks.๐Ÿšง โš ๏ธ

About

Papyrus is a StarkNet full node written in Rust.

Getting Started

Compiling and running papyrus

Prerequisites

You can build and run a papyrus node with the default configuration by running:

mkdir data
cargo run --release --package papyrus_node --bin papyrus_node

Configuration

Papyrus supports configuration from command-line arguments and a configuration yaml file. In case both are provided, the command-line arguments take precedence. The default path for the configuration file is config/config.yaml. You can override this path using the --config_file command-line argument. See the default configuration file for available options. Note that the configuration file can be partial or even empty. You can check the available command-line arguments by running:

cargo run --release --package papyrus_node --bin papyrus_node -- --help

Running papyrus with Docker

Prerequisites

Command line

You can run a papyrus node with the default configuration by running:

docker run --rm --name papyrus\
  -p 8080-8081:8080-8081 \
  -v <local-host-data-path>:/app/data \
  ghcr.io/starkware-libs/papyrus:dev

Notes

  • The container must have write access to <local-host-data-path>. A possible way to assure this is to create the <local-host-data-path> directory (only the first time you run papyrus) and add --user "$(id -u):$(id -g)" to the docker run command.
  • You must include the dev tag which keeps track of our development branch and contains the most up-to-date code. Once we have official releases we will add a latest tag for the latest release.
  • Currently, there is no automatic upgrade mechanism. Make sure to periodically pull the latest image and re-run the node.

Memory usage

The Papyrus node will use all the RAM it can in order to cache the storage.

If you're not running any other applications on your machine, this is the recommended behavior.

Otherwise, you can limit the node's memory usage by running it in a container with a limited memory. Note that it might make the node less efficient as it will decrease the caching of the storage.

This can be done by adding the flag --memory 1g (For a 1GB limitation) to the command in the Docker section. The full command should be

docker run --rm --name papyrus\
  -p 8080-8081:8080-8081 \
  -v <local-host-data-path>:/app/data \
  --memory <memory-limit>
  ghcr.io/starkware-libs/papyrus:dev

For more information, see Docker's documentation.

Endpoints

Endpoint Supported
starknet_addDeclareTransaction โŒ
starknet_addDeployAccountTransaction โŒ
starknet_addInvokeTransaction โŒ
starknet_blockHashAndNumber โœ”๏ธ
starknet_blockNumber โœ”๏ธ
starknet_call โŒ
starknet_chainId โœ”๏ธ
starknet_estimateFee โŒ
starknet_getBlockTransactionCount โœ”๏ธ
starknet_getBlockWithTxHashes โœ”๏ธ
starknet_getBlockWithTxs โœ”๏ธ
starknet_getClass โœ”๏ธ
starknet_getClassAt โœ”๏ธ
starknet_getClassHashAt โœ”๏ธ
starknet_getEvents โœ”๏ธ
starknet_getNonce โœ”๏ธ
starknet_getStateUpdate โœ”๏ธ
starknet_getStorageAt โœ”๏ธ
starknet_getTransactionByBlockIdAndIndex โœ”๏ธ
starknet_getTransactionByHash โœ”๏ธ
starknet_getTransactionReceipt โœ”๏ธ
starknet_pendingTransactions โŒ
starknet_syncing โŒ

Roadmap

See the open issues for a list of proposed features (and known issues).

Support

Reach out to the maintainer at one of the following places:

Project assistance

If you want to say thank you or/and support active development of Papyrus:

  • Add a GitHub Star to the project.
  • Tweet about the Papyrus.
  • Write interesting articles about the project on Dev.to, Medium or your personal blog.

Together, we can make Papyrus better!

Contributing

First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

Please read our contribution guidelines, and thank you for being involved!

Authors & contributors

For a full list of all authors and contributors, see the contributors page.

Security

Papyrus follows good practices of security, but 100% security cannot be assured. Papyrus is provided "as is" without any warranty. Use at your own risk.

For more information and to report security issues, please refer to our security documentation.

License

This project is licensed under the Apache 2.0 license.

See LICENSE for more information.

More Repositories

1

cairo

Cairo is the first Turing-complete language for creating provable programs for general computation.
Rust
1,586
star
2

cairo-lang

Python
1,342
star
3

starkex-contracts

Solidity
276
star
4

stone-prover

C++
255
star
5

stwo

Rust
237
star
6

ethSTARK

C++
223
star
7

blockifier

Blockifier is a Rust implementation for the transaction-executing component in the StarkNet sequencer, in charge of creating state diffs and blocks.
Rust
170
star
8

starknet-specs

JavaScript
92
star
9

starkex-resources

Python
82
star
10

veedo

Solidity
77
star
11

starknet-staking

starknet-staking
Cairo
72
star
12

starkgate-frontend

Bridge interface allows users to transfer ERC20 tokens from Ethereum to StarkNet and vice versa.
JavaScript
63
star
13

starknet-api

Rust
59
star
14

starkware-crypto-utils

Signatures, keys and Pedersen hash on STARK friendly elliptic curve
TypeScript
54
star
15

formal-proofs

Lean
52
star
16

stark-perpetual

Cairo
49
star
17

starkgate-contracts

Python
35
star
18

crypto-cpp

C++
32
star
19

starkex-js

JavaScript SDK for StarkEx
TypeScript
28
star
20

starkex-for-spot-trading

Cairo
24
star
21

cairo-examples

Shell
24
star
22

stwo-cairo

Cairo
23
star
23

sequencer

Rust
23
star
24

starkex-core

21
star
25

mempool

Rust
14
star
26

starkex-data-availability-committee

Python
9
star
27

tree-sitter-cairo

JavaScript
7
star
28

starknet-snap

HTML
7
star
29

StarkNet-AllCoreDevs-Meetings

6
star
30

starkex-apps-api

6
star
31

starkex-playground

Python
6
star
32

okx-config

6
star
33

cairo-playground

Playground environment for those who want to learn and get to know Cairo language better.
JavaScript
5
star
34

davion-config

DavionLabs Perpetual StarkEx Configuration
4
star
35

starkex-resources-wip

Python
4
star
36

starknet-tutorials-erc20

3
star
37

starknet-addresses

3
star
38

starknet-tutorials-global

2
star
39

committer

Rust
2
star
40

stwo-air-schema

Shell
2
star
41

starknet-tutorials-erc721

2
star
42

dydx-config

2
star
43

starknet-tutorials-cairo-syntax

2
star
44

gammax-config

GammaX Perpetual StarkEx Configuration
2
star
45

starknet-tutorials-utils

1
star
46

x10-config

1
star
47

karpenter

1
star