Skip to content

pantherfoundation/oshiya

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

155 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oshiya

This repository contains the code for the Oshiya component, previously known as the "Panther Miner".

The Oshiya's task is, in exchange for rewards, to append commitments to Unspent Transaction Outputs (UTXOs) to a Merkle Tree of UTXOs maintained on a blockchain by a specialized Smart Contract called the "BusTree".

Oshiya appends UTXOs in batches, of up to 64 UTXOs at once, providing a SNARK-proof that justifies validity of the batch and correctness of the batch insertion.

This efficient process of building the Merkle Tree enhances the performance of the Panther Protocol.

Repository Structure

This repository is structured into code and docs. The code is divided into two main workspaces:

  • SDK Workspace: This workspace houses the miner's core code. For running the miner without a UI, you can use a terminal and Docker. Detailed instructions are available in the SDK Readme file.

  • Web-client Workspace: This workspace contains the code for running the miner in a browser. It includes a basic React-based UI and a web worker running in the background, which becomes operational once the user inputs the necessary configuration data. For deploying your version of the UI, refer to the instructions provided in the web-client Readme file.

Configuration

Both versions of Oshiya require certain configuration settings, which can be defined in a .env file or through the web interface. Here are the necessary configuration parameters:

  • RPC_URL: The URL of the RPC node.
  • SUBGRAPH_ID: The ID of the subgraph.
  • CONTRACT_ADDRESS: The address of the BusTree Smart Contract.
  • GENESIS_BLOCK_NUMBER: block number when the BusTree Smart Contract was deployed.
  • INTERVAL: The time (in seconds) between each successive execution.
  • PRIVATE_KEY: The private key of the wallet that will submit the proofs as a Miner.
  • MIN_REWARD: The minimum reward for a queue to be considered for mining.
  • PROTOCOL_VERSION: The protocol version that the miner will be running against. The value can be either production or canary.

Running both Canary and Production versions simultaneously

  • To run the canary miner, add the canary configuration to a .env.canary file and run the npm script npm run start:canary. NOTE: remember to set the PROTOCOL_VERSION to canary in the .env.canary file.
  • In another terminal, you can run the production miner by adding the production configuration to a .env.production file and run the npm script npm run start:production. NOTE: remember to set the PROTOCOL_VERSION to production in the .env.production file.

Contributing

We appreciate your contributions! If you discover any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. Let's build a stronger Panther ecosystem together!

A community enhancement incentive program is being developed, if this receives approval by the DAO, then submission of the proposed improvements will be rewarded according to the assessment criteria.

Learn More

To learn more about Panther Protocol, visit this repo's documentation, or learn more about the Panther Ecosystem from the public-facing documentation.

License

Panther Miner is licensed under the MIT License. For more details, please see the LICENSE file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors