Skip to content

feat: Ferment integration #2484

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

Closed
wants to merge 151 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
2d81a43
chore: tmp path refinement
pankcuf May 6, 2024
a774982
chore: platformvalueerror
pankcuf May 7, 2024
374f027
chore: renames
pankcuf May 17, 2024
1f2d3d7
Merge branch 'v1.0-dev' into test/ferment
pankcuf May 17, 2024
19ce453
chore: is compiling!
pankcuf May 17, 2024
ecbbe9b
chore: adapt to latest ferment + some experiments
pankcuf May 19, 2024
cab887c
Merge branch 'v1.0-dev' into test/ferment
pankcuf Jun 20, 2024
a12bb51
Merge branch 'v1.0-dev' into test/ferment
pankcuf Jul 27, 2024
30f884e
chore: fix merge
pankcuf Jul 27, 2024
c067c9f
chore: continue merge
pankcuf Jul 27, 2024
615cfc5
chore: compilable
pankcuf Jul 27, 2024
3251777
chore: drive/platform-version fixes
pankcuf Jul 27, 2024
be95138
chore: fix some paths
pankcuf Jul 27, 2024
c58374f
chore: 100% ferment coverage
pankcuf Jul 28, 2024
aebfc91
chore: tmp commit
pankcuf Oct 10, 2024
f199575
chore: tmp comment out
pankcuf Oct 10, 2024
1c72cdc
Merge branch 'v1.4-dev' into test/ferment
pankcuf Oct 10, 2024
9a459f1
chore: fix paths, disable tower patch
pankcuf Oct 11, 2024
1ecf72b
chore: fix imports
pankcuf Oct 11, 2024
49100ff
chore: refine import
pankcuf Oct 12, 2024
50326d9
chore: export some more objects
pankcuf Oct 13, 2024
dd110ff
chore: silence some warnings
pankcuf Oct 14, 2024
7c8ecd0
chore: fix import
pankcuf Oct 14, 2024
73e5388
chore: fix import
pankcuf Oct 14, 2024
b6562bc
Merge branch 'master' into test/ferment
pankcuf Dec 17, 2024
b5e2215
chore: forked rust-dashcore
pankcuf Dec 17, 2024
b980183
chore: remove bad merge artefacts
pankcuf Dec 17, 2024
383c7ff
chore: fix some other imports
pankcuf Dec 17, 2024
9cf4e90
Merge branch 'v1.9-dev' into test/ferment
pankcuf Dec 18, 2024
62fbf64
chore: versioned_feature_core
pankcuf Dec 18, 2024
a7e0d7d
chore: pub system_limits
pankcuf Dec 18, 2024
99e8c23
chore: AssetLockTransactionIsNotFoundError is now custom
pankcuf Dec 18, 2024
85d144b
chore: bls to apple
pankcuf Dec 18, 2024
fdea33f
chore: cargo.lock
pankcuf Dec 19, 2024
1195b92
chore: ferment DocumentContestNotPaidForError
pankcuf Dec 19, 2024
42bea4e
chore: pub fields
pankcuf Dec 19, 2024
db0e0e7
chore: maybe_dapi_client
pankcuf Dec 22, 2024
39b50f4
chore: missed brace
pankcuf Dec 22, 2024
1f94177
chore: tmp disable "with_native_roots"
pankcuf Dec 23, 2024
95b1111
Merge branch 'v1.8-dev' into test/ferment
pankcuf Jan 6, 2025
94f4871
chore: fix cargo.lock conflict
pankcuf Jan 6, 2025
77c817c
chore: silence dpp warnings
pankcuf Jan 6, 2025
96a1938
chore: add identity facade method "create_identity_create_transition_…
pankcuf Jan 9, 2025
466f551
chore: export DocumentTransitionActionType
pankcuf Jan 15, 2025
c886270
Merge branch 'v1.8-dev' into test/ferment
pankcuf Jan 15, 2025
a471560
chore: some path fixes
pankcuf Jan 15, 2025
3645fcf
chore: export DocumentTypeRef
pankcuf Jan 16, 2025
d443817
chore: ferment branch switch
pankcuf Jan 20, 2025
0d949f6
Merge branch 'master' into test/ferment
pankcuf Jan 20, 2025
d453fba
chore: ferment switch
pankcuf Jan 21, 2025
dba8080
chore: swtich dashcore-rpc to fork
pankcuf Jan 21, 2025
8c85907
chore: export IdentityCreditWithdrawalTransitionV1
pankcuf Jan 23, 2025
0442edf
chore: CoreScript -> ScriptBuf
pankcuf Jan 23, 2025
a1fd1cd
chore: export AssetLockTransactionIsNotFoundError
pankcuf Jan 23, 2025
13bda80
chore: export SystemDataContract
pankcuf Feb 4, 2025
3e58f5f
chore: data_contracts
pankcuf Feb 4, 2025
734f1cf
chore: switch dashcore to dashpay
pankcuf Feb 25, 2025
95e1c8f
chore: cargo.lock
pankcuf Feb 25, 2025
02995f6
chore: cargo.lock
pankcuf Feb 25, 2025
6f4a1fb
chore: update rust-dashcore to use "apple" feature
pankcuf Mar 3, 2025
276033f
Merge branch 'v2.0-dev' into test/ferment
pankcuf Mar 3, 2025
3aa6745
chore: merge continuation
pankcuf Mar 3, 2025
edd7f6a
chore: continuation (dpp/drive/sdk checked)
pankcuf Mar 3, 2025
dec2c5b
clean up
QuantumExplorer Mar 4, 2025
befc92d
fmt
QuantumExplorer Mar 4, 2025
58c57ea
Merge branch 'test/ferment' of github.com:dashpay/platform into test/…
QuantumExplorer Mar 4, 2025
6449f30
updates
QuantumExplorer Mar 4, 2025
05f0523
fmt
QuantumExplorer Mar 4, 2025
e6ccbf7
more fixes
QuantumExplorer Mar 4, 2025
c39363b
dpp tests working
QuantumExplorer Mar 4, 2025
c623eda
fixed abci
QuantumExplorer Mar 4, 2025
3ff4b79
more fixes
QuantumExplorer Mar 4, 2025
746f857
chore: continue
pankcuf Mar 4, 2025
f5d5cb5
chore: export batch & document transitions
pankcuf Mar 4, 2025
f5131d9
chore: export TokenAmount
pankcuf Mar 4, 2025
8e33d8f
chore: adjust some of the error imports
pankcuf Mar 4, 2025
ddb6aab
chore: fix transfer_document import
pankcuf Mar 4, 2025
04e21ac
chore: some more exports for compliance
pankcuf Mar 5, 2025
beba919
chore: remove some exports
pankcuf Mar 5, 2025
c14fa68
chore: remove exports
pankcuf Mar 5, 2025
8767116
chore: refine some error imports
pankcuf Mar 5, 2025
6b925e9
chore: export new errors
pankcuf Mar 5, 2025
b56f578
chore: explicit DataContractV1 reexport
pankcuf Mar 5, 2025
9af584d
chore: refine imports
pankcuf Mar 5, 2025
8bbe616
chore: export more errors, refine imports
pankcuf Mar 5, 2025
d9a0050
chore: make error mods public
pankcuf Mar 5, 2025
a09deca
chore: export some errors
pankcuf Mar 5, 2025
9e2be2c
chore: remove deprecated method, adjust apple features
pankcuf Mar 9, 2025
c557c36
chore: strict bincode to rc3
pankcuf Mar 9, 2025
4cff80b
chore: force bincode to 2.0.0-rc.3
pankcuf Mar 9, 2025
be8cc72
chore: adjust some imports with gaps, export some structs
pankcuf Mar 11, 2025
0cc2cba
chore: adjust & export some more
pankcuf Mar 11, 2025
149e53c
chore: adjust identifier imports
pankcuf Mar 11, 2025
6814152
chore: refine Identifier
pankcuf Mar 11, 2025
c9b0678
chore: refine imports
pankcuf Mar 11, 2025
afc3a9f
chore: refine some more
pankcuf Mar 11, 2025
ab69c7b
chore: remove unused export
pankcuf Mar 11, 2025
47e327e
Merge branch 'v2.0-dev' into test/ferment
pankcuf Mar 14, 2025
e236aaf
chore: new merge adjustment
pankcuf Mar 14, 2025
0053841
chore: add exports
pankcuf Mar 14, 2025
af22c31
chore: export more
pankcuf Mar 14, 2025
a25875f
Merge branch 'v2.0-dev' into test/ferment
pankcuf Mar 14, 2025
b549ce9
chore: adjustment after merge
pankcuf Mar 14, 2025
2f6eaec
chore: refine some dashcore imports
pankcuf Mar 21, 2025
bb74a19
chore: bump up bls-signatures
pankcuf Mar 29, 2025
2857de4
chore: bls trick
pankcuf Apr 1, 2025
5388036
chore: one more bls trick
pankcuf Apr 1, 2025
68dd527
chore: bls with lower ios target
pankcuf Apr 4, 2025
92cec4b
chore: ferment-macro optional
pankcuf Apr 6, 2025
201aa13
chore: ferment 0.2
pankcuf Apr 6, 2025
cccd8a4
chore: revert
pankcuf Apr 6, 2025
28f99bd
chore: revert ferment optionality
pankcuf Apr 6, 2025
45321be
chore: update bls-signatures version
pankcuf Apr 8, 2025
8aa2db9
chore: update bls-signatures
pankcuf Apr 8, 2025
c97481f
chore: don't use tls_config with_native_roots on ios
pankcuf Apr 29, 2025
2be89e2
Merge branch 'v2.0-dev' into test/ferment
pankcuf Apr 29, 2025
f2e9050
chore: ferment TokenPaymentInfo
pankcuf Apr 29, 2025
cd7c044
chore: import adj
pankcuf Apr 29, 2025
93d08f0
chore: refine imp
pankcuf Apr 29, 2025
b07050d
chore: ferment some
pankcuf Apr 29, 2025
bfcf10a
chore: pub token_costs
pankcuf Apr 29, 2025
2a666bb
chore: revert jsonschemavalidator
pankcuf Apr 29, 2025
6a622e6
chore: non-fermentable statelessjson...
pankcuf Apr 29, 2025
40d8433
chore: pub validator
pankcuf Apr 29, 2025
84b988f
chore: fix some dpp imports
pankcuf Apr 30, 2025
f5c449f
chore: fix imports
pankcuf Apr 30, 2025
86dc9f0
chore: export doc base transition v1
pankcuf Apr 30, 2025
9108595
Merge branch 'v2.0-dev' into test/ferment
pankcuf May 8, 2025
b547fb4
chore: adjust errors
pankcuf May 8, 2025
6f71fd3
chore: some exports
pankcuf May 8, 2025
b80b7d0
chore: export some
pankcuf May 8, 2025
f424eb3
chore: some exports
pankcuf May 8, 2025
ed1dcfe
chore: remove improperly merged stuff
pankcuf May 8, 2025
615752b
chore: remove improp merged data
pankcuf May 8, 2025
c3d4bd3
Merge branch 'v2.0-dev' into test/ferment
pankcuf May 20, 2025
48f56af
chore: remove merge artefacts
pankcuf May 20, 2025
0b51982
chore: export some bindings
pankcuf May 20, 2025
f3453a8
chore: update bls-signatures
pankcuf May 25, 2025
3e4b7a2
chore: up bls-signatures
pankcuf May 25, 2025
7da99a3
Merge branch 'v2.0-dev' into test/ferment
pankcuf May 25, 2025
6f649ed
chore: update imports
pankcuf May 25, 2025
faebe3d
chore: update bls-signatures
pankcuf May 25, 2025
da7ed06
chore: update bls-signatures
pankcuf May 25, 2025
a56cb52
chore: update bls-signatures
pankcuf May 25, 2025
c872dc4
chore: add some logs
pankcuf May 27, 2025
87fe8e4
chore: add more logs
pankcuf May 27, 2025
1a32cb4
chore: log
pankcuf May 27, 2025
7dc694d
chore: logs
pankcuf May 27, 2025
2d9b79b
Merge branch 'v2.0-dev' into test/ferment
pankcuf May 27, 2025
1394ee2
chore: log
pankcuf May 27, 2025
a2d69e2
Merge branch 'v2.0-dev' into test/ferment
pankcuf May 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
63 changes: 50 additions & 13 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion packages/dashpay-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ license = "MIT"
platform-version = { path = "../rs-platform-version" }
thiserror = "2.0.12"
serde_json = { version = "1.0" }
platform-value = { path = "../rs-platform-value" }
platform-value = { path = "../rs-platform-value" }
6 changes: 6 additions & 0 deletions packages/data-contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ dpns-contract = { path = "../dpns-contract" }
dashpay-contract = { path = "../dashpay-contract" }
feature-flags-contract = { path = "../feature-flags-contract" }
platform-value = { path = "../rs-platform-value" }
versioned-feature-core = "1.0.0"
wallet-utils-contract = { path = "../wallet-utils-contract" }
token-history-contract = { path = "../token-history-contract" }
keyword-search-contract = { path = "../keyword-search-contract" }
ferment-macro = { version = "0.2", package = "ferment-macro", optional = true }

