Giter VIP home page Giter VIP logo

x-oss-byte-_-juno's Introduction

Juno Logo

Juno is a golang Starknet node implementation by Nethermind with the aim of decentralising Starknet.

⚙️ Installation

Prerequisites

  • Golang 1.20 or higher is required to build and run the project. You can find the installer on the official Golang download page.
  • Rust.
  • A C compiler: gcc or clang.

Build and Run

make juno
./build/juno

Use the --help flag for configuration information. Flags and their values can also be placed in a .yaml file that is passed in through --config.

Run with Docker

To run Juno with Docker, use the following command. Make sure to create the $HOME/juno directory on your local machine before running the command.

docker run -d \
  --name juno \
  -p 6060:6060 \
  -v $HOME/juno:/var/lib/juno \
  nethermind/juno \
  --http \
  --http-port 6060 \
  --db-path /var/lib/juno \
  --eth-node <YOUR-ETH-NODE>

You should replace <YOUR-ETH-NODE> with your actual Ethereum node address. If you're using Infura, your Ethereum node address might look something like: wss://mainnet.infura.io/ws/v3/your-infura-project-id. Make sure you are using the websocket URL ws/wss and not the http URL http/https.

To view logs from the Docker container, use the following command:

docker logs -f juno

📸 Snapshots

Use the provided snapshots to quickly sync your Juno node with the current state of the network.

Mainnet

Version Size Block Download Link
>=v0.6.0 49.2 GB 166353.tar juno_mainnet_166353.tar

Goerli

Version Size Block Download Link
>=v0.6.0 36 GB 850192 juno_goerli_850192.tar

Goerli2

Version Size Block Download Link
>=v0.6.0 4.6 GB 139043 juno_goerli2_135973.tar

Run Juno Using Snapshot

  1. Download Snapshot

    Fetch the snapshot from the provided URL:

    curl -o juno_mainnet_166353.tar https://juno-snapshot.s3.us-east-2.amazonaws.com/mainnet/juno_mainnet_v0.6.0_166353.tar
  2. Prepare Directory

    Ensure you have a directory at $HOME/snapshots. If it doesn't exist yet, create it:

    mkdir -p $HOME/snapshots
  3. Extract Tarball

    Extract the contents of the .tar file:

    tar -xvf juno_mainnet_166353.tar -C $HOME/snapshots
  4. Run Juno

    Execute the Docker command to run Juno, ensuring that you're using the correct snapshot path $HOME/snapshots/juno_mainnet:

    docker run -d \
      --name juno \
      -p 6060:6060 \
      -v $HOME/snapshots/juno_mainnet:/var/lib/juno \
      nethermind/juno \
      --http \
      --http-port 6060 \
      --db-path /var/lib/juno \
      --eth-node <YOUR-ETH-NODE>

After following these steps, Juno should be up and running on your machine, utilizing the provided snapshot.

✔ Supported Features

  • Starknet v0.12.1 support.

  • JSON-RPC v0.4.0:

    • starknet_chainId
    • starknet_blockNumber
    • starknet_blockHashAndNumber
    • starknet_getBlockWithTxHashes
    • starknet_getBlockWithTxs
    • starknet_getTransactionByHash
    • starknet_getTransactionReceipt
    • starknet_getBlockTransactionCount
    • starknet_getTransactionByBlockIdAndIndex
    • starknet_getStateUpdate
    • starknet_getNonce
    • starknet_getStorageAt
    • starknet_getClassHashAt
    • starknet_getClass
    • starknet_getClassAt
    • starknet_syncing
    • starknet_getEvents
    • starknet_call
    • starknet_estimateFee
    • starknet_addInvokeTransaction
    • starknet_addDeclareTransaction
    • starknet_addDeployAccountTransaction
    • starkent_estimateMessageFee
    • starknet_pendingTransactions
    • starknet_traceTransaction
    • starknet_traceBlockTransactions
    • starknet_simulateTransactions
  • Juno's JSON-RPC:

    • juno_version
    • juno_getTransactionStatus
  • Integration of CairoVM.

  • Verification of State from L1.

  • Handle L1 and L2 Reorgs.

  • Starknet state construction and storage using a path-based Merkle Patricia trie.

  • Feeder gateway synchronisation of Blocks, Transactions, Receipts, State Updates and Classes.

  • Block and Transaction hash verification.

🛣 Roadmap

Phase 1

  • Flat DB implementation of trie
  • Go implementation of crypto primitives
    • Pedersen hash
    • Starknet_Keccak
    • Felt
  • Feeder gateway synchronisation
    • State Update
    • Blocks
    • Transactions
    • Class
  • Implement the following core data structures, and their Hash calculations
    • Blocks
    • Transactions and Transaction Receipts
    • Contracts and Classes
  • Storing blocks, transactions and State updates in a local DB
  • Basic RPC (in progress)
    • starknet_chainId
    • starknet_blockNumber
    • starknet_blockHashAndNumber
    • starknet_getBlockWithTxHashes
    • starknet_getBlockWithTxs
    • starknet_getTransactionByHash
    • starknet_getTransactionReceipt
    • starknet_getBlockTransactionCount
    • starknet_getTransactionByBlockIdAndIndex
    • starknet_getStateUpdate

Phase 2

The focus of Phase 2 will be to Verify the state from layer 1 and implement the remaining JSON-RPC endpoints.

  • Starknet v0.11.0 support
    • Poseidon state trie support
  • Blockchain: implement blockchain reorganization logic.
  • Synchronisation: implement verification of state from layer 1.
  • JSON-RPC API v0.3.0:
    • Implement the remaining endpoints:
      • starknet_syncing
      • starknet_getNonce
      • starknet_getStorageAt
      • starknet_getClassHashAt
      • starknet_getClass
      • starknet_getClassAt
      • starknet_getEvents
  • Integration of CairoVM:
    • starknet_call
    • starknet_estimateFee
  • JSON-RPC Write API v0.3.0:
    • starknet_addInvokeTransaction
    • starknet_addDeclareTransaction
    • starknet_addDeployAccountTransaction

👍 Contribute

We welcome PRs from external contributors and would love to help you get up to speed. Let us know you're interested in the Discord server and we can discuss good first issues. There are also many other ways to contribute. Here are some ideas:

  • Run a node.
  • Add a GitHub Star to the project.
  • Tweet about Juno.
  • Add a Github issue if you find a bug, or you need or want a new feature.

🤝 Partnerships

To establish a partnership with the Juno team, or if you have any suggestion or special request, feel free to reach us via email.

⚠️ License

Copyright (c) 2022-present, with the following contributors.

Juno is open-source software licensed under the Apache-2.0 License.

x-oss-byte-_-juno's People

Contributors

adriantpaez avatar aminsato avatar anshulforyou avatar antid2ta avatar asdacap avatar atoo35 avatar ayushm2003 avatar boda805 avatar brivan-26 avatar d-depablos avatar dependabot[bot] avatar devenmatthews avatar edgarbarrantes avatar exca-dk avatar irongauntlets avatar jelilat avatar jmederosalvarado avatar joshklop avatar k-xo avatar kirugan avatar liusanchuan avatar omerfirmak avatar rianhughes avatar smishy05 avatar stdevmac avatar tkstanczak avatar tserg avatar tshakalekholoane avatar v4lproik avatar wojciechos avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.