Giter VIP home page Giter VIP logo

mango_bencher's People

Contributors

apfitzge avatar godmodegalactus avatar kirilllykov avatar mschneider avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

mango_bencher's Issues

Optimize pk_from_str_like calls (take 11% of total time)

From the profiler, create_ask_bid_transaction taxes 21% of time. Half of this is due to pk_from_str_like. I think it is a low-hanging fruit to get publickeys once for vector of PerpMarketCache.
Other observations:

  • serde_json::from_str takes 6% of total time
  • 16% of time is spent in futex_wait not related to send_transactions

Pass node_id to the client

It might be useful to pass node_id to the client.
The PR on bench-tps side is solana-labs/solana#29929 but lets wait until it lands.

This change will allow implementing the following:

  • create a validator node on the same machine with client
  • use this validator's identity as node_id also for the client

This way we could overcome unstaked connection limitations

Make bencher simulations reproducable

My understanding is that the current validator + keeper + bencher setup generates non-determenistic load on the validator due to the unpredictable time of arrival of ask/bid orders (due to network uncertainty). The solution might be added to add an optional time feed that would specify for each ask/bid time they should have arrived in the orderbook.

Limit number of markets for a user to 5 to avoid 0xd errors

0xd errors are there because market maker is trading on more than 5 markets. This can be avoided if user only trades on 5 random markets at a time.

Initially we close all the orders on all the markets for the market maker during startup phase.
Then we set random 5 markets where user can trade on.

We can then increase number of default market makers to 100 instead of 50.

Changes in the code to run bencher for hours

In order to have a more active testnet, we would like to run mango_bencher not only for short tests like we did so far but also for long ones (12h).

It implies some changes in the code:

  1. reporting side. Currently it reports once: https://github.com/godmodegalactus/mango_bencher/blob/master/src/main.rs#L217
    It would be nice to have a loop that it reports every minute or couple of minutes. Reporting side might be more time demanding (requires rpc calls) than doing the actual work, so might be impossible to analyze all the slots that has been created during time interval. The best effort approach is fine
  2. checks for accounts balances. Currently, we update balances before the start of the program using cli tools. If we run for a long time, it would be simpler to check in the code that accounts have enough lammports and if not add some from authority like it is currently implemented in bench-tps.

Migrate git submodules to crate

Currently, the project uses both git submodules and cargo crates. This approach makes crates dependencies resolution to be more complicated. The proposal is to move submodules to Cargo.toml (one can specify github link and commit, if he/she needs a specific version)

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.