* Use infallible, unchecked methods to write into the serialization buffer
We serialize in two steps: first we compute the size of the buffer, then
we write into it. Therefore there's no need to check if each individual
write fits the buffer - we know it does we just computed the required
size.
* serialize_parameters: remove extra loop/borrows
Remove one extra loop over accounts to gather account lengths. Also
gather all accounts at once and avoid temporary borrows.
* Move creating MemoryRegions for serialized parameters from create_vm to serialize_parameters
This is in preparation of using multiple MemoryRegions once we land direct account mapping.
* bpf_loader: introduce internal API to build serialization buffer/regions
This is prep work for landing the direct_mapping feature, which maps account
data in their own memory regions.
* serialization: fix after API changes
* add epoch-boundary-stake-reward proposal
* 80 col
* clarify rewarding interval selection for skipping slots
* update proposal with reward credit based on jeff's comments
* Update docs/src/proposals/epoch-boundary-stake-reward.md
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* Update docs/src/proposals/epoch-boundary-stake-reward.md
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* rename
* update proposal with more feedbacks
* revise
* update with carl's feedback
* use mathmatic notation to clarify interval boundaries
* more feedbacks
* remove parenthesis
* update snapshot paragraph
* update with reward calc service
* more feedbacks
* update with more feedbacks
* more feedbacks from carllin
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* Bumps solana_rbpf to 0.2.34
* Removes generic UserError from EbpfError.
* Uses ProgramResult for syscalls.
Removes use sites of the question_mark! macro by wrapping the call method of SyscallObjects.
* Uses InvokeContext as syscall context object directly.
* Replaces bind_syscall_context_object() by a parameter in the constructor.
* Inlines bind_syscall_context_objects() at its only call site.
* Moves AlignedMemory from solana_rbpf into a new crate: memory-managment.
* Makes cargo clippy happy.
* deny clippy::integer_arithmetic
* Makes write_unchecked() take a generic parameter.
* Restricts AlignedMemory::write_unchecked() to Pod types.
* Adds DynamicLayoutArray.
* Moves is_memory_aligned() into crate root.
benches/bpf_loader: make account writable in bench_instruction_count_tuner
The tuner program writes to its input account. This fixes the benchmark with
the direct_mapping branch, where we do enforce permissions before execution.
A fifo rocksdb instance must be opened with max size parameter on the
fifo columns. To support this, we previously plumbed a constant up to
callers that provided a default if unbounded growth desired.
This change attempts to be more rusty by exposing an option for this
value, and converting the option to a constant at the lowest level
possible.