Skip to content

Commit

Permalink
fix(drive)!: just in time fee update fixes (#2075)
Browse files Browse the repository at this point in the history
Co-authored-by: Odysseas Gabrielides <[email protected]>
  • Loading branch information
QuantumExplorer and ogabrielides authored Aug 24, 2024
1 parent d48b399 commit a38cd63
Show file tree
Hide file tree
Showing 31 changed files with 725 additions and 976 deletions.
72 changes: 48 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/rs-drive-abci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ tokio-util = { version = "0.7.8" }
derive_more = "0.99.17"
async-trait = "0.1.77"
console-subscriber = { version = "0.2.0", optional = true }
once_cell = "1.19.0"

[dev-dependencies]
bs58 = { version = "0.5.0"}
base64 = "0.22.1"
platform-version = { path = "../rs-platform-version", features = [
"mock-versions",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,28 @@ mod refund_tests {
use dpp::data_contract::document_type::DocumentTypeRef;
use dpp::document::document_methods::DocumentMethodsV0;
use dpp::document::serialization_traits::DocumentPlatformConversionMethodsV0;
use dpp::document::{Document, DocumentV0Setters};
use dpp::document::{Document, DocumentV0Getters, DocumentV0Setters};
use dpp::fee::default_costs::CachedEpochIndexFeeVersions;
use dpp::fee::fee_result::FeeResult;
use dpp::fee::Credits;
use dpp::identity::accessors::IdentityGettersV0;
use dpp::identity::{Identity, IdentityPublicKey};
use dpp::platform_value::Bytes32;
use dpp::prelude::CoreBlockHeight;
use dpp::state_transition::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0;
use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition;
use drive::util::test_helpers::setup_contract;
use once_cell::sync::Lazy;
use platform_version::version::PlatformVersion;
use rand::prelude::StdRng;
use rand::SeedableRng;
use simple_signer::signer::SimpleSigner;
use std::collections::BTreeMap;
use std::ops::Deref;

static EPOCH_CHANGE_FEE_VERSION_TEST: Lazy<CachedEpochIndexFeeVersions> =
Lazy::new(|| BTreeMap::from([(0, PlatformVersion::first().fee_version.clone())]));

// There's a fee for the first document that a user creates on a contract as they add space
// For the identity data contract nonce
fn setup_join_contract_document<'a>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ pub mod transformer;
pub use state_transitions::*;

#[cfg(test)]
pub(crate) use state_transitions::tests;
pub(in crate::execution) use state_transitions::tests;
Loading

0 comments on commit a38cd63

Please sign in to comment.