Revert "Update DEFAULT_FEE to 10_000 from 1000"

This reverts commit 2a6dc59c5d.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Emma Hopwood 2023-05-09 13:15:52 +01:00
parent d37e6adee5
commit 4cf27126e5
6 changed files with 17 additions and 19 deletions

View File

@ -185,7 +185,7 @@ mod tests {
&Vec::<TxOut>::new(), &Vec::<TxOut>::new(),
&[TestSaplingInput { &[TestSaplingInput {
note_id: 0, note_id: 0,
value: Amount::from_u64(60000).unwrap(), value: Amount::from_u64(45000).unwrap(),
}], }],
&[SaplingPayment::new(Amount::from_u64(40000).unwrap())], &[SaplingPayment::new(Amount::from_u64(40000).unwrap())],
&DustOutputPolicy::default(), &DustOutputPolicy::default(),
@ -193,8 +193,8 @@ mod tests {
assert_matches!( assert_matches!(
result, result,
Ok(balance) if balance.proposed_change() == [ChangeValue::Sapling(Amount::from_u64(10000).unwrap())] Ok(balance) if balance.proposed_change() == [ChangeValue::Sapling(Amount::from_u64(4000).unwrap())]
&& balance.fee_required() == Amount::from_u64(10000).unwrap() && balance.fee_required() == Amount::from_u64(1000).unwrap()
); );
} }
@ -218,7 +218,7 @@ mod tests {
// enough to pay a fee, plus dust // enough to pay a fee, plus dust
TestSaplingInput { TestSaplingInput {
note_id: 0, note_id: 0,
value: Amount::from_u64(10100).unwrap(), value: Amount::from_u64(1100).unwrap(),
}, },
], ],
&[SaplingPayment::new(Amount::from_u64(40000).unwrap())], &[SaplingPayment::new(Amount::from_u64(40000).unwrap())],
@ -228,7 +228,7 @@ mod tests {
assert_matches!( assert_matches!(
result, result,
Err(ChangeError::InsufficientFunds { available, required }) Err(ChangeError::InsufficientFunds { available, required })
if available == Amount::from_u64(50100).unwrap() && required == Amount::from_u64(60000).unwrap() if available == Amount::from_u64(41100).unwrap() && required == Amount::from_u64(42000).unwrap()
); );
} }
} }

View File

