/papyrus

Papyrus is a StarkNet full node written in Rust.

Primary LanguageRustApache License 2.0Apache-2.0

Papyrus


Report a Bug · Request a Feature · Ask a Question

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.:construction: :warning:

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

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

Note:

  • 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.

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.