Allow arbitrary call data size (#135)

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
Cyrill Leutwiler
2024-12-18 14:04:46 +01:00
committed by GitHub
parent afe44ad21b
commit 909de515c4
10 changed files with 999 additions and 1619 deletions
+6 -2
View File
@@ -76,6 +76,12 @@ POLKAVM_IMPORT(void, block_number, uint32_t)
POLKAVM_IMPORT(uint64_t, call, uint32_t)
POLKAVM_IMPORT(uint64_t, call_data_copy, uint32_t, uint32_t, uint32_t)
POLKAVM_IMPORT(uint64_t, call_data_load, uint32_t, uint32_t)
POLKAVM_IMPORT(uint64_t, call_data_size, uint32_t)
POLKAVM_IMPORT(uint64_t, delegate_call, uint32_t)
POLKAVM_IMPORT(void, caller, uint32_t)
@@ -94,8 +100,6 @@ POLKAVM_IMPORT(uint64_t, get_storage, uint32_t, uint32_t, uint32_t, uint32_t, ui
POLKAVM_IMPORT(void, hash_keccak_256, uint32_t, uint32_t, uint32_t)
POLKAVM_IMPORT(void, input, uint32_t, uint32_t)
POLKAVM_IMPORT(uint64_t, instantiate, uint32_t)
POLKAVM_IMPORT(void, now, uint32_t)
+10 -4
View File
@@ -26,6 +26,12 @@ pub static BLOCK_NUMBER: &str = "block_number";
pub static CALL: &str = "call";
pub static CALL_DATA_COPY: &str = "call_data_copy";
pub static CALL_DATA_LOAD: &str = "call_data_load";
pub static CALL_DATA_SIZE: &str = "call_data_size";
pub static DELEGATE_CALL: &str = "delegate_call";
pub static CALLER: &str = "caller";
@@ -44,8 +50,6 @@ pub static GET_STORAGE: &str = "get_storage";
pub static HASH_KECCAK_256: &str = "hash_keccak_256";
pub static INPUT: &str = "input";
pub static INSTANTIATE: &str = "instantiate";
pub static NOW: &str = "now";
@@ -68,7 +72,7 @@ pub static WEIGHT_TO_FEE: &str = "weight_to_fee";
/// All imported runtime API symbols.
/// Useful for configuring common attributes and linkage.
pub static IMPORTS: [&str; 28] = [
pub static IMPORTS: [&str; 30] = [
SBRK,
MEMORY_SIZE,
ADDRESS,
@@ -77,6 +81,9 @@ pub static IMPORTS: [&str; 28] = [
BLOCK_HASH,
BLOCK_NUMBER,
CALL,
CALL_DATA_COPY,
CALL_DATA_LOAD,
CALL_DATA_SIZE,
DELEGATE_CALL,
CALLER,
CHAIN_ID,
@@ -86,7 +93,6 @@ pub static IMPORTS: [&str; 28] = [
GET_IMMUTABLE_DATA,
GET_STORAGE,
HASH_KECCAK_256,
INPUT,
INSTANTIATE,
NOW,
ORIGIN,