Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
yufeng-jump committed Dec 5, 2024
1 parent 14d2daa commit 3d328f8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/flamenco/runtime/context/fd_exec_txn_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ fd_exec_txn_ctx_setup_basic( fd_exec_txn_ctx_t * txn_ctx ) {
txn_ctx->exec_err_kind = FD_EXECUTOR_ERR_KIND_EBPF;

txn_ctx->has_program_id = 0;
fd_valloc_t valloc = fd_scratch_virtual();
}

void
Expand Down
11 changes: 11 additions & 0 deletions src/flamenco/runtime/fd_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,17 @@ FD_STATIC_ASSERT( FD_BPF_ALIGN_OF_U128==FD_ACCOUNT_REC_DATA_ALIGN, input_data_al
The footprint estimate here is based on what the vote program
currently does.
### Native programs
ALUT (migrated to BPF)
Loader (smaller than Vote footprint)
Compute budget (0 allocations)
Config (migrated to BPF)
Precompile
Stake
System
Vote ()
Zk Elgamal
*/
#define FD_RUNTIME_BINCODE_FOOTPRINT (8UL*FD_ACC_TOT_SZ_MAX)

Expand Down
2 changes: 1 addition & 1 deletion src/flamenco/runtime/program/fd_bpf_loader_program.c
Original file line number Diff line number Diff line change
Expand Up @@ -1960,7 +1960,7 @@ fd_directly_invoke_loader_v3_deploy( fd_exec_slot_ctx_t * slot_ctx,
.txn_ctx = txn_ctx,
.epoch_ctx = txn_ctx->epoch_ctx,
.slot_ctx = txn_ctx->slot_ctx,
.valloc = fd_scratch_virtual(),
.valloc = NULL,
.acc_mgr = txn_ctx->acc_mgr,
.funk_txn = txn_ctx->funk_txn,
.parent = NULL,
Expand Down
2 changes: 1 addition & 1 deletion src/flamenco/runtime/program/fd_compute_budget_program.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fd_executor_compute_budget_program_execute_instructions( fd_exec_txn_ctx_t * ctx
fd_bincode_decode_ctx_t decode_ctx = {
.data = data,
.dataend = &data[ instr->data_sz ],
.valloc = ctx->valloc,
.valloc = fd_runtime_spad_virtual( ctx->spad ),
};

int ret = fd_compute_budget_program_instruction_decode( &instruction, &decode_ctx );
Expand Down

0 comments on commit 3d328f8

Please sign in to comment.