Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(drive)!: just in time fee update fixes #2075

Merged
merged 18 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 0 additions & 1 deletion packages/rs-drive-abci/src/abci/config.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Configuration of ABCI Application server

use crate::utils::from_opt_str_or_number;
use dpp::prelude::TimestampMillis;
use serde::{Deserialize, Serialize};

// We allow changes in the ABCI configuration, but there should be a social process
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
Loading