-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Program-Runtime v2 - Road Map #28755
Comments
This is amazing! A few questions: |
How will isolation work? Will the verifier enforce it? |
This is a meta-tracking issue we created after talks at breakpoint. Input is of course welcome, here and on discord in the #virtual-machine channel. Going forward we should probably create separate issues for sub features tho or this is likely going to get out of hand.
The account clone issue is already going away Real Soon Now (tm) with the existing runtime: #28755. The other large issue of creating nested VMs (what the current runtime does during CPI) will go away with v2. Both will reduce the cost of doing CPI yes.
If you mean if callees will be able to return data to their callers the answer is yes - one of the goals of this work is to improve the sdk ergonomics, so that you'll be able to "just call some functions" without the runtime getting in the way. |
I understand the question being about the client, the one off chain which triggers the transaction via RPC. If that is the question then, no or at least that is outside of the scope of the program runtime and has to do with networking. It is tricky because the process is asynchronous in the sense that submitting a transaction and polling for its completion (including its possible results) are independent flows. In other words, in the program runtime we could return the return value of the last instruction in a transaction (or something along these lines), but it would not be propagated anywhere. That requires additional infrastructure outside of the program-runtime. |
@leoluk Yes, that is the plan. On deployment the verifier would do type inference for the entire instruction stream and could then find any misbehaving memory accesses before execution. For dynamic offsets / indices we would check that the correct (canonical) bounds checks are in the instruction stream as well. |
Looks like a good change. Can you include the planned security process for this redesign in the roadmap? |
Sounds like fun |
The performance optimizations we have been working on inside the runtime under the ABIv2 project the past year will be deployed separately as "account data direct mapping". The redesign of the ABI between runtime and on-chain program is pushed out further as we changed the goals again.
Presentations
Tasks
LoadedPrograms
#29803load_and_get_programs_from_cache()
#30959BuiltinPrograms
intoLoadedPrograms
#31654LoadedPrograms
#33482MemoryMapping::Identity
rbpf#460lduw
(load upper word immediate) rbpf#486sub r11, imm
withadd r11, -imm
rbpf#488sub reg, imm
and removesneg
rbpf#489callx
encoding rbpf#491lduw
tohor64
rbpf#496process_instruction
parameterfirst_instruction_account
#30579first_instruction_account
inbpf_loader
#30614BuiltinPrograms
#31324BuiltinProgram
#31429The text was updated successfully, but these errors were encountered: