Giter VIP home page Giter VIP logo

Comments (2)

jon-chuang avatar jon-chuang commented on August 28, 2024

As a separate but related question, is JIT currently enabled on mainnet?

Edit: my understanding - no, as process_instruction_jit is not the declared builtin: (in programs/bpf_loader/src/lib.rs:

solana_sdk::declare_builtin!(
    solana_sdk::bpf_loader::ID,
    solana_bpf_loader_program,
    solana_bpf_loader_program::process_instruction
);

from rbpf.

Lichtso avatar Lichtso commented on August 28, 2024

My worry is not the detection per-se but rather to catch such programs in the act so they don't run for say 100ms rather than say a target 10ms.

We are aware that linear programs can dramatically overrun before they are stopped by an exit branch. However, it was not deemed much of a threat yet, because the cost function and compute-meter economics are still very simple. This will become more of a problem when programs can chose to pay for less and use less / only what they actually need, then they could run disproportionally longer than what they payed for.

Will be interested to see JIT timings for programs of varying length.

We have a standalone CLI tool that you can play around with.

Is JIT currently enabled on mainnet?

It is optional but enabled by default.

Conclusion

We can address this in a general overhaul of the instruction meter which would:

  • Add a non-uniform cost function
  • Insert phony branches in long linear runs
  • Fix the "exception after instruction meter limit reached" situation, if that turns out to be an issue

Thanks for all your hints and contributions. I just wanted to add that you should read and follow our security policy & guideline, that way you would also be eligible for the bounty program.

from rbpf.

Related Issues (20)

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.