[features]
default = []
apple = ["ferment-macro"]
2 changes: 1 addition & 1 deletion packages/data-contracts/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use platform_version::version::FeatureVersion;
use versioned_feature_core::FeatureVersion;

#[derive(thiserror::Error, Debug)]
pub enum Error {
Expand Down
1 change: 1 addition & 0 deletions packages/data-contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub use withdrawals_contract;

#[repr(u8)]
#[derive(PartialEq, Eq, Clone, Copy, Debug, Ord, PartialOrd, Hash)]
#[cfg_attr(feature = "apple", ferment_macro::export)]
pub enum SystemDataContract {
Withdrawals = 0,
MasternodeRewards = 1,
Expand Down
2 changes: 1 addition & 1 deletion packages/dpns-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ license = "MIT"
thiserror = "2.0.12"
platform-version = { path = "../rs-platform-version" }
serde_json = { version = "1.0" }
platform-value = { path = "../rs-platform-value" }
platform-value = { path = "../rs-platform-value" }
2 changes: 1 addition & 1 deletion packages/feature-flags-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ license = "MIT"
thiserror = "2.0.12"
platform-version = { path = "../rs-platform-version" }
serde_json = { version = "1.0" }
platform-value = { path = "../rs-platform-value" }
platform-value = { path = "../rs-platform-value" }
2 changes: 1 addition & 1 deletion packages/masternode-reward-shares-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ license = "MIT"
thiserror = "2.0.12"
platform-version = { path = "../rs-platform-version" }
serde_json = { version = "1.0" }
platform-value = { path = "../rs-platform-value" }
platform-value = { path = "../rs-platform-value" }
9 changes: 6 additions & 3 deletions packages/rs-dapi-client/src/transport/tonic_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ pub fn create_channel(
let host = uri.host().expect("Failed to get host from URI").to_string();

let mut builder = Channel::builder(uri);
let mut tls_config = ClientTlsConfig::new()
.with_native_roots()
.with_webpki_roots()
let mut tls_config = ClientTlsConfig::new();
#[cfg(not(target_os = "ios"))]
{
tls_config = tls_config.with_native_roots();
}
tls_config = tls_config.with_webpki_roots()
.assume_http2(true);

if let Some(settings) = settings {
Expand Down
7 changes: 5 additions & 2 deletions packages/rs-dpp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dashcore = { git = "https://github.com/dashpay/rust-dashcore", features = [
"rand",
"signer",
"serde",
], default-features = false, tag = "v0.39.6" }
], default-features = false, branch = "feat/ferment" }
env_logger = { version = "0.11" }
getrandom = { version = "0.2", features = ["js"] }
hex = { version = "0.4" }
Expand Down Expand Up @@ -62,7 +62,9 @@ indexmap = { version = "2.7.0", features = ["serde"] }
strum = { version = "0.26", features = ["derive"] }
json-schema-compatibility-validator = { path = '../rs-json-schema-compatibility-validator', optional = true }
once_cell = "1.19.0"

ferment = { version = "0.2", package = "ferment", optional = true }
ferment-macro = { version = "0.2", package = "ferment-macro", optional = true }
versioned-feature-core = "1.0.0"
[dev-dependencies]
test-case = { version = "3.3" }
tokio = { version = "1.40", features = ["full"] }
Expand All @@ -77,6 +79,7 @@ log = { version = "0.4.27" }
default = ["state-transitions"]
core_verification = ["dashcore/message_verification"]
core_quorum_validation = ["dashcore/quorum_validation"]
apple = ["ferment", "ferment-macro", "core_verification", "core_quorum_validation", "platform-version/apple", "data-contracts/apple", "dash-sdk-features", "platform-value/apple", "system_contracts"]
bls-signatures = ["dashcore/bls"]
ed25519-dalek = ["dashcore/eddsa"]
all_features = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::asset_lock::reduced_asset_lock_value::v0::AssetLockValueV0;
use crate::fee::Credits;
use crate::balances::credits::Credits;
use crate::ProtocolError;
use bincode::{Decode, Encode};
use derive_more::From;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::fee::Credits;
use crate::balances::credits::Credits;
use bincode::{Decode, Encode};
use platform_value::Bytes32;

Expand Down
5 changes: 4 additions & 1 deletion packages/rs-dpp/src/balances/credits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@
//! and unlocking dash on the payment chain.
//!

use crate::ProtocolError;
use crate::errors::ProtocolError;
use integer_encoding::VarInt;
use std::convert::TryFrom;

/// Duffs type
pub type Duffs = u64;

/// Credits type
#[cfg_attr(feature = "apple", ferment_macro::export)]
pub type Credits = u64;

/// Token Amount type
#[cfg_attr(feature = "apple", ferment_macro::export)]
pub type TokenAmount = u64;

/// Signed Token Amount type
Expand All @@ -29,6 +31,7 @@ pub type SumTokenAmount = i128;

/// Signed Credits type is used for internal computations and total credits
/// balance verification
#[cfg_attr(feature = "apple", ferment_macro::export)]
pub type SignedCredits = i64;

/// Maximum value of credits
Expand Down
1 change: 1 addition & 0 deletions packages/rs-dpp/src/block/block_info/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub const DEFAULT_BLOCK_INFO: BlockInfo = BlockInfo {
// @immutable
/// Block information
#[derive(Clone, Copy, Default, Debug, PartialEq, Eq, Encode, Decode, Serialize, Deserialize)]
#[cfg_attr(feature = "apple", ferment_macro::export)]
pub struct BlockInfo {
/// Block time in milliseconds
pub time_ms: TimestampMillis,
Expand Down
Loading
Loading