Skip to content

Commit

Permalink
Merge pull request #63 from lijunwangs/update_to_v1.16
Browse files Browse the repository at this point in the history
support validator v1.16.17
  • Loading branch information
lijunwangs authored Oct 18, 2023
2 parents cc14693 + 4ddb1a6 commit 68a4471
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 21 deletions.
26 changes: 13 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["Solana Maintainers <[email protected]>"]
edition = "2021"
name = "solana-geyser-plugin-postgres"
description = "The Solana AccountsDb plugin for PostgreSQL database."
version = "1.15.2"
version = "1.16.17"
repository = "https://github.com/solana-labs/solana-accountsdb-plugin-postgres"
license = "Apache-2.0"
homepage = "https://solana.com/"
Expand All @@ -25,13 +25,13 @@ postgres-openssl = { version = "0.5.0"}
serde = "1.0.145"
serde_derive = "1.0.145"
serde_json = "1.0.85"
solana-geyser-plugin-interface = { version = "1.16.0" }
solana-logger = { version = "1.16.0" }
solana-measure = { version = "1.16.0" }
solana-metrics = { version = "1.16.0" }
solana-runtime = { version = "1.16.0" }
solana-sdk = { version = "1.16.0" }
solana-transaction-status = { version = "1.16.0" }
solana-geyser-plugin-interface = { version = "=1.16.17" }
solana-logger = { version = "1.16.17" }
solana-measure = { version = "1.16.17" }
solana-metrics = { version = "1.16.17" }
solana-runtime = { version = "1.16.17" }
solana-sdk = { version = "1.16.17" }
solana-transaction-status = { version = "1.16.17" }
thiserror = "1.0.37"
tokio-postgres = "0.7.7"

Expand All @@ -41,11 +41,11 @@ libloading = "0.7.3"
serial_test = "0.9.0"
socket2 = { version = "0.4.7", features = ["all"] }

solana-account-decoder = { version = "1.16.0" }
solana-core = { version = "1.16.0" }
solana-local-cluster = { version = "1.16.0" }
solana-net-utils = { version = "1.16.0" }
solana-streamer = { version = "1.16.0" }
solana-account-decoder = { version = "1.16.17" }
solana-core = { version = "1.16.17" }
solana-local-cluster = { version = "1.16.17" }
solana-net-utils = { version = "1.16.17" }
solana-streamer = { version = "1.16.17" }
tempfile = "3.3.0"

[package.metadata.docs.rs]
Expand Down
4 changes: 2 additions & 2 deletions ci/rust-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
if [[ -n $RUST_STABLE_VERSION ]]; then
stable_version="$RUST_STABLE_VERSION"
else
stable_version=1.66.1
stable_version=1.69.0
fi

if [[ -n $RUST_NIGHTLY_VERSION ]]; then
nightly_version="$RUST_NIGHTLY_VERSION"
else
nightly_version=2022-04-01
nightly_version=2023-04-19
fi


Expand Down
3 changes: 2 additions & 1 deletion scripts/create_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ Create TYPE "TransactionErrorCode" AS ENUM (
'InsufficientFundsForRent',
'MaxLoadedAccountsDataSizeExceeded',
'InvalidLoadedAccountsDataSizeLimit',
'ResanitizationNeeded'
'ResanitizationNeeded',
'UnbalancedTransaction'
);

CREATE TYPE "TransactionError" AS (
Expand Down
12 changes: 7 additions & 5 deletions src/postgres_client/postgres_client_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ pub enum DbTransactionErrorCode {
MaxLoadedAccountsDataSizeExceeded,
InvalidLoadedAccountsDataSizeLimit,
ResanitizationNeeded,
UnbalancedTransaction,
}

impl From<&TransactionError> for DbTransactionErrorCode {
Expand Down Expand Up @@ -407,6 +408,7 @@ impl From<&TransactionError> for DbTransactionErrorCode {
Self::InvalidLoadedAccountsDataSizeLimit
}
TransactionError::ResanitizationNeeded => Self::ResanitizationNeeded,
TransactionError::UnbalancedTransaction => Self::UnbalancedTransaction,
}
}
}
Expand Down Expand Up @@ -1374,7 +1376,7 @@ pub(crate) mod tests {

#[test]
fn test_build_db_transaction_legacy() {
let signature = Signature::new(&[1u8; 64]);
let signature = Signature::from([1u8; 64]);

let message_hash = Hash::new_unique();
let transaction = build_test_transaction_legacy();
Expand Down Expand Up @@ -1407,17 +1409,17 @@ pub(crate) mod tests {
fn build_test_transaction_v0() -> VersionedTransaction {
VersionedTransaction {
signatures: vec![
Signature::new(&[1u8; 64]),
Signature::new(&[2u8; 64]),
Signature::new(&[3u8; 64]),
Signature::from([1u8; 64]),
Signature::from([2u8; 64]),
Signature::from([3u8; 64]),
],
message: VersionedMessage::V0(build_transaction_message_v0()),
}
}

#[test]
fn test_build_db_transaction_v0() {
let signature = Signature::new(&[1u8; 64]);
let signature = Signature::from([1u8; 64]);

let message_hash = Hash::new_unique();
let transaction = build_test_transaction_v0();
Expand Down

0 comments on commit 68a4471

Please sign in to comment.