Merge pull request from GHSA-8v47-8c53-wwrc

* Track transaction check time separately from account loads

* banking packet process metrics

* Remove signature clone in status cache lookup

* Reduce allocations when converting packets to transactions

* Add blake3 hash of transaction messages in status cache

* Bug fixes

* fix tests and run fmt

* Address feedback

* fix simd tx entry verification

* Fix rebase

* Feedback

* clean up

* Add tests

* Remove feature switch and fall back to signature check

* Bump programs/bpf Cargo.lock

* clippy

* nudge benches

* Bump `BankSlotDelta` frozen ABI hash`

* Add blake3 to sdk/programs/Cargo.lock

* nudge bpf tests

* short circuit status cache checks

Co-authored-by: Trent Nelson <trent@solana.com>
This commit is contained in:
Justin Starry
2021-04-13 14:28:08 +08:00
committed by GitHub
parent 70f3f7e679
commit 85eb37fab0
30 changed files with 938 additions and 617 deletions

View File

@@ -520,7 +520,7 @@ impl TryFrom<tx_by_addr::TransactionError> for TransactionError {
3 => TransactionError::ProgramAccountNotFound,
4 => TransactionError::InsufficientFundsForFee,
5 => TransactionError::InvalidAccountForFee,
6 => TransactionError::DuplicateSignature,
6 => TransactionError::AlreadyProcessed,
7 => TransactionError::BlockhashNotFound,
9 => TransactionError::CallChainTooDeep,
10 => TransactionError::MissingSignatureForFee,
@@ -554,8 +554,8 @@ impl From<TransactionError> for tx_by_addr::TransactionError {
TransactionError::InvalidAccountForFee => {
tx_by_addr::TransactionErrorType::InvalidAccountForFee
}
TransactionError::DuplicateSignature => {
tx_by_addr::TransactionErrorType::DuplicateSignature
TransactionError::AlreadyProcessed => {
tx_by_addr::TransactionErrorType::AlreadyProcessed
}
TransactionError::BlockhashNotFound => {
tx_by_addr::TransactionErrorType::BlockhashNotFound
@@ -903,7 +903,7 @@ mod test {
tx_by_addr_transaction_error.try_into().unwrap()
);
let transaction_error = TransactionError::DuplicateSignature;
let transaction_error = TransactionError::AlreadyProcessed;
let tx_by_addr_transaction_error: tx_by_addr::TransactionError =
transaction_error.clone().into();
assert_eq!(