diff --git a/base_layer/core/src/transactions/coinbase_builder.rs b/base_layer/core/src/transactions/coinbase_builder.rs index e73b3e35f4..724b07ef88 100644 --- a/base_layer/core/src/transactions/coinbase_builder.rs +++ b/base_layer/core/src/transactions/coinbase_builder.rs @@ -225,7 +225,7 @@ impl CoinbaseBuilder { // TODO: Verify bullet proof? let output = if let Some(rewind_data) = self.rewind_data.as_ref() { unblinded_output - .as_rewindable_transaction_output(&self.factories, rewind_data) + .as_rewindable_transaction_output(&self.factories, rewind_data, None) .map_err(|e| CoinbaseBuildError::BuildError(e.to_string()))? } else { unblinded_output diff --git a/base_layer/core/src/transactions/transaction/test.rs b/base_layer/core/src/transactions/transaction/test.rs index 087d21a590..2c513bbab6 100644 --- a/base_layer/core/src/transactions/transaction/test.rs +++ b/base_layer/core/src/transactions/transaction/test.rs @@ -398,7 +398,7 @@ fn test_output_rewinding() { ..Default::default() }); let output = unblinded_output - .as_rewindable_transaction_output(&factories, &rewind_data) + .as_rewindable_transaction_output(&factories, &rewind_data, None) .unwrap(); assert!(matches!( diff --git a/base_layer/core/src/transactions/transaction/unblinded_output.rs b/base_layer/core/src/transactions/transaction/unblinded_output.rs index 16f4769cce..8887fb8b54 100644 --- a/base_layer/core/src/transactions/transaction/unblinded_output.rs +++ b/base_layer/core/src/transactions/transaction/unblinded_output.rs @@ -218,6 +218,7 @@ impl UnblindedOutput { &self, factories: &CryptoFactories, rewind_data: &RewindData, + range_proof: Option<&RangeProof>, ) -> Result { if factories.range_proof.range() < 64 && self.value >= MicroTari::from(1u64.shl(&factories.range_proof.range())) { @@ -227,16 +228,19 @@ impl UnblindedOutput { } let commitment = factories.commitment.commit(&self.spending_key, &self.value.into()); - let proof_bytes = factories.range_proof.construct_proof_with_rewind_key( - &self.spending_key, - self.value.into(), - &rewind_data.rewind_key, - &rewind_data.rewind_blinding_key, - &rewind_data.proof_message, - )?; - - let proof = RangeProof::from_bytes(&proof_bytes) - .map_err(|_| TransactionError::RangeProofError(RangeProofError::ProofConstructionError))?; + let proof = if let Some(proof) = range_proof { + proof.clone() + } else { + let proof_bytes = factories.range_proof.construct_proof_with_rewind_key( + &self.spending_key, + self.value.into(), + &rewind_data.rewind_key, + &rewind_data.rewind_blinding_key, + &rewind_data.proof_message, + )?; + RangeProof::from_bytes(&proof_bytes) + .map_err(|_| TransactionError::RangeProofError(RangeProofError::ProofConstructionError))? + }; let output = TransactionOutput::new_current_version( self.features.clone(), diff --git a/base_layer/core/src/transactions/transaction_protocol/transaction_initializer.rs b/base_layer/core/src/transactions/transaction_protocol/transaction_initializer.rs index 4b7f34bf3e..e01e580904 100644 --- a/base_layer/core/src/transactions/transaction_protocol/transaction_initializer.rs +++ b/base_layer/core/src/transactions/transaction_protocol/transaction_initializer.rs @@ -503,7 +503,7 @@ impl SenderTransactionInitializer { .iter() .map(|o| { if let Some(rewind_data) = self.rewind_data.as_ref() { - o.as_rewindable_transaction_output(factories, rewind_data) + o.as_rewindable_transaction_output(factories, rewind_data, None) } else { o.as_transaction_output(factories) } @@ -527,7 +527,7 @@ impl SenderTransactionInitializer { // If rewind data is present we produce a rewindable output, else a standard output let change_output = if let Some(rewind_data) = self.rewind_data.as_ref() { // TODO: Should proof be verified? - match change_unblinded_output.as_rewindable_transaction_output(factories, rewind_data) { + match change_unblinded_output.as_rewindable_transaction_output(factories, rewind_data, None) { Ok(o) => o, Err(e) => { return self.build_err(e.to_string().as_str()); diff --git a/base_layer/wallet/src/output_manager_service/handle.rs b/base_layer/wallet/src/output_manager_service/handle.rs index 99631df820..315c931a6a 100644 --- a/base_layer/wallet/src/output_manager_service/handle.rs +++ b/base_layer/wallet/src/output_manager_service/handle.rs @@ -32,7 +32,7 @@ use tari_core::{ transactions::{ tari_amount::MicroTari, transaction::{OutputFeatures, Transaction, TransactionOutput, UnblindedOutput, UnblindedOutputBuilder}, - transaction_protocol::sender::TransactionSenderMessage, + transaction_protocol::{sender::TransactionSenderMessage, RewindData}, ReceiverTransactionProtocol, SenderTransactionProtocol, }, @@ -57,6 +57,7 @@ pub enum OutputManagerRequest { GetBalance, AddOutput((Box, Option)), AddOutputWithTxId((TxId, Box, Option)), + AddRewindableOutputWithTxId((TxId, Box, Option, Option)), AddUnvalidatedOutput((TxId, Box, Option)), UpdateOutputMetadataSignature(Box), GetRecipientTransaction(TransactionSenderMessage), @@ -127,6 +128,7 @@ impl fmt::Display for OutputManagerRequest { GetBalance => write!(f, "GetBalance"), AddOutput((v, _)) => write!(f, "AddOutput ({})", v.value), AddOutputWithTxId((t, v, _)) => write!(f, "AddOutputWithTxId ({}: {})", t, v.value), + AddRewindableOutputWithTxId((t, v, _, _)) => write!(f, "AddRewindableOutputWithTxId ({}: {})", t, v.value), AddUnvalidatedOutput((t, v, _)) => { write!(f, "AddUnvalidatedOutput ({}: {})", t, v.value) }, @@ -315,6 +317,28 @@ impl OutputManagerHandle { } } + pub async fn add_rewindable_output_with_tx_id( + &mut self, + tx_id: TxId, + output: UnblindedOutput, + spend_priority: Option, + custom_rewind_data: Option, + ) -> Result<(), OutputManagerError> { + match self + .handle + .call(OutputManagerRequest::AddRewindableOutputWithTxId(( + tx_id, + Box::new(output), + spend_priority, + custom_rewind_data, + ))) + .await?? + { + OutputManagerResponse::OutputAdded => Ok(()), + _ => Err(OutputManagerError::UnexpectedApiResponse), + } + } + pub async fn add_unvalidated_output( &mut self, tx_id: TxId, diff --git a/base_layer/wallet/src/output_manager_service/recovery/standard_outputs_recoverer.rs b/base_layer/wallet/src/output_manager_service/recovery/standard_outputs_recoverer.rs index 9052a10d6c..f1f7c73f83 100644 --- a/base_layer/wallet/src/output_manager_service/recovery/standard_outputs_recoverer.rs +++ b/base_layer/wallet/src/output_manager_service/recovery/standard_outputs_recoverer.rs @@ -24,7 +24,7 @@ use std::{sync::Arc, time::Instant}; use log::*; use rand::rngs::OsRng; -use tari_common_types::types::{PrivateKey, PublicKey}; +use tari_common_types::types::{PrivateKey, PublicKey, RangeProof}; use tari_core::transactions::{ transaction::{TransactionOutput, UnblindedOutput}, CryptoFactories, @@ -75,7 +75,7 @@ where TBackend: OutputManagerBackend + 'static ) -> Result, OutputManagerError> { let start = Instant::now(); let outputs_length = outputs.len(); - let mut rewound_outputs: Vec = outputs + let mut rewound_outputs: Vec<(UnblindedOutput, RangeProof)> = outputs .into_iter() .filter_map(|output| { output @@ -87,14 +87,15 @@ where TBackend: OutputManagerBackend + 'static .ok() .map(|v| ( v, output ) ) }) - //Todo this needs some investigation. We assume Nop script here and recovery here might create an unspendable output if the script does not equal Nop. + //TODO: This needs some investigation. We assume Nop script here and recovery here might create an + //TODO: unspendable output if the script does not equal Nop. .map( |(rewind_result, output)| { // Todo we need to look here that we might want to fail a specific output and not recover it as this // will only work if the script is a Nop script. If this is not a Nop script the recovered input // will not be spendable. let script_key = PrivateKey::random(&mut OsRng); - UnblindedOutput::new( + (UnblindedOutput::new( output.version, rewind_result.committed_value, rewind_result.blinding_factor, @@ -106,7 +107,8 @@ where TBackend: OutputManagerBackend + 'static output.metadata_signature, 0, output.covenant - ) + ), + output.proof) }, ) .collect(); @@ -118,11 +120,17 @@ where TBackend: OutputManagerBackend + 'static rewind_time.as_millis(), ); - for output in rewound_outputs.iter_mut() { + for (output, proof) in rewound_outputs.iter_mut() { self.update_outputs_script_private_key_and_update_key_manager_index(output) .await?; - let db_output = DbUnblindedOutput::from_unblinded_output(output.clone(), &self.factories, None)?; + let db_output = DbUnblindedOutput::rewindable_from_unblinded_output( + output.clone(), + &self.factories, + self.master_key_manager.rewind_data(), + None, + Some(proof), + )?; let output_hex = db_output.commitment.to_hex(); if let Err(e) = self.db.add_unspent_output(db_output).await { match e { @@ -145,6 +153,7 @@ where TBackend: OutputManagerBackend + 'static ); } + let rewound_outputs = rewound_outputs.iter().map(|(ro, _)| ro.clone()).collect(); Ok(rewound_outputs) } diff --git a/base_layer/wallet/src/output_manager_service/service.rs b/base_layer/wallet/src/output_manager_service/service.rs index 3f51a32f8f..3dfb07ecc1 100644 --- a/base_layer/wallet/src/output_manager_service/service.rs +++ b/base_layer/wallet/src/output_manager_service/service.rs @@ -47,7 +47,7 @@ use tari_core::{ UnblindedOutput, UnblindedOutputBuilder, }, - transaction_protocol::sender::TransactionSenderMessage, + transaction_protocol::{sender::TransactionSenderMessage, RewindData}, CoinbaseBuilder, CryptoFactories, ReceiverTransactionProtocol, @@ -206,6 +206,10 @@ where .add_output(Some(tx_id), *uo, spend_priority) .await .map(|_| OutputManagerResponse::OutputAdded), + OutputManagerRequest::AddRewindableOutputWithTxId((tx_id, uo, spend_priority, custom_rewind_data)) => self + .add_rewindable_output(Some(tx_id), *uo, spend_priority, custom_rewind_data) + .await + .map(|_| OutputManagerResponse::OutputAdded), OutputManagerRequest::AddUnvalidatedOutput((tx_id, uo, spend_priority)) => self .add_unvalidated_output(tx_id, *uo, spend_priority) .await @@ -530,6 +534,43 @@ where Ok(()) } + /// Add an unblinded rewindable output to the outputs table and marks is as `Unspent`. + pub async fn add_rewindable_output( + &mut self, + tx_id: Option, + output: UnblindedOutput, + spend_priority: Option, + custom_rewind_data: Option, + ) -> Result<(), OutputManagerError> { + debug!( + target: LOG_TARGET, + "Add output of value {} to Output Manager", output.value + ); + + let rewind_data = if let Some(value) = custom_rewind_data { + value + } else { + self.resources.master_key_manager.rewind_data().clone() + }; + let output = DbUnblindedOutput::rewindable_from_unblinded_output( + output, + &self.resources.factories, + &rewind_data, + spend_priority, + None, + )?; + debug!( + target: LOG_TARGET, + "saving output of hash {} to Output Manager", + output.hash.to_hex() + ); + match tx_id { + None => self.resources.db.add_unspent_output(output).await?, + Some(t) => self.resources.db.add_unspent_output_with_tx_id(t, output).await?, + } + Ok(()) + } + /// Add an unblinded output to the outputs table and marks is as `EncumberedToBeReceived`. This is so that it will /// require a successful validation to confirm that it indeed spendable. pub async fn add_unvalidated_output( @@ -610,7 +651,7 @@ where .get_next_spend_and_script_key() .await?; - let output = DbUnblindedOutput::from_unblinded_output( + let output = DbUnblindedOutput::rewindable_from_unblinded_output( UnblindedOutput::new_current_version( single_round_sender_data.amount, spending_key.clone(), @@ -634,6 +675,8 @@ where single_round_sender_data.covenant.clone(), ), &self.resources.factories, + self.resources.master_key_manager.rewind_data(), + None, None, )?; @@ -828,9 +871,11 @@ where "There should be a change output metadata signature available".to_string(), ) })?; - change_output.push(DbUnblindedOutput::from_unblinded_output( + change_output.push(DbUnblindedOutput::rewindable_from_unblinded_output( unblinded_output, &self.resources.factories, + &self.resources.master_key_manager.rewind_data().clone(), + None, None, )?); } @@ -880,7 +925,13 @@ where .with_rewind_data(self.resources.master_key_manager.rewind_data().clone()) .build_with_reward(&self.resources.consensus_constants, reward)?; - let output = DbUnblindedOutput::from_unblinded_output(unblinded_output, &self.resources.factories, None)?; + let output = DbUnblindedOutput::rewindable_from_unblinded_output( + unblinded_output, + &self.resources.factories, + self.resources.master_key_manager.rewind_data(), + None, + None, + )?; // Clear any existing pending coinbase transactions for this blockheight if they exist if let Err(e) = self @@ -1005,9 +1056,11 @@ where builder .with_output(ub.clone(), sender_offset_private_key.clone()) .map_err(|e| OutputManagerError::BuildError(e.message))?; - db_outputs.push(DbUnblindedOutput::from_unblinded_output( + db_outputs.push(DbUnblindedOutput::rewindable_from_unblinded_output( ub, &self.resources.factories, + self.resources.master_key_manager.rewind_data(), + None, None, )?) } @@ -1064,9 +1117,11 @@ where // } if let Some(unblinded_output) = stp.get_change_unblinded_output()? { - db_outputs.push(DbUnblindedOutput::from_unblinded_output( + db_outputs.push(DbUnblindedOutput::rewindable_from_unblinded_output( unblinded_output, &self.resources.factories, + self.resources.master_key_manager.rewind_data(), + None, None, )?); } @@ -1155,7 +1210,7 @@ where &sender_offset_private_key, &covenant, )?; - let utxo = DbUnblindedOutput::from_unblinded_output( + let utxo = DbUnblindedOutput::rewindable_from_unblinded_output( UnblindedOutput::new_current_version( amount, spending_key.clone(), @@ -1169,6 +1224,8 @@ where covenant, ), &self.resources.factories, + self.resources.master_key_manager.rewind_data(), + None, None, )?; builder @@ -1207,8 +1264,13 @@ where "There should be a change output metadata signature available".to_string(), ) })?; - let change_output = - DbUnblindedOutput::from_unblinded_output(unblinded_output, &self.resources.factories, None)?; + let change_output = DbUnblindedOutput::rewindable_from_unblinded_output( + unblinded_output, + &self.resources.factories, + self.resources.master_key_manager.rewind_data(), + None, + None, + )?; outputs.push(change_output); } @@ -1500,7 +1562,7 @@ where &sender_offset_private_key, &covenant, )?; - let utxo = DbUnblindedOutput::from_unblinded_output( + let utxo = DbUnblindedOutput::rewindable_from_unblinded_output( UnblindedOutput::new_current_version( output_amount, spending_key.clone(), @@ -1514,6 +1576,8 @@ where covenant.clone(), ), &self.resources.factories, + &self.resources.master_key_manager.rewind_data().clone(), + None, None, )?; builder @@ -1560,9 +1624,11 @@ where "There should be a change output metadata signature available".to_string(), ) })?; - outputs.push(DbUnblindedOutput::from_unblinded_output( + outputs.push(DbUnblindedOutput::rewindable_from_unblinded_output( unblinded_output, &self.resources.factories, + &self.resources.master_key_manager.rewind_data().clone(), + None, None, )?); } @@ -1691,8 +1757,13 @@ where let unblinded_output = stp.get_change_unblinded_output()?.ok_or_else(|| { OutputManagerError::BuildError("There should be a change output metadata signature available".to_string()) })?; - let change_output = - DbUnblindedOutput::from_unblinded_output(unblinded_output, &self.resources.factories, None)?; + let change_output = DbUnblindedOutput::rewindable_from_unblinded_output( + unblinded_output, + &self.resources.factories, + self.resources.master_key_manager.rewind_data(), + None, + None, + )?; outputs.push(change_output); trace!(target: LOG_TARGET, "Claiming HTLC with transaction ({}).", tx_id); @@ -1774,8 +1845,13 @@ where OutputManagerError::BuildError("There should be a change output metadata signature available".to_string()) })?; - let change_output = - DbUnblindedOutput::from_unblinded_output(unblinded_output, &self.resources.factories, None)?; + let change_output = DbUnblindedOutput::rewindable_from_unblinded_output( + unblinded_output, + &self.resources.factories, + self.resources.master_key_manager.rewind_data(), + None, + None, + )?; outputs.push(change_output); trace!(target: LOG_TARGET, "Claiming HTLC refund with transaction ({}).", tx_id); @@ -1834,10 +1910,13 @@ where ) .as_bytes(), )?; - let blinding_key = PrivateKey::from_bytes(&hash_secret_key(&spending_key))?; - let rewind_key = PrivateKey::from_bytes(&hash_secret_key(&blinding_key))?; - let rewound = - output.full_rewind_range_proof(&self.resources.factories.range_proof, &rewind_key, &blinding_key); + let rewind_blinding_key = PrivateKey::from_bytes(&hash_secret_key(&spending_key))?; + let rewind_key = PrivateKey::from_bytes(&hash_secret_key(&rewind_blinding_key))?; + let rewound = output.full_rewind_range_proof( + &self.resources.factories.range_proof, + &rewind_key, + &rewind_blinding_key, + ); if let Ok(rewound_result) = rewound { let rewound_output = UnblindedOutput::new( @@ -1853,10 +1932,16 @@ where known_one_sided_payment_scripts[i].script_lock_height, output.covenant, ); - let db_output = DbUnblindedOutput::from_unblinded_output( + let db_output = DbUnblindedOutput::rewindable_from_unblinded_output( rewound_output.clone(), &self.resources.factories, + &RewindData { + rewind_key, + rewind_blinding_key, + proof_message: [0u8; 21], + }, None, + Some(&output.proof), )?; let output_hex = output.commitment.to_hex(); diff --git a/base_layer/wallet/src/output_manager_service/storage/models.rs b/base_layer/wallet/src/output_manager_service/storage/models.rs index 977e9c9584..a013e9aa51 100644 --- a/base_layer/wallet/src/output_manager_service/storage/models.rs +++ b/base_layer/wallet/src/output_manager_service/storage/models.rs @@ -22,7 +22,7 @@ use std::cmp::Ordering; -use tari_common_types::types::{BlockHash, Commitment, HashOutput, PrivateKey}; +use tari_common_types::types::{BlockHash, Commitment, HashOutput, PrivateKey, RangeProof}; use tari_core::transactions::{transaction::UnblindedOutput, transaction_protocol::RewindData, CryptoFactories}; use tari_crypto::script::{ExecutionStack, TariScript}; use tari_utilities::hash::Hashable; @@ -69,8 +69,9 @@ impl DbUnblindedOutput { factory: &CryptoFactories, rewind_data: &RewindData, spending_priority: Option, + proof: Option<&RangeProof>, ) -> Result { - let tx_out = output.as_rewindable_transaction_output(factory, rewind_data)?; + let tx_out = output.as_rewindable_transaction_output(factory, rewind_data, proof)?; Ok(DbUnblindedOutput { hash: tx_out.hash(), commitment: tx_out.commitment, diff --git a/base_layer/wallet/src/transaction_service/service.rs b/base_layer/wallet/src/transaction_service/service.rs index e83538c4f6..7ce9c6a77b 100644 --- a/base_layer/wallet/src/transaction_service/service.rs +++ b/base_layer/wallet/src/transaction_service/service.rs @@ -995,7 +995,12 @@ where .get_fee_amount() .map_err(|e| TransactionServiceProtocolError::new(tx_id, e.into()))?; self.output_manager_service - .add_output_with_tx_id(tx_id, unblinded_output, Some(SpendingPriority::HtlcSpendAsap)) + .add_rewindable_output_with_tx_id( + tx_id, + unblinded_output, + Some(SpendingPriority::HtlcSpendAsap), + Some(rewind_data), + ) .await?; self.submit_transaction( transaction_broadcast_join_handles, diff --git a/integration_tests/package-lock.json b/integration_tests/package-lock.json index 0ff556688c..27e1c628b1 100644 --- a/integration_tests/package-lock.json +++ b/integration_tests/package-lock.json @@ -753,7 +753,7 @@ }, "assertion-error": { "version": "1.1.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, @@ -908,15 +908,16 @@ } }, "chai": { - "version": "4.3.4", - "resolved": false, - "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", "dev": true, "requires": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", "deep-eql": "^3.0.1", "get-func-name": "^2.0.0", + "loupe": "^2.3.1", "pathval": "^1.1.1", "type-detect": "^4.0.5" } @@ -934,7 +935,7 @@ }, "check-error": { "version": "1.0.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", "dev": true }, @@ -1127,7 +1128,7 @@ }, "deep-eql": { "version": "3.0.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, "requires": { @@ -1881,7 +1882,7 @@ }, "get-func-name": { "version": "2.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, @@ -1945,7 +1946,7 @@ }, "globals": { "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "resolved": false, "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, @@ -2251,7 +2252,7 @@ }, "jsesc": { "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "resolved": false, "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, @@ -2455,6 +2456,15 @@ "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", "dev": true }, + "loupe": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.1.tgz", + "integrity": "sha512-EN1D3jyVmaX4tnajVlfbREU4axL647hLec1h/PXAb8CPDMJiYitcWF2UeLVNttRqaIqQs4x+mRvXf+d+TlDrCA==", + "dev": true, + "requires": { + "get-func-name": "^2.0.0" + } + }, "lower-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", @@ -2705,7 +2715,7 @@ }, "pathval": { "version": "1.1.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, @@ -3028,7 +3038,7 @@ }, "source-map": { "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "resolved": false, "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true }, @@ -3280,7 +3290,7 @@ }, "to-fast-properties": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "resolved": false, "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, @@ -3341,7 +3351,7 @@ }, "type-detect": { "version": "4.0.8", - "resolved": false, + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, @@ -3430,104 +3440,68 @@ "dependencies": { "@grpc/grpc-js": { "version": "1.3.6", - "resolved": false, - "integrity": "sha512-v7+LQFbqZKmd/Tvf5/j1Xlbq6jXL/4d+gUtm2TNX4QiEC3ELWADmGr2dGlUyLl6aKTuYfsN72vAsO5zmavYkEg==", "requires": { "@types/node": ">=12.12.47" } }, "@grpc/proto-loader": { "version": "0.5.6", - "resolved": false, - "integrity": "sha512-DT14xgw3PSzPxwS13auTEwxhMMOoz33DPUKNtmYK/QYbBSpLXJy78FGGs5yVoxVobEqPm4iW9MOIoz0A3bLTRQ==", "requires": { "lodash.camelcase": "^4.3.0", "protobufjs": "^6.8.6" } }, "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": false, - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + "version": "1.1.2" }, "@protobufjs/base64": { - "version": "1.1.2", - "resolved": false, - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + "version": "1.1.2" }, "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": false, - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + "version": "2.0.4" }, "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": false, - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + "version": "1.1.0" }, "@protobufjs/fetch": { "version": "1.1.0", - "resolved": false, - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", "requires": { "@protobufjs/aspromise": "^1.1.1", "@protobufjs/inquire": "^1.1.0" } }, "@protobufjs/float": { - "version": "1.0.2", - "resolved": false, - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + "version": "1.0.2" }, "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": false, - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + "version": "1.1.0" }, "@protobufjs/path": { - "version": "1.1.2", - "resolved": false, - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + "version": "1.1.2" }, "@protobufjs/pool": { - "version": "1.1.0", - "resolved": false, - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + "version": "1.1.0" }, "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": false, - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + "version": "1.1.0" }, "@types/long": { - "version": "4.0.1", - "resolved": false, - "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==" + "version": "4.0.1" }, "@types/node": { - "version": "16.3.2", - "resolved": false, - "integrity": "sha512-jJs9ErFLP403I+hMLGnqDRWT0RYKSvArxuBVh2veudHV7ifEC1WAmjJADacZ7mRbA2nWgHtn8xyECMAot0SkAw==" + "version": "16.3.2" }, "grpc-promise": { - "version": "1.4.0", - "resolved": false, - "integrity": "sha512-4BBXHXb5OjjBh7luylu8vFqL6H6aPn/LeqpQaSBeRzO/Xv95wHW/WkU9TJRqaCTMZ5wq9jTSvlJWp0vRJy1pVA==" + "version": "1.4.0" }, "lodash.camelcase": { - "version": "4.3.0", - "resolved": false, - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + "version": "4.3.0" }, "long": { - "version": "4.0.0", - "resolved": false, - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + "version": "4.0.0" }, "protobufjs": { "version": "6.11.2", - "resolved": false, - "integrity": "sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw==", "requires": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", diff --git a/integration_tests/package.json b/integration_tests/package.json index 539b4771e8..e072c74b85 100644 --- a/integration_tests/package.json +++ b/integration_tests/package.json @@ -22,7 +22,7 @@ "@grpc/grpc-js": "^1.4.4", "@grpc/proto-loader": "^0.5.5", "blakejs": "^1.1.0", - "chai": "^4.2.0", + "chai": "^4.3.6", "cucumber-html-reporter": "^5.5.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0",