Skip to content

Commit

Permalink
Update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Sep 12, 2024
1 parent 8a01e25 commit b18354d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 30 deletions.
41 changes: 26 additions & 15 deletions third-party/patches/agave.patch
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ index 190abb3..c157072 100644
pub struct Measure {
name: &'static str,
diff --git a/program-runtime/Cargo.toml b/program-runtime/Cargo.toml
index 413f7b7..007bd73 100644
index af276bc..f402996 100644
--- a/program-runtime/Cargo.toml
+++ b/program-runtime/Cargo.toml
@@ -35,4 +35,6 @@ solana_rbpf = { workspace = true }
@@ -36,4 +36,6 @@ solana_rbpf = { workspace = true }
thiserror = { workspace = true }

+test-fuzz = { path = "../../../test-fuzz" }
+
[dev-dependencies]
assert_matches = { workspace = true }
diff --git a/program-runtime/src/invoke_context.rs b/program-runtime/src/invoke_context.rs
index 97d8200..90b9806 100644
index c96da3e..3abc16c 100644
--- a/program-runtime/src/invoke_context.rs
+++ b/program-runtime/src/invoke_context.rs
@@ -118,4 +118,5 @@ impl fmt::Display for AllocErr {
Expand Down Expand Up @@ -179,10 +179,10 @@ index 79124bd..acdaa87 100644
pub struct SysvarCache {
// full account data as provided by bank, including any trailing zero bytes
diff --git a/programs/bpf_loader/Cargo.toml b/programs/bpf_loader/Cargo.toml
index 4c08566..a26efe0 100644
index 8fb86df..4b48f84 100644
--- a/programs/bpf_loader/Cargo.toml
+++ b/programs/bpf_loader/Cargo.toml
@@ -30,4 +30,7 @@ solana_rbpf = { workspace = true }
@@ -31,4 +31,7 @@ solana_rbpf = { workspace = true }
thiserror = { workspace = true }

+serde = { workspace = true }
Expand All @@ -191,7 +191,7 @@ index 4c08566..a26efe0 100644
[dev-dependencies]
assert_matches = { workspace = true }
diff --git a/programs/bpf_loader/src/lib.rs b/programs/bpf_loader/src/lib.rs
index 400806b..30850db 100644
index 5e81062..821afe7 100644
--- a/programs/bpf_loader/src/lib.rs
+++ b/programs/bpf_loader/src/lib.rs
@@ -395,6 +395,7 @@ declare_builtin_function!(
Expand All @@ -205,7 +205,7 @@ index 400806b..30850db 100644
) -> Result<u64, Box<dyn std::error::Error>> {
let log_collector = invoke_context.get_log_collector();
diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml
index 5427e5d..6b55b3c 100644
index a14c58d..8dc16f9 100644
--- a/sdk/Cargo.toml
+++ b/sdk/Cargo.toml
@@ -77,5 +77,5 @@ qualifier_attr = { workspace = true, optional = true }
Expand All @@ -215,20 +215,31 @@ index 5427e5d..6b55b3c 100644
+serde = { workspace = true, features = ["rc"] }
serde_bytes = { workspace = true }
serde_derive = { workspace = true }
@@ -99,4 +99,6 @@ thiserror = { workspace = true }
uriparse = { workspace = true }
@@ -101,4 +101,6 @@ solana-signature = { workspace = true, features = ["rand", "serde", "verify"], o
thiserror = { workspace = true }

+test-fuzz = { path = "../../../test-fuzz" }
+
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.1", features = ["wasm-bindgen"] }
diff --git a/sdk/src/feature_set.rs b/sdk/src/feature_set.rs
index 02cc259..fa1152e 100644
--- a/sdk/src/feature_set.rs
+++ b/sdk/src/feature_set.rs
@@ -1111,5 +1111,5 @@ lazy_static! {
diff --git a/sdk/feature-set/Cargo.toml b/sdk/feature-set/Cargo.toml
index 02da9d0..a6a1cda 100644
--- a/sdk/feature-set/Cargo.toml
+++ b/sdk/feature-set/Cargo.toml
@@ -16,4 +16,6 @@ solana-frozen-abi-macro = { workspace = true, optional = true }
solana-program = { workspace = true }

+serde = { workspace = true }
+
[build-dependencies]
rustc_version = { workspace = true, optional = true }
diff --git a/sdk/feature-set/src/lib.rs b/sdk/feature-set/src/lib.rs
index f2b094e..689477b 100644
--- a/sdk/feature-set/src/lib.rs
+++ b/sdk/feature-set/src/lib.rs
@@ -1123,5 +1123,5 @@ lazy_static! {
/// `FeatureSet` holds the set of currently active/inactive runtime features
#[cfg_attr(feature = "frozen-abi", derive(AbiExample))]
#[cfg_attr(feature = "frozen-abi", derive(solana_frozen_abi_macro::AbiExample))]
-#[derive(Debug, Clone, Eq, PartialEq)]
+#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct FeatureSet {
Expand Down
24 changes: 12 additions & 12 deletions third-party/patches/solana_rbpf.patch
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ index 0ef76bc..3359e31 100644
vm.context_object_pointer, $arg_a, $arg_b, $arg_c, $arg_d, $arg_e, &mut vm.memory_mapping,
).map_err(|err| $crate::error::EbpfError::SyscallError(err)).into();
diff --git a/src/syscalls.rs b/src/syscalls.rs
index c597d9b..1996c56 100644
index a8d398d..98f35a4 100644
--- a/src/syscalls.rs
+++ b/src/syscalls.rs
@@ -34,5 +34,5 @@ declare_builtin_function!(
Expand Down Expand Up @@ -445,56 +445,56 @@ index c597d9b..1996c56 100644
+ _memory_mapping: &mut MemoryMapping<'a>,
) -> Result<u64, Box<dyn std::error::Error>> {
Ok(arg1.wrapping_shl(32)
@@ -84,5 +84,5 @@ declare_builtin_function!(
@@ -86,5 +86,5 @@ declare_builtin_function!(
/// cases. Arguments 3 to 5 are unused.
SyscallMemFrob,
- fn rust(
+ fn rust<'a>(
_context_object: &mut TestContextObject,
vm_addr: u64,
@@ -91,5 +91,5 @@ declare_builtin_function!(
@@ -93,5 +93,5 @@ declare_builtin_function!(
_arg4: u64,
_arg5: u64,
- memory_mapping: &mut MemoryMapping,
+ memory_mapping: &mut MemoryMapping<'a>,
) -> Result<u64, Box<dyn std::error::Error>> {
let host_addr: Result<u64, EbpfError> =
@@ -109,5 +109,5 @@ declare_builtin_function!(
@@ -111,5 +111,5 @@ declare_builtin_function!(
/// C-like `strcmp`, return 0 if the strings are equal, and a non-null value otherwise.
SyscallStrCmp,
- fn rust(
+ fn rust<'a>(
_context_object: &mut TestContextObject,
arg1: u64,
@@ -116,5 +116,5 @@ declare_builtin_function!(
@@ -118,5 +118,5 @@ declare_builtin_function!(
_arg4: u64,
_arg5: u64,
- memory_mapping: &mut MemoryMapping,
+ memory_mapping: &mut MemoryMapping<'a>,
) -> Result<u64, Box<dyn std::error::Error>> {
// C-like strcmp, maybe shorter than converting the bytes to string and comparing?
@@ -147,5 +147,5 @@ declare_builtin_function!(
@@ -149,5 +149,5 @@ declare_builtin_function!(
/// Prints a NULL-terminated UTF-8 string.
SyscallString,
- fn rust(
+ fn rust<'a>(
_context_object: &mut TestContextObject,
vm_addr: u64,
@@ -154,5 +154,5 @@ declare_builtin_function!(
@@ -156,5 +156,5 @@ declare_builtin_function!(
_arg4: u64,
_arg5: u64,
- memory_mapping: &mut MemoryMapping,
+ memory_mapping: &mut MemoryMapping<'a>,
) -> Result<u64, Box<dyn std::error::Error>> {
let host_addr: Result<u64, EbpfError> =
@@ -172,5 +172,5 @@ declare_builtin_function!(
@@ -174,5 +174,5 @@ declare_builtin_function!(
/// Prints the five arguments formated as u64 in decimal.
SyscallU64,
- fn rust(
+ fn rust<'a>(
_context_object: &mut TestContextObject,
arg1: u64,
@@ -179,5 +179,5 @@ declare_builtin_function!(
@@ -181,5 +181,5 @@ declare_builtin_function!(
arg4: u64,
arg5: u64,
- memory_mapping: &mut MemoryMapping,
Expand All @@ -520,17 +520,17 @@ index 969a339..a5e1a2c 100644
pub struct TestContextObject {
/// Contains the register state at every instruction in order of execution
diff --git a/tests/execution.rs b/tests/execution.rs
index 2043132..eafcabc 100644
index e7f77ce..f6c1a93 100644
--- a/tests/execution.rs
+++ b/tests/execution.rs
@@ -2526,5 +2526,5 @@ declare_builtin_function!(
@@ -2534,5 +2534,5 @@ declare_builtin_function!(
/// For test_nested_vm_syscall()
SyscallNestedVm,
- fn rust(
+ fn rust<'a>(
_context_object: &mut TestContextObject,
depth: u64,
@@ -2533,5 +2533,5 @@ declare_builtin_function!(
@@ -2541,5 +2541,5 @@ declare_builtin_function!(
_arg4: u64,
_arg5: u64,
- _memory_mapping: &mut MemoryMapping,
Expand Down
6 changes: 3 additions & 3 deletions third-party/third_party.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"flags": ["EXPENSIVE", "SKIP_NIGHTLY"],
"url": "https://github.com/anza-xyz/agave",
"rev": "e207c6e0eaf8e1657fbfaff07da05ca6a7928349",
"rev": "fc4069a8ae55e2d3ba7b345c53f15279e7ba5923",
"patch": "agave.patch",
"subdir": ".",
"package": "solana-bpf-loader-program",
Expand All @@ -20,7 +20,7 @@
{
"flags": ["EXPENSIVE", "SKIP_NIGHTLY"],
"url": "https://github.com/paritytech/polkadot-sdk",
"rev": "5e0ec3e0231b43392f569cc4c685b91cb481a3ec",
"rev": "a34cc8dff09dc3840a304befc2415343244b5fd0",
"patch": "substrate_client_transaction_pool.patch",
"subdir": ".",
"package": "sc-transaction-pool",
Expand All @@ -38,7 +38,7 @@
{
"flags": [],
"url": "https://github.com/solana-labs/rbpf",
"rev": "2d38c9501d2682d238bc969d8d8b128655cd3265",
"rev": "9f8d7cb694c8afd28f6e42d38826036c77ea7b52",
"patch": "solana_rbpf.patch",
"subdir": ".",
"package": "solana_rbpf",
Expand Down

0 comments on commit b18354d

Please sign in to comment.