From e1b26eac082254e59d852e7c7a5323509c9ff784 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Thu, 14 Nov 2024 19:45:54 +0000 Subject: [PATCH] Update patches --- third-party/patches/agave.patch | 12 ++++++------ third-party/patches/solana.patch | 6 +++--- third-party/patches/solana_rbpf.patch | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/third-party/patches/agave.patch b/third-party/patches/agave.patch index 56d41cc9..bf10f08c 100644 --- a/third-party/patches/agave.patch +++ b/third-party/patches/agave.patch @@ -64,7 +64,7 @@ index 4e764de..93cfd6c 100644 [dev-dependencies] assert_matches = { workspace = true } diff --git a/program-runtime/src/invoke_context.rs b/program-runtime/src/invoke_context.rs -index a54e083..4681ab6 100644 +index a54e083..05b63f8 100644 --- a/program-runtime/src/invoke_context.rs +++ b/program-runtime/src/invoke_context.rs @@ -121,4 +121,5 @@ impl fmt::Display for AllocErr { @@ -87,13 +87,13 @@ index a54e083..4681ab6 100644 + #[serde(with = "test_fuzz::serde_ref")] sysvar_cache: &'a SysvarCache, } -@@ -177,4 +184,5 @@ impl<'a> EnvironmentConfig<'a> { +@@ -177,4 +181,5 @@ impl<'a> EnvironmentConfig<'a> { } +#[derive(Clone, serde::Deserialize, serde::Serialize)] pub struct SyscallContext { pub allocator: BpfAllocator, -@@ -183,5 +191,11 @@ pub struct SyscallContext { +@@ -183,5 +188,11 @@ pub struct SyscallContext { } -#[derive(Debug, Clone)] @@ -106,7 +106,7 @@ index a54e083..4681ab6 100644 +#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)] pub struct SerializedAccountMetadata { pub original_data_len: usize, -@@ -192,9 +206,24 @@ pub struct SerializedAccountMetadata { +@@ -192,9 +203,24 @@ pub struct SerializedAccountMetadata { } +fn default_program_cache_for_tx_batch<'de, D>( @@ -131,13 +131,13 @@ index a54e083..4681ab6 100644 + )] pub program_cache_for_tx_batch: &'a mut ProgramCacheForTxBatch, /// Runtime configurations used to provision the invocation environment. -@@ -207,4 +239,5 @@ pub struct InvokeContext<'a> { +@@ -207,4 +233,5 @@ pub struct InvokeContext<'a> { log_collector: Option>>, /// Latest measurement not yet accumulated in [ExecuteDetailsTimings::execute_us] + #[serde(skip)] pub execute_time: Option, pub timings: ExecuteDetailsTimings, -@@ -213,4 +246,23 @@ pub struct InvokeContext<'a> { +@@ -213,4 +240,23 @@ pub struct InvokeContext<'a> { } +impl<'a> Clone for InvokeContext<'a> { diff --git a/third-party/patches/solana.patch b/third-party/patches/solana.patch index b56eb94a..bd2cadcf 100644 --- a/third-party/patches/solana.patch +++ b/third-party/patches/solana.patch @@ -21,7 +21,7 @@ index 0657df5..f1bd04f 100644 pub struct ComputeBudget { /// Number of compute units that a transaction or individual instruction is diff --git a/program-runtime/src/invoke_context.rs b/program-runtime/src/invoke_context.rs -index 5b2d417..1ff0e77 100644 +index 5b2d417..97c388f 100644 --- a/program-runtime/src/invoke_context.rs +++ b/program-runtime/src/invoke_context.rs @@ -111,4 +111,5 @@ impl fmt::Display for AllocErr { @@ -66,7 +66,7 @@ index 5b2d417..1ff0e77 100644 + #[serde(with = "test_fuzz::serde_ref")] sysvar_cache: &'a SysvarCache, log_collector: Option>>, -@@ -161,5 +185,7 @@ pub struct InvokeContext<'a> { +@@ -161,5 +179,7 @@ pub struct InvokeContext<'a> { current_compute_budget: ComputeBudget, compute_meter: RefCell, + #[serde(skip_serializing, deserialize_with = "default_loaded_programs")] @@ -74,7 +74,7 @@ index 5b2d417..1ff0e77 100644 + #[serde(skip_serializing, deserialize_with = "default_loaded_programs")] pub programs_modified_by_tx: &'a mut LoadedProgramsForTxBatch, pub feature_set: Arc, -@@ -171,4 +197,23 @@ pub struct InvokeContext<'a> { +@@ -171,4 +191,23 @@ pub struct InvokeContext<'a> { } +impl<'a> Clone for InvokeContext<'a> { diff --git a/third-party/patches/solana_rbpf.patch b/third-party/patches/solana_rbpf.patch index f8deeacd..98f797fa 100644 --- a/third-party/patches/solana_rbpf.patch +++ b/third-party/patches/solana_rbpf.patch @@ -16,7 +16,7 @@ index 781ce87..a999428 100644 + +[workspace] diff --git a/src/memory_region.rs b/src/memory_region.rs -index e0ebfe6..a724fd4 100644 +index e0ebfe6..64f1fa0 100644 --- a/src/memory_region.rs +++ b/src/memory_region.rs @@ -34,5 +34,5 @@ use std::{ @@ -314,21 +314,21 @@ index e0ebfe6..a724fd4 100644 + impl fmt::Debug for AlignedMemoryMapping<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -@@ -728,5 +907,5 @@ impl<'a> AlignedMemoryMapping<'a> { +@@ -728,5 +904,5 @@ impl<'a> AlignedMemoryMapping<'a> { /// Maps virtual memory to host memory. -#[derive(Debug)] +#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)] pub enum MemoryMapping<'a> { /// Used when address translation is disabled -@@ -736,5 +915,5 @@ pub enum MemoryMapping<'a> { +@@ -736,5 +912,5 @@ pub enum MemoryMapping<'a> { Aligned(AlignedMemoryMapping<'a>), /// Memory mapping that allows mapping unaligned memory regions. - Unaligned(UnalignedMemoryMapping<'a>), + Unaligned(UnalignedMemoryMapping), } -@@ -906,5 +1085,5 @@ fn generate_access_violation( +@@ -906,5 +1082,5 @@ fn generate_access_violation( /// Fast, small linear cache used to speed up unaligned memory mapping. -#[derive(Debug)]