Add simulation detection countermeasure (#22880)
* Add simulation detection countermeasures * Add program and test using TestValidator * Remove incinerator deposit * Remove incinerator * Update Cargo.lock * Add more features to simulation bank * Update Cargo.lock per rebase Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
This commit is contained in:
@ -3472,7 +3472,7 @@ pub mod rpc_full {
|
||||
let preflight_commitment = config
|
||||
.preflight_commitment
|
||||
.map(|commitment| CommitmentConfig { commitment });
|
||||
let preflight_bank = &*meta.bank(preflight_commitment);
|
||||
let preflight_bank = meta.bank(preflight_commitment);
|
||||
let transaction = sanitize_transaction(unsanitized_tx)?;
|
||||
let signature = *transaction.signature();
|
||||
|
||||
@ -3569,7 +3569,7 @@ pub mod rpc_full {
|
||||
let (_, mut unsanitized_tx) =
|
||||
decode_and_deserialize::<VersionedTransaction>(data, encoding)?;
|
||||
|
||||
let bank = &*meta.bank(config.commitment);
|
||||
let bank = meta.bank(config.commitment);
|
||||
if config.replace_recent_blockhash {
|
||||
if config.sig_verify {
|
||||
return Err(Error::invalid_params(
|
||||
@ -3637,7 +3637,7 @@ pub mod rpc_full {
|
||||
};
|
||||
|
||||
Ok(new_response(
|
||||
bank,
|
||||
&bank,
|
||||
RpcSimulateTransactionResult {
|
||||
err: result.err(),
|
||||
logs: Some(logs),
|
||||
|
Reference in New Issue
Block a user