@ -354,7 +354,7 @@ mod tests {
available, available,
required required
}) })
if available == Amount::zero() && required == Amount::from_u64(10001).unwrap() if available == Amount::zero() && required == Amount::from_u64(1001).unwrap()
); );
} }
@ -437,7 +437,7 @@ mod tests {
required required
}) })
if available == Amount::from_u64(50000).unwrap() if available == Amount::from_u64(50000).unwrap()
&& required == Amount::from_u64(80000).unwrap() && required == Amount::from_u64(71000).unwrap()
); );
// Mine blocks SAPLING_ACTIVATION_HEIGHT + 2 to 9 until just before the second // Mine blocks SAPLING_ACTIVATION_HEIGHT + 2 to 9 until just before the second
@ -472,7 +472,7 @@ mod tests {
required required
}) })
if available == Amount::from_u64(50000).unwrap() if available == Amount::from_u64(50000).unwrap()
&& required == Amount::from_u64(80000).unwrap() && required == Amount::from_u64(71000).unwrap()
); );
// Mine block 11 so that the second note becomes verified // Mine block 11 so that the second note becomes verified
@ -568,7 +568,7 @@ mod tests {
available, available,
required required
}) })
if available == Amount::zero() && required == Amount::from_u64(12000).unwrap() if available == Amount::zero() && required == Amount::from_u64(3000).unwrap()
); );
// Mine blocks SAPLING_ACTIVATION_HEIGHT + 1 to 21 (that don't send us funds) // Mine blocks SAPLING_ACTIVATION_HEIGHT + 1 to 21 (that don't send us funds)
@ -602,7 +602,7 @@ mod tests {
available, available,
required required
}) })
if available == Amount::zero() && required == Amount::from_u64(12000).unwrap() if available == Amount::zero() && required == Amount::from_u64(3000).unwrap()
); );
// Mine block SAPLING_ACTIVATION_HEIGHT + 22 so that the first transaction expires // 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(); let dfvk = usk.sapling().to_diversifiable_full_viewing_key();
// Add funds to the wallet in a single note // Add funds to the wallet in a single note
let value = Amount::from_u64(60000).unwrap(); let value = Amount::from_u64(51000).unwrap();
let (cb, _) = fake_compact_block( let (cb, _) = fake_compact_block(
sapling_activation_height(), sapling_activation_height(),
BlockHash([0; 32]), BlockHash([0; 32]),
@ -806,7 +806,7 @@ mod tests {
let dfvk = usk.sapling().to_diversifiable_full_viewing_key(); let dfvk = usk.sapling().to_diversifiable_full_viewing_key();
// Add funds to the wallet in a single note // Add funds to the wallet in a single note
let value = Amount::from_u64(60000).unwrap(); let value = Amount::from_u64(51000).unwrap();
let (cb, _) = fake_compact_block( let (cb, _) = fake_compact_block(
sapling_activation_height(), sapling_activation_height(),
BlockHash([0; 32]), BlockHash([0; 32]),

View File

@ -812,7 +812,7 @@ mod tests {
// create some inputs to spend // create some inputs to spend
let extsk = ExtendedSpendingKey::master(&[]); let extsk = ExtendedSpendingKey::master(&[]);
let to = extsk.default_address().1; let to = extsk.default_address().1;
let note1 = to.create_note(110000, Rseed::BeforeZip212(jubjub::Fr::random(&mut rng))); let note1 = to.create_note(101000, Rseed::BeforeZip212(jubjub::Fr::random(&mut rng)));
let cm1 = Node::from_cmu(&note1.cmu()); let cm1 = Node::from_cmu(&note1.cmu());
let mut tree = sapling::CommitmentTree::empty(); let mut tree = sapling::CommitmentTree::empty();
// fake that the note appears in some previous // fake that the note appears in some previous

View File

@ -8,8 +8,6 @@ and this library adheres to Rust's notion of
## [Unreleased] ## [Unreleased]
### Changed ### Changed
- Bumped dependencies to `secp256k1 0.26`, `hdwallet 0.4`. - Bumped dependencies to `secp256k1 0.26`, `hdwallet 0.4`.
- `zcash_primitives::transactions::component::amount::DEFAULT_FEE` increased zip317
minimum possible fee.
### Removed ### Removed
- `merkle_tree::Hashable` has been removed and its uses have been replaced by - `merkle_tree::Hashable` has been removed and its uses have been replaced by

View File

@ -646,7 +646,7 @@ mod tests {
builder builder
.add_transparent_output( .add_transparent_output(
&TransparentAddress::PublicKey([0; 20]), &TransparentAddress::PublicKey([0; 20]),
Amount::from_u64(40000).unwrap(), Amount::from_u64(49000).unwrap(),
) )
.unwrap(); .unwrap();
@ -682,7 +682,7 @@ mod tests {
builder builder
.add_transparent_output( .add_transparent_output(
&TransparentAddress::PublicKey([0; 20]), &TransparentAddress::PublicKey([0; 20]),
Amount::from_u64(40000).unwrap(), Amount::from_u64(49000).unwrap(),
) )
.unwrap(); .unwrap();
@ -771,7 +771,7 @@ mod tests {
); );
} }
let note1 = to.create_note(59999, Rseed::BeforeZip212(jubjub::Fr::random(&mut rng))); let note1 = to.create_note(50999, Rseed::BeforeZip212(jubjub::Fr::random(&mut rng)));
let cmu1 = Node::from_cmu(&note1.cmu()); let cmu1 = Node::from_cmu(&note1.cmu());
let mut tree = CommitmentTree::<Node, 32>::empty(); let mut tree = CommitmentTree::<Node, 32>::empty();
tree.append(cmu1).unwrap(); tree.append(cmu1).unwrap();

View File

@ -8,7 +8,7 @@ use orchard::value as orchard;
pub const COIN: i64 = 1_0000_0000; pub const COIN: i64 = 1_0000_0000;
pub const MAX_MONEY: i64 = 21_000_000 * COIN; pub const MAX_MONEY: i64 = 21_000_000 * COIN;
pub const DEFAULT_FEE: Amount = Amount(10_000); pub const DEFAULT_FEE: Amount = Amount(1000);
/// A type-safe representation of some quantity of Zcash. /// A type-safe representation of some quantity of Zcash.
/// ///