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
papyrus
Compiling and running 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
papyrus
with Docker
Running 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 runpapyrus
) 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 alatest
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).
- Top Feature Requests (Add your votes using the
π reaction) - Top Bugs (Add your votes using the
π reaction) - Newest Bugs
Support
Reach out to the maintainer at one of the following places:
- GitHub Discussions
- Contact options listed on this GitHub profile
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.