Skip to content

Commit

Permalink
Update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Nov 14, 2024
1 parent d37133a commit e1b26ea
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions third-party/patches/agave.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)]
Expand All @@ -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>(
Expand All @@ -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<Rc<RefCell<LogCollector>>>,
/// Latest measurement not yet accumulated in [ExecuteDetailsTimings::execute_us]
+ #[serde(skip)]
pub execute_time: Option<Measure>,
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> {
Expand Down
6 changes: 3 additions & 3 deletions third-party/patches/solana.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -66,15 +66,15 @@ index 5b2d417..1ff0e77 100644
+ #[serde(with = "test_fuzz::serde_ref")]
sysvar_cache: &'a SysvarCache,
log_collector: Option<Rc<RefCell<LogCollector>>>,
@@ -161,5 +185,7 @@ pub struct InvokeContext<'a> {
@@ -161,5 +179,7 @@ pub struct InvokeContext<'a> {
current_compute_budget: ComputeBudget,
compute_meter: RefCell<u64>,
+ #[serde(skip_serializing, deserialize_with = "default_loaded_programs")]
pub programs_loaded_for_tx_batch: &'a LoadedProgramsForTxBatch,
+ #[serde(skip_serializing, deserialize_with = "default_loaded_programs")]
pub programs_modified_by_tx: &'a mut LoadedProgramsForTxBatch,
pub feature_set: Arc<FeatureSet>,
@@ -171,4 +197,23 @@ pub struct InvokeContext<'a> {
@@ -171,4 +191,23 @@ pub struct InvokeContext<'a> {
}

+impl<'a> Clone for InvokeContext<'a> {
Expand Down
8 changes: 4 additions & 4 deletions third-party/patches/solana_rbpf.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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)]
Expand Down

0 comments on commit e1b26ea

Please sign in to comment.