Merge pull request #830 from zingolabs/update_fixed_fee_to_zip317_minimum
Update DEFAULT_FEE to 10_000 from 1000
This commit is contained in:
commit
882d60a915
|
@ -185,7 +185,7 @@ mod tests {
|
|||
&Vec::<TxOut>::new(),
|
||||
&[TestSaplingInput {
|
||||
note_id: 0,
|
||||
value: Amount::from_u64(45000).unwrap(),
|
||||
value: Amount::from_u64(60000).unwrap(),
|
||||
}],
|
||||
&[SaplingPayment::new(Amount::from_u64(40000).unwrap())],
|
||||
&DustOutputPolicy::default(),
|
||||
|
@ -193,8 +193,8 @@ mod tests {
|
|||
|
||||
assert_matches!(
|
||||
result,
|
||||
Ok(balance) if balance.proposed_change() == [ChangeValue::Sapling(Amount::from_u64(4000).unwrap())]
|
||||
&& balance.fee_required() == Amount::from_u64(1000).unwrap()
|
||||
Ok(balance) if balance.proposed_change() == [ChangeValue::Sapling(Amount::from_u64(10000).unwrap())]
|
||||
&& balance.fee_required() == Amount::from_u64(10000).unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ mod tests {
|
|||
// enough to pay a fee, plus dust
|
||||
TestSaplingInput {
|
||||
note_id: 0,
|
||||
value: Amount::from_u64(1100).unwrap(),
|
||||
value: Amount::from_u64(10100).unwrap(),
|
||||
},
|
||||
],
|
||||
&[SaplingPayment::new(Amount::from_u64(40000).unwrap())],
|
||||
|
@ -228,7 +228,7 @@ mod tests {
|
|||
assert_matches!(
|
||||
result,
|
||||
Err(ChangeError::InsufficientFunds { available, required })
|
||||
if available == Amount::from_u64(41100).unwrap() && required == Amount::from_u64(42000).unwrap()
|
||||
if available == Amount::from_u64(50100).unwrap() && required == Amount::from_u64(60000).unwrap()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -354,7 +354,7 @@ mod tests {
|
|||
available,
|
||||
required
|
||||
})
|
||||
if available == Amount::zero() && required == Amount::from_u64(1001).unwrap()
|
||||
if available == Amount::zero() && required == Amount::from_u64(10001).unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -437,7 +437,7 @@ mod tests {
|
|||
required
|
||||
})
|
||||
if available == Amount::from_u64(50000).unwrap()
|
||||
&& required == Amount::from_u64(71000).unwrap()
|
||||
&& required == Amount::from_u64(80000).unwrap()
|
||||
);
|
||||
|
||||
// Mine blocks SAPLING_ACTIVATION_HEIGHT + 2 to 9 until just before the second
|
||||
|
@ -472,7 +472,7 @@ mod tests {
|
|||
required
|
||||
})
|
||||
if available == Amount::from_u64(50000).unwrap()
|
||||
&& required == Amount::from_u64(71000).unwrap()
|
||||
&& required == Amount::from_u64(80000).unwrap()
|
||||
);
|
||||
|
||||
// Mine block 11 so that the second note becomes verified
|
||||
|
@ -568,7 +568,7 @@ mod tests {
|
|||
available,
|
||||
required
|
||||
})
|
||||
if available == Amount::zero() && required == Amount::from_u64(3000).unwrap()
|
||||
if available == Amount::zero() && required == Amount::from_u64(12000).unwrap()
|
||||
);
|
||||
|
||||
// Mine blocks SAPLING_ACTIVATION_HEIGHT + 1 to 21 (that don't send us funds)
|
||||
|
@ -602,7 +602,7 @@ mod tests {
|
|||
available,
|
||||
required
|
||||
})
|
||||
if available == Amount::zero() && required == Amount::from_u64(3000).unwrap()
|
||||
if available == Amount::zero() && required == Amount::from_u64(12000).unwrap()
|
||||
);
|
||||
|
||||
// Mine block SAPLING_ACTIVATION_HEIGHT + 22 so that the first transaction expires
|
||||
|
@ -752,7 +752,7 @@ mod tests {
|
|||
let dfvk = usk.sapling().to_diversifiable_full_viewing_key();
|
||||
|
||||
// Add funds to the wallet in a single note
|
||||
let value = Amount::from_u64(51000).unwrap();
|
||||
let value = Amount::from_u64(60000).unwrap();
|
||||
let (cb, _) = fake_compact_block(
|
||||
sapling_activation_height(),
|
||||
BlockHash([0; 32]),
|
||||
|
@ -806,7 +806,7 @@ mod tests {
|
|||
let dfvk = usk.sapling().to_diversifiable_full_viewing_key();
|
||||
|
||||
// Add funds to the wallet in a single note
|
||||
let value = Amount::from_u64(51000).unwrap();
|
||||
let value = Amount::from_u64(60000).unwrap();
|
||||
let (cb, _) = fake_compact_block(
|
||||
sapling_activation_height(),
|
||||
BlockHash([0; 32]),
|
||||
|
|
|
@ -814,7 +814,7 @@ mod tests {
|
|||
// create some inputs to spend
|
||||
let extsk = ExtendedSpendingKey::master(&[]);
|
||||
let to = extsk.default_address().1;
|
||||
let note1 = to.create_note(101000, Rseed::BeforeZip212(jubjub::Fr::random(&mut rng)));
|
||||
let note1 = to.create_note(110000, Rseed::BeforeZip212(jubjub::Fr::random(&mut rng)));
|
||||
let cm1 = Node::from_cmu(¬e1.cmu());
|
||||
let mut tree = CommitmentTree::empty();
|
||||
// fake that the note appears in some previous
|
||||
|
|
|
@ -6,6 +6,9 @@ and this library adheres to Rust's notion of
|
|||
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Changed
|
||||
- `zcash_primitives::transactions::component::amount::DEFAULT_FEE` increased zip317
|
||||
minimum possible fee.
|
||||
|
||||
## [0.11.0] - 2023-04-15
|
||||
### Added
|
||||
|
|
|
@ -653,7 +653,7 @@ mod tests {
|
|||
builder
|
||||
.add_transparent_output(
|
||||
&TransparentAddress::PublicKey([0; 20]),
|
||||
Amount::from_u64(49000).unwrap(),
|
||||
Amount::from_u64(40000).unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
@ -689,7 +689,7 @@ mod tests {
|
|||
builder
|
||||
.add_transparent_output(
|
||||
&TransparentAddress::PublicKey([0; 20]),
|
||||
Amount::from_u64(49000).unwrap(),
|
||||
Amount::from_u64(40000).unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
@ -778,7 +778,7 @@ mod tests {
|
|||
);
|
||||
}
|
||||
|
||||
let note1 = to.create_note(50999, Rseed::BeforeZip212(jubjub::Fr::random(&mut rng)));
|
||||
let note1 = to.create_note(59999, Rseed::BeforeZip212(jubjub::Fr::random(&mut rng)));
|
||||
let cmu1 = Node::from_cmu(¬e1.cmu());
|
||||
let mut tree = CommitmentTree::empty();
|
||||
tree.append(cmu1).unwrap();
|
||||
|
|
|
@ -8,7 +8,7 @@ use orchard::value as orchard;
|
|||
pub const COIN: i64 = 1_0000_0000;
|
||||
pub const MAX_MONEY: i64 = 21_000_000 * COIN;
|
||||
|
||||
pub const DEFAULT_FEE: Amount = Amount(1000);
|
||||
pub const DEFAULT_FEE: Amount = Amount(10_000);
|
||||
|
||||
/// A type-safe representation of some quantity of Zcash.
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue