-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* π§ͺ add fuzz_example1 * π§ͺ added fuzz_example0, this is copy of 'fuzzer' example but with the new structure * β work on example0 * β working on example1 * β added fresh example2 * β fuzz test for example2 * β slightly different fuz test for fuzz example 1 * β added fuzz example3 - escrow with bad math * β fuzz test for fuzz example3 * π added check for register Subject and added initial problem description * β add crashes for both checks * β fuzz example 0 in progress * π readme updates * π example1 small readme update * β small program update * π readme + added fuzzer output * β minor program example updates * β remove unnecessary coments , add few notes , add new withdraw check * β add crash files * π add readme template * π update program code and fix accounts snapshot * π add readme + crash file * π gitignore * β remove unnecessary code + update fuzz test check * β add crashes * π initial readme * π readme update + minor code update * π the final check part * π code format * π better grammar and spelling * π better grammar and spelling * π better grammar and spelling * π link to uncomment check * π§ todo find crash file for the todo check * π₯ removed incorrect check from withdraw + update readme * βοΈ fix fuzz_example0 - Update readme and rename fuzzer to fuzz_example0 * βοΈ fix fuzz_example2 comments * βοΈ fixes for fuzz_example3 - remove unnecessary code parts * βοΈ fix fuzz_example3 - remove check for Invest function, update Readme * Fixed snapshot deserialization * Removed unused imports * Rebase fixes * π§ͺ added fuzz_example0, this is copy of 'fuzzer' example but with the new structure * β work on example0 * β working on example1 * β added fresh example2 * β fuzz test for example2 * β slightly different fuz test for fuzz example 1 * β added fuzz example3 - escrow with bad math * β fuzz test for fuzz example3 * π added check for register Subject and added initial problem description * β add crashes for both checks * β fuzz example 0 in progress * π readme updates * π example1 small readme update * β small program update * π readme + added fuzzer output * β minor program example updates * β remove unnecessary coments , add few notes , add new withdraw check * β add crash files * π add readme template * π update program code and fix accounts snapshot * π add readme + crash file * π gitignore * β remove unnecessary code + update fuzz test check * β add crashes * π initial readme * π readme update + minor code update * π the final check part * π code format * π better grammar and spelling * π better grammar and spelling * π better grammar and spelling * π link to uncomment check * π§ todo find crash file for the todo check * π₯ removed incorrect check from withdraw + update readme * βοΈ fix fuzz_example0 - Update readme and rename fuzzer to fuzz_example0 * βοΈ fix fuzz_example2 comments * βοΈ fixes for fuzz_example3 - remove unnecessary code parts * βοΈ fix fuzz_example3 - remove check for Invest function, update Readme * π¨ cargo fmt * π¨ clippy allow too many arguments --------- Co-authored-by: lukacan <[email protected]> Co-authored-by: Ikrk <[email protected]>
- Loading branch information
1 parent
82ac6bb
commit c6a8c49
Showing
75 changed files
with
18,296 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
pub mod fuzzer_generator; | ||
pub mod accounts_storage; | ||
pub mod data_builder; | ||
pub mod fuzzer_generator; | ||
#[cfg(feature = "fuzzing")] | ||
pub mod program_test_client_blocking; | ||
pub mod snapshot; | ||
pub mod accounts_storage; | ||
pub mod snapshot_generator; | ||
|
||
pub type AccountId = u8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
.anchor | ||
.DS_Store | ||
target | ||
**/*.rs.bk | ||
node_modules | ||
test-ledger | ||
.yarn | ||
trdelnik-tests/hfuzz_target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
.anchor | ||
.DS_Store | ||
target | ||
node_modules | ||
dist | ||
build | ||
test-ledger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[package] | ||
name = "program_client" | ||
version = "0.1.0" | ||
edition = "2018" | ||
|
||
[dependencies.trdelnik-client] | ||
path = "../../../crates/client" | ||
|
||
[dependencies.fuzz_example0] | ||
path = "../programs/fuzz_example0" | ||
features = ["no-entrypoint"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module | ||
pub mod fuzz_example0_instruction { | ||
use trdelnik_client::*; | ||
pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ | ||
170u8, 64u8, 48u8, 229u8, 53u8, 121u8, 89u8, 247u8, 36u8, 222u8, 119u8, 168u8, 36u8, 42u8, | ||
8u8, 162u8, 161u8, 90u8, 85u8, 0u8, 151u8, 100u8, 169u8, 133u8, 216u8, 142u8, 250u8, 145u8, | ||
26u8, 46u8, 170u8, 146u8, | ||
]); | ||
pub async fn initialize( | ||
client: &Client, | ||
a_counter: Pubkey, | ||
a_user: Pubkey, | ||
a_system_program: Pubkey, | ||
signers: impl IntoIterator<Item = Keypair> + Send + 'static, | ||
) -> Result<EncodedConfirmedTransactionWithStatusMeta, ClientError> { | ||
client | ||
.send_instruction( | ||
PROGRAM_ID, | ||
fuzz_example0::instruction::Initialize {}, | ||
fuzz_example0::accounts::Initialize { | ||
counter: a_counter, | ||
user: a_user, | ||
system_program: a_system_program, | ||
}, | ||
signers, | ||
) | ||
.await | ||
} | ||
pub fn initialize_ix( | ||
a_counter: Pubkey, | ||
a_user: Pubkey, | ||
a_system_program: Pubkey, | ||
) -> Instruction { | ||
Instruction { | ||
program_id: PROGRAM_ID, | ||
data: fuzz_example0::instruction::Initialize {}.data(), | ||
accounts: fuzz_example0::accounts::Initialize { | ||
counter: a_counter, | ||
user: a_user, | ||
system_program: a_system_program, | ||
} | ||
.to_account_metas(None), | ||
} | ||
} | ||
pub async fn update( | ||
client: &Client, | ||
i_input1: u8, | ||
i_input2: u8, | ||
a_counter: Pubkey, | ||
a_authority: Pubkey, | ||
signers: impl IntoIterator<Item = Keypair> + Send + 'static, | ||
) -> Result<EncodedConfirmedTransactionWithStatusMeta, ClientError> { | ||
client | ||
.send_instruction( | ||
PROGRAM_ID, | ||
fuzz_example0::instruction::Update { | ||
input1: i_input1, | ||
input2: i_input2, | ||
}, | ||
fuzz_example0::accounts::Update { | ||
counter: a_counter, | ||
authority: a_authority, | ||
}, | ||
signers, | ||
) | ||
.await | ||
} | ||
pub fn update_ix( | ||
i_input1: u8, | ||
i_input2: u8, | ||
a_counter: Pubkey, | ||
a_authority: Pubkey, | ||
) -> Instruction { | ||
Instruction { | ||
program_id: PROGRAM_ID, | ||
data: fuzz_example0::instruction::Update { | ||
input1: i_input1, | ||
input2: i_input2, | ||
} | ||
.data(), | ||
accounts: fuzz_example0::accounts::Update { | ||
counter: a_counter, | ||
authority: a_authority, | ||
} | ||
.to_account_metas(None), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[features] | ||
seeds = false | ||
skip-lint = false | ||
[programs.localnet] | ||
fuzz_example0 = "CTb5cKBLEGgFEw3jDGYCHCiHJ2PY2LFoxXhEPRhFFL4h" | ||
|
||
[registry] | ||
url = "https://api.apr.dev" | ||
|
||
[provider] | ||
cluster = "Localnet" | ||
wallet = "~/.config/solana/id.json" | ||
|
||
[scripts] | ||
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" |
Oops, something went wrong.