Code Monkey home page Code Monkey logo

reddit-scaling-demo's Introduction

Solana

Reddit Demo

Source for Solana Reddit demo, which uses the solana token program to run the Reddit benchmark challenge. This is a fork of the solana-program-library repo.

Build the token program

These programs cannot be built directly via cargo and instead require the build scripts located in Solana's BPF-SDK.

Download or update the BPF-SDK by running:

$ ./do.sh update

Build the token program:

$ ./do.sh build <program>

Running the token demo

Set the RPC_URL environment variable to point to the cluster desired:

export RPC_URL=https://testnet.solana.com
export RPC_URL=https://api.mainnet-beta.solana.com

You'll need npm installed, then perform the following:

$ cd token/js
$ npm install
$ npm run bench -- --num_accounts 1 --num_transfer 1 --num_burn 1 --num_mint 1 --payer_account payer.json --id 0 --num_payers 4

That should print a message like:

Loading payer account from payer.json loaded 9Rd5aWW84WtnM2QznNHqN1FmtEyb6hUf4eewp9BFBvE1

If the network you are running on doesn't have a faucet, then fund that key with some sol, then run the program again, adjusting the arguments to the desired accounts/tranfers to generate:

$ npm run bench -- --num_accounts 10 --num_transfer 1000 --num_burn 1000 --num_mint 10 --payer_account payer.json --id 0 --num_payers 4

To run more than one instance, there is another script run.sh:

./run.sh <number-of-instances>

That will run a number of demo programs in parallel.

reddit-scaling-demo's People

Contributors

jackcmay avatar sakridge avatar dependabot[bot] avatar criesofcarrots avatar dependabot-preview[bot] avatar garious avatar jstarry avatar rajgokal avatar aaron1011 avatar danpaul000 avatar mvines avatar aeyakovenko avatar

Watchers

 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.