instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
witnet__witnet-rust__1237 | witnet/witnet-rust | 1,237 | defect | 3658c61e3cbbe780040da393a2e5e6612e7f815a | 4195e06d1daca140bec29171a694af81e6542404 | Create and mine superblock | Close #1182 | diff --git a/config/src/config.rs b/config/src/config.rs
index 5b42ec5ffb..179f81d64b 100644
--- a/config/src/config.rs
+++ b/config/src/config.rs
@@ -411,6 +411,10 @@ pub fn consensus_constants_from_partial(
.checkpoints_period
.to_owned()
.unwrap_or_else(|| defaults.consensus_co... | 18 | 15 | 1 | [{"id": "G0", "claim": "Please order the SuperBlock struct's keys alphabetically.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Rename the hash fields to `last_block_in_previous_superblock` and `last_block` with the suggested doc comments.", "c... | null |
witnet__witnet-rust__1263 | witnet/witnet-rust | 1,263 | defect | 4f0fbba66b26c0a0836815fdea19854705136506 | 324657becd76ab40043cddbaaf57e3b53d3bda06 | feat(data_structures): make `MemoHash` mutably safe across threads | This should allow us also to share blocks and transactions across threads without cloning :wink: | diff --git a/data_structures/src/transaction.rs b/data_structures/src/transaction.rs
index 8a9fb95c5d..89a6085381 100644
--- a/data_structures/src/transaction.rs
+++ b/data_structures/src/transaction.rs
@@ -9,39 +9,47 @@ use crate::{
vrf::DataRequestEligibilityClaim,
};
use protobuf::Message;
-use std::{cell::Ce... | 1 | 1 | 1 | [{"id": "G0", "claim": "Changing MemoHash's PartialEq to compare the stored hash breaks transaction equality when one transaction's MemoHash holds a hash and the other's is None, as demonstrated by the proposed memohash_eq test, and the reviewer asks for that test to be added.", "category": "correctness", "verdict": "s... | null |
witnet__witnet-rust__1301 | witnet/witnet-rust | 1,301 | defect | fb8df1f37891da73e453acae8807aa7ee8f65868 | bbd1dfb910da7a9bc2384e4ef37885a538c4107a | feat(transactions): add transaction weight for ValueTransferTransacti… | …ons and DRTransactions
Close #1298
Close #1299 | diff --git a/config/src/config.rs b/config/src/config.rs
index bc0fea3126..91edbcf6e9 100644
--- a/config/src/config.rs
+++ b/config/src/config.rs
@@ -428,10 +428,14 @@ pub fn consensus_constants_from_partial(
.genesis_hash
.to_owned()
.unwrap_or_else(|| defaults.consensus_constan... | 24 | 24 | 7 | [{"id": "G0", "claim": "The doc comment on max_vt_weight should describe it as the maximum (aggregated) weight for value transfer transactions in one block.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The doc comment on max_dr_weight should des... | null |
witnet__witnet-rust__132 | witnet/witnet-rust | 132 | defect | 3d5690ac72cdb336690a79361fd99d3ddf16ac0b | 0b125438e263150dec565bfe59409cb29ec5baa5 | Epoch manager | Implement the `EpochManager` actor.
The timestamp of the epoch 0 can be set in the config file `witnet.toml`, for testing purposes:
```toml
[consensus_constants]
checkpoint_zero_timestamp = 1542203073
``` | diff --git a/config/src/config/mod.rs b/config/src/config/mod.rs
index c32d2873db..a5fad00895 100644
--- a/config/src/config/mod.rs
+++ b/config/src/config/mod.rs
@@ -62,6 +62,9 @@ pub struct Config {
/// Storage-related configuration
pub storage: Storage,
+
+ /// Protocol-related configuration
+ pub ... | 18 | 15 | 1 | [{"id": "G0", "claim": "Protocol::from_partial should take the defaults as a `&dyn Defaults` trait object instead of the concrete `&Defaults` struct.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new partial configuration field should get a `#[serde... | null |
witnet__witnet-rust__1333 | witnet/witnet-rust | 1,333 | defect | 15cbed62bc862f647dbbbec8dc9a63d17fe95b11 | dd29dd6d259f2045bedc9275f8d67987b31468cf | feat(jsonrpc): implement addPeers method | Implement addPeers JSON-RPC and CLI methods
CLI usage:
```
$ witnet node addPeers 52.166.178.145:21337 52.166.178.145:22337
Loading config from: witnet.toml
Setting log level to: DEBUG, source: Config
[2020-06-25T11:31:18Z DEBUG witnet_data_structures] Set environment to testnet
[2020-06-25T11:31:18Z INFO w... | diff --git a/node/src/actors/json_rpc/json_rpc_methods.rs b/node/src/actors/json_rpc/json_rpc_methods.rs
index 33bc913c30..73ecfba199 100644
--- a/node/src/actors/json_rpc/json_rpc_methods.rs
+++ b/node/src/actors/json_rpc/json_rpc_methods.rs
@@ -1,6 +1,7 @@
use std::{
collections::HashMap,
convert::TryFrom,... | 2 | 1 | 0 | [{"id": "G0", "claim": "The addPeers CLI success and failure messages should say \"peer addresses\" instead of \"peers\".", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The stdin address-splitting could use a regex instead of the hand-rolled cha... | null |
witnet__witnet-rust__1341 | witnet/witnet-rust | 1,341 | defect | 15cbed62bc862f647dbbbec8dc9a63d17fe95b11 | 747d0e0b71d1c867215f0585d291ecfd67a235b6 | Several fixes to p2p / bucketing | Namely:
- fix(p2p): evict peer addresses from `tried` buckets upon connection failure
- refactor(p2p): improve readability of `remove_from_tried`
- tests(p2p): add tests for new and tried buckets
- refactor(p2p): avoid redundant hashmap lookups
- feat(node): refuse creating multiple inbound sessions for similar IP... | diff --git a/node/src/actors/connections_manager/handlers.rs b/node/src/actors/connections_manager/handlers.rs
index aaa7533d8f..7185e77070 100644
--- a/node/src/actors/connections_manager/handlers.rs
+++ b/node/src/actors/connections_manager/handlers.rs
@@ -32,7 +32,11 @@ impl Handler<OutboundTcpConnect> for Connectio... | 5 | 4 | 2 | [{"id": "G0", "claim": "The NetworkRangesCollection `inner` field would be much more efficient as a fixed-size key — HashSet<[u8; 2]> (2 bytes per IPv4 range) — instead of BTreeSet<Vec<u8>>, since the ranges need not be sorted.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "introduced"... | null |
witnet__witnet-rust__1359 | witnet/witnet-rust | 1,359 | defect | b24c54964c53c72319fd24d87196002b67ca9ee2 | a250d7c6f18deacae8ba8ac2afb617f722e9d60d | Check beacon during handshake | Close #1348
BREAKING CHANGE
This PR adds a `LastBeacon` field to the `Version` message. This field is used in the handshake to ensure that a node never connects to outbound peers whose beacon is behind its own, or whose beacon has a different block hash. This is also used by the feeler process to ensure that the ... | diff --git a/data_structures/src/builders.rs b/data_structures/src/builders.rs
index 44fa3e9b04..13616c3804 100644
--- a/data_structures/src/builders.rs
+++ b/data_structures/src/builders.rs
@@ -59,7 +59,7 @@ impl Message {
magic: u16,
sender_addr: Option<SocketAddr>,
receiver_addr: SocketAdd... | 3 | 3 | 2 | [{"id": "G0", "claim": "The doc comment the PR adds above the SetLastBeacon message in messages.rs ('Get number of inbound and outbound sessions') does not describe the struct and left the reviewer unable to understand it.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, ... | null |
witnet__witnet-rust__1364 | witnet/witnet-rust | 1,364 | defect | 5b1b1f5fef6ea7e8f02fe26d52497862726c1415 | c91f1496402e15caa9ee20485fb722c2272276a8 | feat(session manager): Signal superblock beacon | This PR adds the superblock beacon to the lastbeacon message. In particular:
- Adds a new 'highest_superblock_checkpoint' to LastBeacon structure.
- If there exists some superblock state, adds the superblock checkpoint to the lastbeacon message.
- Else, signals the genesis hash and the 0 index.
The latter point... | diff --git a/data_structures/src/builders.rs b/data_structures/src/builders.rs
index 44fa3e9b04..8dc5f8eced 100644
--- a/data_structures/src/builders.rs
+++ b/data_structures/src/builders.rs
@@ -143,11 +143,16 @@ impl Message {
}
/// Function to build LastBeacon messages
- pub fn build_last_beacon(magic:... | 3 | 3 | 0 | [{"id": "G0", "claim": "The doc comment added on `get_beacon` still reads like the one on `build_superblock` and does not describe what `get_beacon` does, so the description has to be updated.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The TOD... | null |
witnet__witnet-rust__1381 | witnet/witnet-rust | 1,381 | defect | 9ffd092c32c3cebe04a71106753f447ab54177de | 67cc57b1209b7967b18c8931c4f17bb163e2c02c | Disallow data requests with more than one change output | Fix #1306 | diff --git a/data_structures/src/error.rs b/data_structures/src/error.rs
index 9c7848f87d..69ec6703bc 100644
--- a/data_structures/src/error.rs
+++ b/data_structures/src/error.rs
@@ -193,7 +193,7 @@ pub enum TransactionError {
transaction_value: u64,
},
/// Zero amount specified
- #[fail(display =... | 4 | 3 | 0 | [{"id": "G0", "claim": "The comment on the check_one_output helper should say \"no outputs if the value is zero\" instead of \"no inputs if the value is zero\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The derived key should be bound through... | null |
witnet__witnet-rust__1403 | witnet/witnet-rust | 1,403 | defect | e5502a56276f0db3020ac57811e4fba5f03be6a9 | f9936f06b3a73386f146d6740f74ac8a25173591 | feat (config manager): add bootstrapping_committee | This PR adds a bootstrapping committee in charge of signing the first superblocks until collateral_age plus activity_period epoch is reached. | diff --git a/config/src/config.rs b/config/src/config.rs
index cd490e26c6..dd6b93185b 100644
--- a/config/src/config.rs
+++ b/config/src/config.rs
@@ -486,6 +486,10 @@ pub fn consensus_constants_from_partial(
.collateral_minimum
.to_owned()
.unwrap_or_else(|| defaults.consensus_co... | 5 | 4 | 1 | [{"id": "G0", "claim": "The test comment ends with a stray apostrophe and should read `NotInArs` instead of `NotInArs'`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The condition adds collateral_age, which is measured in blocks, to activity_per... | null |
witnet__witnet-rust__1407 | witnet/witnet-rust | 1,407 | defect | a8ee953181560ac6762e07c5dc77371d4dbb60e5 | df762a0ca89143ce67c19c8d4baea5470b1913e1 | Superblock signing committee | This PR creates the method `update_superblock_signing_committee` that returns the subset of the ARS in charge of signing a specific superblock. In particular:
- Orders the ARS with the method `get_rep_ordered_pkh_list` and stores it in the `chain_state.last_ars`
- Adds the size of the superblock signing committee in ... | diff --git a/config/src/config.rs b/config/src/config.rs
index dd6b93185b..4ddf4f121c 100644
--- a/config/src/config.rs
+++ b/config/src/config.rs
@@ -498,6 +498,10 @@ pub fn consensus_constants_from_partial(
.extra_rounds
.to_owned()
.unwrap_or_else(|| defaults.consensus_constant... | 12 | 6 | 3 | [{"id": "G0", "claim": "The chain_manager code declares `let signing_committee_size = u32::from(consensus_constants.superblock_signing_committee_size);` twice in a row.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new doc comment on `conse... | null |
witnet__witnet-rust__1447 | witnet/witnet-rust | 1,447 | defect | 5eb341d17630d3a2bff7a0329ebc2a627524fc72 | 803a1f1924871c2de4797dea7d270635658d6646 | Reduced committee size | This PR adds functionality for reducing the superblock voting committee size if sufficient epochs elpase without consolidated superblock. The period after which the comittee gets reduced is configurable through consensus constants.
This PR aims at solving the problem of loss of availability of a percetange of the AR... | diff --git a/config/src/config.rs b/config/src/config.rs
index 4ddf4f121c..87e8e2aed1 100644
--- a/config/src/config.rs
+++ b/config/src/config.rs
@@ -430,6 +430,12 @@ pub fn consensus_constants_from_partial(
.superblock_period
.to_owned()
.unwrap_or_else(|| defaults.consensus_con... | 9 | 9 | 1 | [{"id": "G0", "claim": "The `use std::cmp::max;` import should be formatted per cargo fmt (grouped into the existing use block).", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The `log::error!` line announcing the committee size should be a proper DEBUG-l... | null |
witnet__witnet-rust__1461 | witnet/witnet-rust | 1,461 | defect | d32ff8857393605ea22fa7dca83f2eebdbb0f7b7 | 62fe7419ad79aa34618a680d909f84590a281d28 | make tally creation mandatory and remove tally fee | Close #1457 | diff --git a/data_structures/src/chain.rs b/data_structures/src/chain.rs
index 99a9bdd7ae..b59daaf4d0 100644
--- a/data_structures/src/chain.rs
+++ b/data_structures/src/chain.rs
@@ -117,7 +117,9 @@ impl Environment {
}
/// Consensus-critical configuration
-#[derive(PartialStruct, Debug, Clone, PartialEq, Serialize... | 4 | 4 | 0 | [{"id": "G0", "claim": "The comment added in DataRequestOutput should read 'earn by the miner' instead of 'earn for the miner'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The TalliesRequired error display string should read \"{} expected tally... | null |
witnet__witnet-rust__1600 | witnet/witnet-rust | 1,600 | defect | 82404087b0c8da34612bdf95c5d602a725ddeba7 | 91bee56e8492a5f45f58d95e40f936c8805f1db5 | feat(wallet): add balances and add time_lock support in create VTTs | This PR implements different balances (unconfirmed, confirmed and pending) and fixes some problems of creating transactions (avoids using time-locked UTXOs).
Closes #1481
Closes #1602 | diff --git a/wallet/src/actors/app/handlers/get_balance.rs b/wallet/src/actors/app/handlers/get_balance.rs
index 8a000f6377..bf900d67af 100644
--- a/wallet/src/actors/app/handlers/get_balance.rs
+++ b/wallet/src/actors/app/handlers/get_balance.rs
@@ -10,7 +10,7 @@ pub struct GetBalanceRequest {
wallet_id: String,
... | 2 | 1 | 0 | [{"id": "G0", "claim": "Use a BalanceInfo struct instead of a tuple as the fold accumulator when summing the balance from the utxo set.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G2", "claim": "Changing the get_balance actor method's return type to model::... | null |
witnet__witnet-rust__1624 | witnet/witnet-rust | 1,624 | defect | e45f186731787e5d1c9d9b1e56c6da2522c9057c | 9d52394510f561ab88a6fcb820abeed241cc7f49 | feat(wallet): add sync transient addresses for support wallet imports | Improves and closes #1619 | diff --git a/config/src/config.rs b/config/src/config.rs
index 30d4b49f4a..aeeb598f5b 100644
--- a/config/src/config.rs
+++ b/config/src/config.rs
@@ -947,6 +947,9 @@ pub struct Wallet {
pub session_expires_in: u64,
/// Duration in milliseconds after which outgoing request should timeout.
pub requests_ti... | 3 | 2 | 0 | [{"id": "G0", "claim": "The doc comment for sync_address_batch_length should say 'seed phrase' instead of 'seed words'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The transient-address membership check should use HashMap::contains_key instead ... | null |
witnet__witnet-rust__1638 | witnet/witnet-rust | 1,638 | defect | 2f71195625ec6617e3fca0889c332bec687719c5 | 569101cf5dfb53355ca13ab4afca0189098d92d6 | feat(wallet): add getInternal addresses in jsonrpc | Closes #1634 | diff --git a/wallet/src/actors/app/handlers/get_addresses.rs b/wallet/src/actors/app/handlers/get_addresses.rs
index 75ca6915e9..319f2693b1 100644
--- a/wallet/src/actors/app/handlers/get_addresses.rs
+++ b/wallet/src/actors/app/handlers/get_addresses.rs
@@ -10,6 +10,7 @@ pub struct GetAddressesRequest {
wallet_id... | 2 | 2 | 0 | [{"id": "G0", "claim": "Refactor the GetAddresses tuple struct into a struct with named fields, e.g. `pub external: bool`, instead of an anonymous bool field.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new internal_addresses function dup... | null |
witnet__witnet-rust__1694 | witnet/witnet-rust | 1,694 | defect | dadaaeca0202425b74d009f179b88681f69006ac | cc4f02aa1148d75785dac789031acaaaf850033a | Refactor wallet and connect wallet with build_vtt | Close #1633 | diff --git a/wallet/src/actors/app/handlers/create_vtt.rs b/wallet/src/actors/app/handlers/create_vtt.rs
index 1372c4a5be..6623661e49 100644
--- a/wallet/src/actors/app/handlers/create_vtt.rs
+++ b/wallet/src/actors/app/handlers/create_vtt.rs
@@ -5,7 +5,7 @@ use crate::actors::app;
use crate::types;
use crate::types:... | 6 | 4 | 0 | [{"id": "G0", "claim": "Removing the OutPtr type may be a breaking change, depending on the layout of the new type in the database.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G8", "claim": "The output-value computation should return OutputValueOverflow on over... | null |
witnet__witnet-rust__1716 | witnet/witnet-rust | 1,716 | defect | 161696dd533cf3444ce0d92dbb9d734c072af64a | 4842d0a314b7669fd267eca813a14ec546632664 | Export wallet keys encrypted | Allows to export private key (master key) or private keys (account keys) in an encrypted manner. It also adds support to import the given key to create a wallet. The keys are encrypted with AES-CBC.
Closes #1699
Closes #1700 | diff --git a/Cargo.lock b/Cargo.lock
index a2342a1900..268d28f8e2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4812,6 +4812,7 @@ version = "0.3.2"
dependencies = [
"actix",
"async-jsonrpc-client",
+ "bech32",
"bincode",
"chrono",
"failure",
diff --git a/wallet/Cargo.toml b/wallet/Cargo.toml
index 5a0c9bd31c.... | 8 | 7 | 0 | [{"id": "G0", "claim": "The xprvdouble handling inside validate_xprv should be extracted into a separate function (something like split_xprvdouble) and be tested.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Tests should be added checking that... | null |
witnet__witnet-rust__1717 | witnet/witnet-rust | 1,717 | defect | 13a6096c1ed8a497a4d7d9cc8ab4176e25f68bbe | 3bcc851ae2eb77b9aea2f1d802e33e19478158e0 | feat(wallet): support multiple outputs in create_vtt | This PR allows creating VTT with multiple outputs (address, value, time_lock). | diff --git a/wallet/src/actors/app/error.rs b/wallet/src/actors/app/error.rs
index 62786f1078..27e0eb9a4a 100644
--- a/wallet/src/actors/app/error.rs
+++ b/wallet/src/actors/app/error.rs
@@ -8,7 +8,7 @@ use crate::{actors, crypto, repository};
#[derive(Debug, Fail)]
pub enum Error {
- #[fail(display = "validatio... | 2 | 2 | 1 | [{"id": "G0", "claim": "The testnet/mainnet environment check is performed inside the loop for every output; it could be computed once outside the loop instead.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "There is no test covering addresses that ... | null |
witnet__witnet-rust__1817 | witnet/witnet-rust | 1,817 | defect | 88d3647dd3b82f21c6b0ca800a09536481fcf703 | 6ace98e2f7fe637f49544e688186d1523785ca26 | fix(wallet): fix AddressInfo received_amount and received_payments | Fix #1815 | diff --git a/wallet/src/model.rs b/wallet/src/model.rs
index f19e716594..336555d5cf 100644
--- a/wallet/src/model.rs
+++ b/wallet/src/model.rs
@@ -6,7 +6,6 @@ use serde::{Deserialize, Serialize};
use crate::{
account,
- repository::keys::Key,
types::{number_from_string, u32_to_string, u64_to_string},
}... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new `let info_db_key` binding should be dropped so the `batch.put` call uses the same inline `keys::...` nomenclature as the surrounding lines.", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
witnet__witnet-rust__1825 | witnet/witnet-rust | 1,825 | defect | c5f96842b69eb80550403a0ec97ee99bf66a650c | d2d422639daf28cb070178c651a699daf1c00361 | fix(radon): remove unwrap in CBOR encode hash function to avoid panics | Co-authored-by: Tomasz Polaczyk <tmpolaczyk@gmail.com> | diff --git a/node/tests/data_request_examples.rs b/node/tests/data_request_examples.rs
index a4945f5a23..798f07bbd5 100644
--- a/node/tests/data_request_examples.rs
+++ b/node/tests/data_request_examples.rs
@@ -45,6 +45,7 @@ fn run_dr_locally_with_data(
data: &[&str],
) -> Result<RadonTypes, failure::Error> {
... | 1 | 1 | 0 | [{"id": "G0", "claim": "The error branch of the Hash impl should hash the error string directly (`let error_vec = e.to_string();`) instead of converting it with `.as_bytes().to_vec()`, since String implements Hash.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
witnet__witnet-rust__1838 | witnet/witnet-rust | 1,838 | defect | b97a14c69e103d4e49cbf1482b578983563d77e5 | d1a014981898eb005570f3dbf40e635a4649924a | feat(wallet): allow to avoid using unconfirmed UTXOs in transactions | Close #1832
Keep track of the transactions that modify the utxo set but are not confirmed yet, so that we can ignore unconfirmed utxo when selecting utxos for a new transaction.
This feature is disabled by default, can be enabled by setting
wallet.use_unconfirmed_utxos = false
in witnet.toml | diff --git a/wallet/src/repository/wallet/mod.rs b/wallet/src/repository/wallet/mod.rs
index 71ac609501..2f02a7172e 100644
--- a/wallet/src/repository/wallet/mod.rs
+++ b/wallet/src/repository/wallet/mod.rs
@@ -42,6 +42,7 @@ use crate::{
use super::*;
use std::collections::hash_map::Entry;
+use std::collections::Ha... | 4 | 2 | 1 | [{"id": "G0", "claim": "The new `use std::collections::HashSet;` import is not rustfmt-clean and should be merged into the existing std use-block.", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G2", "claim": "The wallet's 'available' balance does not match the balance c... | null |
witnet__witnet-rust__189 | witnet/witnet-rust | 189 | defect | 31e218e9478fb126b48b881b7f3e41eee1b8c4bf | 4ed635d5896b8c338029b32751a838ded30f8ae3 | feat(data-structures): add get_data protocol message | Implement get_data as a Command in the FlatBuffers schema.
Implement get_data as a native data structure.
Implement get_data and its builder as a WitnetMessage in witnet_data_structures::types::Message
Add tests for the serializer and builder functions.
Close #163 | diff --git a/data_structures/src/builders.rs b/data_structures/src/builders.rs
index 416caa814a..2db40ab88d 100644
--- a/data_structures/src/builders.rs
+++ b/data_structures/src/builders.rs
@@ -6,7 +6,8 @@ use rand::{thread_rng, Rng};
use crate::chain::{Block, BlockHeaderWithProof, InvVector, Transaction};
use cra... | 1 | 1 | 1 | [{"id": "G0", "claim": "The GetData table's inventory field in schemas/protocol.fbs should be of type InvVector instead of InvElem, which is not defined in the schema, and protocol_generated.rs should be recompiled to match.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
witnet__witnet-rust__1933 | witnet/witnet-rust | 1,933 | defect | 641da5bb9f8ede85023bf50c5e07ff51267b35ed | 4e416b7899360a0c6deef2c3c0a576de6b7a20ad | Birthdate sync | Synchronize wallet from birth_date param instead of genesis
Closes #1919 | diff --git a/wallet/src/actors/app/handlers/create_wallet.rs b/wallet/src/actors/app/handlers/create_wallet.rs
index f51bbb2e06..ae8f1eeb42 100644
--- a/wallet/src/actors/app/handlers/create_wallet.rs
+++ b/wallet/src/actors/app/handlers/create_wallet.rs
@@ -18,6 +18,7 @@ pub struct CreateWalletRequest {
overwrite... | 15 | 13 | 1 | [{"id": "G0", "claim": "The new code should use the project's custom get_timestamp() function instead of chrono::offset::Utc::now() to compute seconds from genesis.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new wallet_last_confirmed dat... | null |
witnet__witnet-rust__1941 | witnet/witnet-rust | 1,941 | defect | cec5aa59903d55ea5a5ed013c88636eb9d26f946 | 56c37f775bfbfaf7281aa866d5363c0329750473 | feat: allow to select from address when creating VTT transactions | Allow to use an UTXO selection strategy that only takes UTXOs from the specified address.
Close #1940
In the wallet JSON-RPC API: add optional utxo_strategy field to `create_vtt` method. This allows to choose the address of the inputs of the transaction, but it also allows to use different UTXO selection strategi... | diff --git a/data_structures/src/serialization_helpers.rs b/data_structures/src/serialization_helpers.rs
index 9978b39a18..240558eda5 100644
--- a/data_structures/src/serialization_helpers.rs
+++ b/data_structures/src/serialization_helpers.rs
@@ -6,11 +6,13 @@
// Ideally all this code would be generated with a `#[se... | 4 | 2 | 1 | [{"id": "G0", "claim": "The new utxo_strategy field of CreateVttRequest should be an Option<UtxoSelectionStrategy> so that requests from older Sheikah versions that do not send the field stay compatible.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The U... | null |
witnet__witnet-rust__214 | witnet/witnet-rust | 214 | defect | 7a1db347ccb10ae2de72be682ce91084c0b66e3c | d5ec975e9aed5d02666d403f61b5d76845e615ef | feat(core): discard existing inventory vectors in inv handler | This PR adds a message in the `BlocksManager` to discard existing inventory vectors (in memory) from a list of inventory vectors. The handler of this message just calls a library function (tests are also added for it).
When an `Inv` message is received at the `Session`, a message is sent to the `BlocksManager` to di... | diff --git a/core/src/actors/blocks_manager/handlers.rs b/core/src/actors/blocks_manager/handlers.rs
index c01d806f9f..ba3c384d57 100644
--- a/core/src/actors/blocks_manager/handlers.rs
+++ b/core/src/actors/blocks_manager/handlers.rs
@@ -12,8 +12,10 @@ use witnet_util::error::WitnetError;
use log::{debug, error};
... | 2 | 2 | 0 | [{"id": "G0", "claim": "The new discard_existing_inv_vectors helper would be clearer if rewritten in functional style, taking ownership of inv_vectors (Vec<InvVector>) so into_iter with filter and collect can be used.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"i... | null |
witnet__witnet-rust__2156 | witnet/witnet-rust | 2,156 | defect | 8e92d0e0601e29c70896ab2e3e38b8b326daa83f | 783b20bcd5e3306630c8f513284506660725036a | feat: use modified minidom to avoid MissingNamespace error | Close #2154 | diff --git a/Cargo.lock b/Cargo.lock
index 670767de89..0745ec17ca 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -9,46 +9,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3720d0064a0ce5c0de7bd93bdb0a6caebab2a9b5668746145d7b3b0c5da02914"
dependencies = [
"actix-rt",
- "bitflags 1.2.1",... | 2 | 2 | 0 | [{"id": "G0", "claim": "The minidom fork should belong to the Witnet organization instead of the author's personal account (move it to witnet/xmpp-rs-fork) to reduce obscurity.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Cargo.lock has too many change... | null |
witnet__witnet-rust__2268 | witnet/witnet-rust | 2,268 | defect | a2bef41fcca7b19592260598fd4a064c225dde23 | ffe089a3718c3af09fe32848a14f5a5c6e16220b | feat(wallet): add pending_tx_timeout_seconds config variable | Close #2265 | diff --git a/config/src/config.rs b/config/src/config.rs
index 66bed4d741..fcb8d03004 100644
--- a/config/src/config.rs
+++ b/config/src/config.rs
@@ -896,6 +896,9 @@ pub struct Wallet {
pub sync_address_batch_length: u16,
/// Allow to use outputs that have not been confirmed by a superblock in new transactio... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new config field should be named `pending_transactions_timeout_seconds` instead of `pending_tx_timeout_seconds`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
witnet__witnet-rust__2287 | witnet/witnet-rust | 2,287 | defect | 7d6ccf687322f86753d9b9dcf3c8902ee44ed30c | b192ddd8263f2ab6f93e80b153bc527bdba18fc0 | Feat/wallet/return transaction upon creation | fix #2279 | diff --git a/data_structures/src/transaction_factory.rs b/data_structures/src/transaction_factory.rs
index b11936f30b..d0b49335cb 100644
--- a/data_structures/src/transaction_factory.rs
+++ b/data_structures/src/transaction_factory.rs
@@ -16,15 +16,22 @@ use crate::{
},
wit::Wit,
};
+use itertools::Itertools... | 5 | 5 | 2 | [{"id": "G0", "claim": "Itertools is only used for `collect_vec` in transaction_factory.rs, and plain `collect` could be used instead so the dependency is not needed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The transaction-creation tests ... | null |
witnet__witnet-rust__2394 | witnet/witnet-rust | 2,394 | defect | ad46722c2a67ebedab679751ca17939f49d30cb6 | f2a17650c44af78b556e2b828ce69893b0cf5752 | fix(net): prevent panicking when finding an unknown HTTP status code | This prevents a potential DoS attack to where witnessing nodes could be forced into a temporal desynchronization state and slashing could be triggered on them on purpose. | diff --git a/net/src/client/http/mod.rs b/net/src/client/http/mod.rs
index 853d992518..d9ba56cf6e 100644
--- a/net/src/client/http/mod.rs
+++ b/net/src/client/http/mod.rs
@@ -199,7 +199,14 @@ impl TryFrom<WitnetHttpResponse> for surf::http::Response {
// Create a surf response and set all the relevant parts
... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add a comment explaining that catch_unwind is needed because the surf library panics instead of returning a Result.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
witnet__witnet-rust__245 | witnet/witnet-rust | 245 | defect | cb891a9434bdb97690f6a3cfcab4074154faa6a8 | 99adb9f2f5238edd3278e9427c2f19b817f15b66 | refactor(data-structures): update block structure | Update block and block header data structures removing the unnecessary block
header with proof from block header and adding it to block.
close #226
close #227 | diff --git a/core/src/actors/chain_manager/mod.rs b/core/src/actors/chain_manager/mod.rs
index cf10d66e4a..836f3d833d 100644
--- a/core/src/actors/chain_manager/mod.rs
+++ b/core/src/actors/chain_manager/mod.rs
@@ -139,7 +139,7 @@ impl ChainManager {
// This is a new block, insert it into the internal maps... | 1 | 1 | 1 | [{"id": "G0", "claim": "The inventory request example in docs/interface/json-rpc.md should be rewritten to match the test string from json_rpc_methods.rs, as suggested.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
witnet__witnet-rust__2472 | witnet/witnet-rust | 2,472 | defect | 5db1043cbc2a056c5c6bd0116f9f3d1fd0373c80 | 5781fc2dcbb79489b768d5f7e5d03293a09accf8 | A set of fixes and features for wit\2 | The first four commits are part of https://github.com/witnet/witnet-rust/pull/2469.
The latter four commits are all new self-contained patches that introduce a fix or feature, but they build upon each other, so I kept them in the same branch. | diff --git a/bridges/centralized-ethereum/src/actors/dr_sender/tests.rs b/bridges/centralized-ethereum/src/actors/dr_sender/tests.rs
index 58ae02e43e..2a314c26fd 100644
--- a/bridges/centralized-ethereum/src/actors/dr_sender/tests.rs
+++ b/bridges/centralized-ethereum/src/actors/dr_sender/tests.rs
@@ -4,14 +4,14 @@ use... | 7 | 4 | 3 | [{"id": "G0", "claim": "The 50 WIT block reward is not yet decided, and this proposal of reducing block time and reward should be part of a dedicated PR rather than mixed into the mining eligibility changes.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": ... | null |
witnet__witnet-rust__2532 | witnet/witnet-rust | 2,532 | defect | c9381b58ca99ae06b096220bbdcf90d2e86f92eb | 5b6a6edd077e5b60e003437fb7a5496b2167af11 | fix(node): fix DR eligibility for (allegedly) all protocol versions | This adds a series of fixes and improvements, but mainly acts by swapping the branches where we construct the VRF message conditionally depending on protocol version, as they were incorrectly ordered before.
fix #2527
| diff --git a/data_structures/src/data_request.rs b/data_structures/src/data_request.rs
index 0bedbe409a..0790e85828 100644
--- a/data_structures/src/data_request.rs
+++ b/data_structures/src/data_request.rs
@@ -4,21 +4,20 @@ use std::{
};
use itertools::izip;
-
use serde::{Deserialize, Serialize};
-use crate::pr... | 1 | 1 | 1 | [{"id": "G0", "claim": "The switch from get_protocol_version(epoch) to ProtocolVersion::from_epoch(epoch) in data_request_has_too_many_witnesses silently accepts a None epoch, and the reviewer asks why the change was made, guessing the Option unwrap was forgotten.", "category": "design", "verdict": "supported", "priori... | null |
witnet__witnet-rust__27 | witnet/witnet-rust | 27 | defect | 98d3c67a2de56a4f82109927da3ff5e8f653cf8e | 3f2ad060ef0fd909a50e7ca105b3f7758469af8a | refactor(err): introduce failure | r? @aesedepece
edit: wip for some unoptimized snippets. | diff --git a/storage/Cargo.toml b/storage/Cargo.toml
index ddb170cc6b..1e405ed02e 100644
--- a/storage/Cargo.toml
+++ b/storage/Cargo.toml
@@ -8,9 +8,10 @@ description = "Witnet storage module that conveniently abstracts a key/value API
[dependencies]
env_logger = "0.5.13"
+failure = "0.1.2"
log = "0.4.5"
rocksdb... | 3 | 3 | 2 | [{"id": "G0", "claim": "The Storage trait (and StorageError) should remain generic over the connection data type instead of forcing a concrete String — e.g. InMemoryStorage::new() should take no parameters.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "... | null |
witnet__witnet-rust__290 | witnet/witnet-rust | 290 | defect | d1fa22d16c79839eaa534cd0207723580bce13a5 | 67e70fcb99ccc631c559d70106d241d37490fb35 | feat(chain_manager): implement AddTransaction handler | ### [WIP] Need to refactor: refactor methods into library code
Scratched lines should be validated in other steps like block validation.
Validations made:
- Value transfer output
- [x] VTOs take their value from the aggregate of all the inputs in the transactions.
- [x] The number of VTOs in a single t... | diff --git a/core/src/actors/chain_manager/handlers.rs b/core/src/actors/chain_manager/handlers.rs
index 046f2fd773..56a14e6aed 100644
--- a/core/src/actors/chain_manager/handlers.rs
+++ b/core/src/actors/chain_manager/handlers.rs
@@ -4,7 +4,7 @@ use crate::actors::chain_manager::{messages::SessionUnitResult, ChainMana... | 6 | 6 | 1 | [{"id": "G0", "claim": "The comment 'Check that all inpunts point to unspend output' misspells 'inputs' and 'unspent'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The handler's debug log should identify the transaction (e.g. log its digest) ins... | null |
witnet__witnet-rust__305 | witnet/witnet-rust | 305 | defect | 9e70c9df6bfe16c70d8a0e3fca66e121eca18ad4 | 90db1c30395acc21a143b7170b1390a925e00894 | feat(crate): add partial_struct macro and apply it to config | Add a new crate `partial_struct` that is used in the `witnet_config` crate to auto-generate the partial version of the config structs.
Close #306 | diff --git a/config/Cargo.toml b/config/Cargo.toml
index 5065dc19e1..8dc21f5a35 100644
--- a/config/Cargo.toml
+++ b/config/Cargo.toml
@@ -1,16 +1,23 @@
[package]
-name = "witnet_config"
-version = "0.1.0"
authors = ["Witnet Foundation <info@witnet.foundation>"]
-workspace = ".."
description = "config component"
ed... | 2 | 2 | 0 | [{"id": "G0", "claim": "The unneeded `extern crate` declarations in partial_struct/src/lib.rs should be removed because they are not needed in the 2018 edition (the author later kept `extern crate proc_macro` citing a 2018 proc-macro limitation).", "category": "maintainability", "verdict": "supported", "priority": "P3"... | null |
witnet__witnet-rust__318 | witnet/witnet-rust | 318 | defect | 8199d6b946eee587342c229814e88617dd4fce2a | bb3b0bcca951ab32b103be2cfa9998a5cf9f344d | feat(data-structures): Add encode and decode to transaction structure | Co-authored-by: Tommytrg <tomastrg22@gmail.com>
Implemented encode and decode functions to Transaction Command
Add build_transaction test | diff --git a/core/src/actors/session/handlers.rs b/core/src/actors/session/handlers.rs
index 361af76e05..d6742ba2bd 100644
--- a/core/src/actors/session/handlers.rs
+++ b/core/src/actors/session/handlers.rs
@@ -208,7 +208,7 @@ impl Handler<SendBlock> for Session {
"Sending SendBlock message to peer at {:?}... | 3 | 2 | 0 | [{"id": "G0", "claim": "The comment above build_transaction_message_flatbuffer should read 'a Witnet Block message' instead of \"a Witnet's Block message\", per the attached suggestion.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new Transa... | null |
witnet__witnet-rust__368 | witnet/witnet-rust | 368 | defect | bba5b906ad945c9684cb9734e577a045682cee64 | e59b5ef28e706ff1a41924af3030b250679ca880 | Fix: send inventory blocks in same order as requested | When requesting blocks with an `InventoryRequest` message, the node was sending the blocks in inverse order causing a bit of trouble. This fix makes the node send the blocks in the requested order.
This PR supersedes #361 | diff --git a/core/src/actors/chain_manager/actor.rs b/core/src/actors/chain_manager/actor.rs
index d20e4d3866..59c9a230c9 100644
--- a/core/src/actors/chain_manager/actor.rs
+++ b/core/src/actors/chain_manager/actor.rs
@@ -39,48 +39,16 @@ impl Actor for ChainManager {
// Make sure to wait at least 1 second bef... | 1 | 1 | 0 | [{"id": "G0", "claim": "Logging a failed inventory-item retrieval with error! is too severe; it should be warn! since not having a requested item is not a real error.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
witnet__witnet-rust__538 | witnet/witnet-rust | 538 | defect | 179a7a7f1ad879473aa9ebfd61bdb943826c1e5f | 291787a2f000d522dbe818a107bd7de5479c0bf5 | feat(validations): add signature validations | Created PublicKey struct in chain.rs
Added PublicKey to Protobuff schema
Created from and into methods for PublicKey and Secp256k1Signature
Close #526 | diff --git a/Cargo.lock b/Cargo.lock
index d3852bd211..87b32ff8e3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2505,6 +2505,7 @@ dependencies = [
"protobuf 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"protobuf-convert 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 ... | 7 | 5 | 1 | [{"id": "G0", "claim": "Since the nonce, like the removed reveal, is needed to validate the commitment hash, it should probably also be removed from CommitInput (or stored together with the reveal).", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The tran... | null |
witnet__witnet-rust__540 | witnet/witnet-rust | 540 | defect | 179a7a7f1ad879473aa9ebfd61bdb943826c1e5f | 766a75dc6f4113c304d4de1fa82d48016bb97715 | Segregate signatures from transaction bodies | Also implements hash caching for `Transaction` / `TransactionBody` (hashes only get computed once).
Fix #510 | diff --git a/Cargo.lock b/Cargo.lock
index d3852bd211..0886660950 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1328,7 +1328,7 @@ dependencies = [
[[package]]
name = "protobuf-convert"
-version = "0.1.0"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-ma... | 3 | 2 | 0 | [{"id": "G0", "claim": "In node/src/actors/messages.rs the refactor needlessly removes Transaction from the grouped `use witnet_data_structures::chain::{...}` import and re-imports it on a separate line at line 35, and the import statements should be consolidated.", "category": "maintainability", "verdict": "supported"... | null |
witnet__witnet-rust__559 | witnet/witnet-rust | 559 | defect | 5e5827eccb7800a6e3b8798041da8162fb978019 | 13053c1d261c46609fe874ef480163afe0baa3cb | feat(node): generate secret key upon node initialization | ## Highlights
- On node initialization, the Signature Manager will query the Storage Manager for the stored secret key and will use that one to sign blocks. If the key hasn't been stored yet, the Signature Manager will generate one and persist it using the Storage Manager
- `witnet_data_structures::chain` now conta... | diff --git a/Cargo.lock b/Cargo.lock
index 77de2f9e0e..9038113bc6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2555,6 +2555,7 @@ dependencies = [
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rust-crypto 0.2.36 (registry... | 7 | 5 | 3 | [{"id": "G0", "claim": "The SignatureManager actor should not process any messages before it is initialized, so the start-up future should be run with `.wait(ctx)` instead of `.spawn(ctx)`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The `TryInto... | null |
witnet__witnet-rust__571 | witnet/witnet-rust | 571 | defect | b35294852b30139534ea96ad41962a4d4bef861d | 756099f629681b7afe3f2bcace97673d48b5ad75 | Make ChainManager verify transaction and block using the witnet_crypto crate | Modified `Secp256k1Signature` (r,s to der)
Modified `LeadershipProof` (Signature to KeyedSignature)
Updated Protobuff
Updated broken tests
Created function to validate block signature
Added transaction and block signature validations
Added tests to check block signature and Secp256k1Signature conversions
Modifi... | diff --git a/crypto/src/signature.rs b/crypto/src/signature.rs
index 879cf5fc87..c7a18fc766 100644
--- a/crypto/src/signature.rs
+++ b/crypto/src/signature.rs
@@ -21,11 +21,11 @@ pub fn sign(secret_key: SecretKey, data: &[u8]) -> Signature {
secp.sign(&msg, &secret_key)
}
/// Verify signature with a provided pub... | 7 | 7 | 1 | [{"id": "G0", "claim": "Remove the NoSignature block error variant this pull request adds, since with the signature no longer an Option it can never happen.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Revert the change that makes Block::hash ... | null |
witnet__witnet-rust__62 | witnet/witnet-rust | 62 | defect | 3f90609f81b6080df7f79e4a94aa3dc80824350d | 59c156e01882e9af4c6168916da3515d26eb9b0f | feat(ftb-codec): add ftb encode and decode implementations | This PR includes implementation to encode and decode flatbuffers' traits and create a witnet
message from flatbuffers one and vice versa.
Current `protocol_generated.rs` file is build from flatc compiler in commit 49fed8c4f61f296d1d173a1a8df872a094020278 from master branch | diff --git a/data_structures/src/lib.rs b/data_structures/src/lib.rs
index f606910ec7..7b01e8e528 100644
--- a/data_structures/src/lib.rs
+++ b/data_structures/src/lib.rs
@@ -5,3 +5,5 @@
/// Generated Message module from Flatbuffers compiler
pub mod flatbuffers;
+pub mod serializers;
+pub mod types;
diff --git a/da... | 11 | 8 | 2 | [{"id": "G0", "claim": "The many `.unwrap()` calls sprinkled through the message-decoding code are risky because they can panic when a flatbuffer field is absent.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The data produced by the `create_xxx_xx... | null |
witnet__witnet-rust__64 | witnet/witnet-rust | 64 | defect | 260b5ea18076038eabea5d049bc8902ab88a210b | 49feb3b79c5852117f6c4ff2b40721a41d4d6c7e | Config manager actor and library code | ## Actor
Config manager (`ConfigManager`, actor which is in charge of loading the configuration from a file and storing it in its state, then, any other actor can ask for a copy of that configuration.
Messages supported by the actor:
- `GetConfig`: Obtain a copy of the configuration
The actor automatically de... | diff --git a/config/Cargo.toml b/config/Cargo.toml
index 01d3f3e00d..cb9b2659cd 100644
--- a/config/Cargo.toml
+++ b/config/Cargo.toml
@@ -9,5 +9,4 @@ edition = "2018"
[dependencies]
serde = "1.0.79"
serde_derive = "1.0.79"
-serde_json = "1.0.28"
toml = "0.4.6"
diff --git a/config/src/lib.rs b/config/src/lib.rs
ind... | 9 | 8 | 1 | [{"id": "G0", "claim": "The default db path introduced here (\"witnet_db\") conflicts with the \".wit\" default used in PR #63, and the team should agree on one of them prevailing.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The default inbound connec... | null |
witnet__witnet-rust__641 | witnet/witnet-rust | 641 | defect | 5a1b015394d9a1ccc6c2c6b04eb657a734a3d91b | f5cfbbe4a1c7c71bbbb3a89fdae7b69154191fbe | Integrate Reputation Engine | This PR integrates the reputation crate with the node.
* Create `ReputationEngine` struct with all the required state, and store it in `ChainState`.
* Create `Reputation` and `Alpha` types, for now just a wrapper around a `u32`.
* On block consolidation, update reputation engine: for every tally, process the revea... | diff --git a/Cargo.lock b/Cargo.lock
index b8d4d62f9a..56894c9b15 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -12,7 +12,7 @@ dependencies = [
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.26 (registry+http... | 4 | 4 | 2 | [{"id": "G0", "claim": "penalize_many should keep the 'a lifetime on its signature and on the iterator item bound, with a K: 'a bound, instead of the renamed 'b without a K bound.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The doc comment should say ... | null |
witnet__witnet-rust__646 | witnet/witnet-rust | 646 | defect | d71ce95efdb5bd9c85a58671e1ef09386a73a357 | f4de60bb68cb59d15b951af535a85193b8397286 | Fix hash serialization in bincode | Close #643 | diff --git a/data_structures/src/chain.rs b/data_structures/src/chain.rs
index b323090f41..6da492f351 100644
--- a/data_structures/src/chain.rs
+++ b/data_structures/src/chain.rs
@@ -4,7 +4,7 @@ use secp256k1::{
PublicKey as Secp256k1_PublicKey, SecretKey as Secp256k1_SecretKey,
Signature as Secp256k1_Signatu... | 4 | 4 | 0 | [{"id": "G0", "claim": "The PublicKeyHashParseError message should read \"Invalid PKH length: expected 20 bytes but got {}\" instead of \"Invalid hash length\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The OutputPointerParseError hash varian... | null |
witnet__witnet-rust__677 | witnet/witnet-rust | 677 | defect | 9864c10c6177dd520ea68333c391b0d17f9b8aa9 | b1dcaf6cf6483d3f4ce77b03b1f2c55520a6f38e | Handle bugs produced by empty epochs | Modified log level of synced state to info
Skipped clippy cognitive_complexity warnings
Updated commits every epoch and reveals every consolidated block
Handled ARS queue in epochs without blocks
Added tally change in tally mining
Close #674
Close #675 | diff --git a/data_structures/src/chain.rs b/data_structures/src/chain.rs
index 5fd10dbc24..8a304c7579 100644
--- a/data_structures/src/chain.rs
+++ b/data_structures/src/chain.rs
@@ -766,9 +766,13 @@ impl TransactionsPool {
self.vt_transactions.len()
}
- /// Clear commit and reveal transactions in Tr... | 2 | 2 | 1 | [{"id": "G0", "claim": "Updating the active reputation set only when a block is processed can leave stale identities in it across consecutive epochs without blocks, leading to incorrect reputation results (identities from epochs 60-99 counted as active for a block at epoch 140).", "category": "correctness", "verdict": ... | null |
witnet__witnet-rust__679 | witnet/witnet-rust | 679 | defect | 9864c10c6177dd520ea68333c391b0d17f9b8aa9 | fae7aa24cdde3aa70db9bc58313722c0c22e1b02 | Miscellaneous fixes | These are some changes that I made while writing the tests in #678
- Fix #650: mint transaction should only have one output
- Fix VRF false positives
- Fix DataRequestEligibilityClaim using wrong epoch in proof message
- Fix DataRequest fee calculation
- Add validation for VRF Proof PKH == signature PKH | diff --git a/data_structures/src/chain.rs b/data_structures/src/chain.rs
index 5fd10dbc24..75116bac00 100644
--- a/data_structures/src/chain.rs
+++ b/data_structures/src/chain.rs
@@ -1521,7 +1521,11 @@ pub fn generate_unspent_outputs_pool(
update_utxo_outputs(&mut unspent_outputs, &tally_transaction.ou... | 1 | 1 | 0 | [{"id": "G0", "claim": "Rename the `beacon` variable in validate_block_transactions to `block_beacon`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
witnet__witnet-rust__688 | witnet/witnet-rust | 688 | defect | 7f92cffac0cac2569e50ee708527e50a8c1b778b | 0c0b98c41e6100841d7eef2fece4e45e643ad979 | feat(validations): include validation for dishonest revealers and tests | Created function to validate tally outputs: tally change, dishonest revealers and reveals not found.
Created a test to check this function
Close #687 | diff --git a/Cargo.lock b/Cargo.lock
index 000af4f1c6..be61d0fb3d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3061,6 +3061,7 @@ version = "0.3.0"
dependencies = [
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "secp25... | 5 | 4 | 1 | [{"id": "G0", "claim": "Since `honest_witnesses` is only used in the branch where `output.pkh == dr_state.data_request.pkh`, declare it inside that if instead of before the loop.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "When a tally output... | null |
witnet__witnet-rust__718 | witnet/witnet-rust | 718 | defect | 76e3b12f8b0dc3fe7aae6d660bb26a66f8a8339c | cb86c01c10cab8dcabde92428709b2c5179385c1 | Proofs of inclusion for transactions in blocks | Close #708
In order to build a proof of inclusion, we need the entire merkle tree, not just the root. This PR adds a new merkle tree implementation which stores all the intermediate nodes.
Missing:
* improve documentation | diff --git a/crypto/src/merkle.rs b/crypto/src/merkle.rs
index b3562117fe..049d978ffd 100644
--- a/crypto/src/merkle.rs
+++ b/crypto/src/merkle.rs
@@ -165,6 +165,158 @@ impl<T: Copy> ProgressiveMerkleTree<T> {
}
}
+/// Full merkle tree with all the intermediate nodes, used to generate
+/// inclusion proofs
+#[d... | 1 | 1 | 0 | [{"id": "G0", "claim": "Include comments explaining the new merkle tree and inclusion proof code in crypto/src/merkle.rs.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
witnet__witnet-rust__721 | witnet/witnet-rust | 721 | defect | 6e0a167cf9ecf45b168257e4f36549d948438e0f | c06981ad5c6bf12bbeaf43a9fa35b58b99638cc2 | Modify hash method for dr and tally and include them in the PoI | Co-authored-by: Tomasz Polaczyk <tmpolaczyk@gmail.com>
Close #706
Close #707
Close #709
Close #710
Modified methods to create the hash of DRTransaction and TallyTransaction:
--> DRTransaction hash = hash( hash(dr_output bytes) + hash(dr_transaction bytes) )
--> TallyTransaction hash = hash( hash( hash(dr... | diff --git a/data_structures/src/chain.rs b/data_structures/src/chain.rs
index 6393449fff..a22faa84f0 100644
--- a/data_structures/src/chain.rs
+++ b/data_structures/src/chain.rs
@@ -192,6 +192,12 @@ impl Hashable for CheckpointBeacon {
}
}
+impl Hashable for DataRequestOutput {
+ fn hash(&self) -> Hash {
+ ... | 1 | 1 | 0 | [{"id": "G0", "claim": "The doc comment on TallyTransaction::data_poi_hash misstates the hashed data and should read \"data = Hash( dr_pointer || tally )\" instead of \"data = Hash( Hash(dr_pointer) + Hash(tally) )\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
witnet__witnet-rust__73 | witnet/witnet-rust | 73 | defect | 94f10aec693cc965c589092f18ab1894ba64f14f | 001352b8e1fe2478e3d8cd5db1cde1c0e61a093d | feat(core): add encoder and decoder traits for p2p codec v2 | Followup to https://github.com/witnet/witnet-rust/pull/71 | diff --git a/core/Cargo.toml b/core/Cargo.toml
index 6c1a671746..42afc1684c 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -8,12 +8,15 @@ edition = "2018"
[dependencies]
actix = "0.7.4"
-log = "0.4.5"
-futures = "0.1"
-tokio = "0.1.11"
+byteorder = "1.2.6"
bytes = "0.4"
+futures = "0.1"
+log = "0.4.5"
rand... | 2 | 2 | 0 | [{"id": "G0", "claim": "The decode function uses the literal `2` instead of the `HEADER_SIZE` constant, both in the `msg_len > 2` length check and in the `&src[0..2]` header slice.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Comments should b... | null |
witnet__witnet-rust__745 | witnet/witnet-rust | 745 | defect | 27b32c3162a7f9bc6c64c0ee1d462e031a7d23da | 0194d2d02b27c36a2fb358a0f03727a0fce861fc | feat(p2p): modify Peers to use Bitcoin bucketing | Modified Peers structure and methods to implement Bitcoin bucketing with 2 buckets (tried and new)
Modified get_random_peer method in Peers that choose a peer randomly from each bucket
Modified Peers tests
Added src_address field in AddPeers message
Created a new method in PeersManager to import peers from a Peers ... | diff --git a/Cargo.lock b/Cargo.lock
index 9774ba814b..d3835cb5ec 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2999,6 +2999,7 @@ dependencies = [
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.92 (registry+h... | 3 | 2 | 1 | [{"id": "G0", "claim": "The index formula `bucket * slot` should be `bucket * NUM_SLOTS + slot`; otherwise when the bucket is 0 the index is always 0 and the slot is ignored.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Asks what happens when two ... | null |
witnet__witnet-rust__746 | witnet/witnet-rust | 746 | defect | 3f302a3640bf02bb57d017ec1860063b11f5bd37 | 065ccaa6625582cc38ebb0efbe0fffab5fcc05e6 | Add consensus parameter threshold in our consensus method | Added consensus_c parameter in config
Modified mode_consensus method to use this parameter
Added test to check it
Close #730
Close #731 | diff --git a/config/src/config.rs b/config/src/config.rs
index 714430ae79..9fbb99c6a8 100644
--- a/config/src/config.rs
+++ b/config/src/config.rs
@@ -348,6 +348,10 @@ pub fn consensus_constants_from_partial(
.reputation_penalization_factor
.to_owned()
.unwrap_or_else(|| defaults.... | 2 | 2 | 1 | [{"id": "G0", "claim": "The doc comment on the new consensus-c default should read 'Constant to specify when consensus is achieved (in %)' instead of the copy-pasted 'Default period between epochs'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "c... | null |
witnet__witnet-rust__818 | witnet/witnet-rust | 818 | defect | f5be51681d6f30849ddce22fdf8b02e86e48a7d4 | 187b731600e19b0504080dfe6c1b7456160a0f5d | Improve peering process | Reduced bootstrap periods
Create get_outbound_diff method to obtain the number of peers required to conform a consensus group
Modify GetRandom method to GetRandomPeers to obtain a group of random peers
Close #813 | diff --git a/Cargo.lock b/Cargo.lock
index 4928da2a8c..4f1dc53122 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3450,6 +3450,7 @@ name = "witnet_p2p"
version = "0.3.2"
dependencies = [
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.4.8 (registry+https://github.com/rust-lang/crates.... | 6 | 4 | 1 | [{"id": "G0", "claim": "A stray 'git' is appended to the error! macro call, so the source does not compile.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "get_new_random_peer should use .iter() to pick a key with its value in one choose instead of c... | null |
witnet__witnet-rust__825 | witnet/witnet-rust | 825 | defect | f19aaa6f4d5dcea3be38a77fe3ddeaaf1c4901af | d807aca9054c415abf34c7ac0a63223f85f57f4b | Review protobuff schema | Removed Ping Pong messages
Removed Error, DataRequest and DataResult
Removed RADDelivery
Renamed consensus by tally in DataRequestOutput
Renamed not_before by time_lock and removed previous time_lock in DataRequestOutput
Included time_lock in VTTransaction
*** Validation of VTT time_lock (#824) will be added i... | diff --git a/bridges/ethereum/src/main.rs b/bridges/ethereum/src/main.rs
index 3742f624d3..7808d65f05 100644
--- a/bridges/ethereum/src/main.rs
+++ b/bridges/ethereum/src/main.rs
@@ -50,7 +50,7 @@ fn data_request_example() -> DataRequestOutput {
let build_dr: serde_json::Value = serde_json::from_str(build_dr_str).... | 3 | 2 | 0 | [{"id": "G0", "claim": "The data request `time_lock` field (renamed from `not_before`) is confusing and should be renamed to `commit_time_lock`.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new `time_lock` field on `ValueTransferOutput` lacks a doc c... | null |
witnet__witnet-rust__829 | witnet/witnet-rust | 829 | defect | d401dbdf3e3bd63dbfa39343deedf5ec38d67843 | 559ff7022e901bf833af9f77897b252fd91b98e0 | Create and send data requests | ## What
Endpoints for creating and sending data requests.
### `/createDataRequest`
Request body:
```json
{
"sessionId": "<session id>",
"walletId": "<wallet id>",
"label": "<optional label>",
"fee": "<numeric value>",
"request": {
"dataRequest": {
"timeLock": "<numeric value>",
... | diff --git a/Cargo.lock b/Cargo.lock
index 2589ceb6e6..039942a5f3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3545,6 +3545,7 @@ dependencies = [
"witnet_protected 0.3.2",
"witnet_rad 0.3.2",
"witnet_storage 0.3.2",
+ "witnet_validations 0.3.2",
]
[[package]]
diff --git a/data_structures/src/chain.rs b/data_s... | 6 | 6 | 3 | [{"id": "G0", "claim": "The Success type added for empty responses should serialize as the boolean true instead of the string \"success\".", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Creating a data request needs a new data_request_fee parameter — the... | null |
witnet__witnet-rust__847 | witnet/witnet-rust | 847 | defect | 5e58f1f7560013e7794c1cf3da714f99a55a08bf | 4263ce1b577940ae6c5ab834fe9e3b4cf54ec268 | Update wallet details | ## What
Add new endpoint `updateWallet` which can be used to modify a wallet's name and/or caption.
## Examples
### Request
```json
{
"params": {
"caption": "My testing wallet",
"name": "Testing",
"sessionId": "273518861f799d2f6cd82caba7d2cd6d416dffbf4ab8c7a2550c31695557ac09",
"walle... | diff --git a/Cargo.lock b/Cargo.lock
index 039942a5f3..2d3c2340e0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3172,6 +3172,15 @@ dependencies = [
"websocket 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "webbrowser"
+version = "0.5.2"
+source = "registry+https://github.co... | 1 | 1 | 0 | [{"id": "G0", "claim": "The deserialization error message \"does not start with xprv\" should read \"prefix is not \\\"xprv\\\"\" (the bech32 decode may have failed for other reasons than a missing prefix).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
witnet__witnet-rust__886 | witnet/witnet-rust | 886 | defect | 7d126fcf21370f34260302e0e80f9040e2d31b76 | fd89fdd4bbd221ce94694282123df9334ebb19eb | feat(session): do not allow node synchronization between nodes with d… | …ifferent current epoch
Close #399 | diff --git a/node/src/actors/peers_manager/actor.rs b/node/src/actors/peers_manager/actor.rs
index 03eb489c68..6030a1fd15 100644
--- a/node/src/actors/peers_manager/actor.rs
+++ b/node/src/actors/peers_manager/actor.rs
@@ -5,6 +5,7 @@ use super::PeersManager;
use crate::actors::storage_keys::PEERS_KEY;
use crate::con... | 4 | 4 | 1 | [{"id": "G0", "claim": "Comparing the received Version epoch against the current epoch will unfairly drop peers with perfectly synchronized clocks whose Version message is sent just before a checkpoint but received right after it, and this false-drop rate may skyrocket under latency or storage-lock delays.", "category"... | null |
witnet__witnet-rust__94 | witnet/witnet-rust | 94 | defect | 62f6d85fd7c2329fb0a1bff813d08fc01cd757e5 | 9c1ea3e0a27568bbd3a6012cd48f74cc701e16c9 | refactor(p2p): add separate consolidated/unconsolidated collections for outbound sessions | This PR adds separate consolidated / unconsolidated collections for outbound sessions in `p2p sessions library`. The p2p sessions library is the one that contains the state and most of the logic of the session manager. Inbound sessions are left in the same collection, no matter what their status is.
Tests for the `p... | diff --git a/core/src/actors/connections_manager.rs b/core/src/actors/connections_manager.rs
index 610b626829..6e6bda1d3a 100644
--- a/core/src/actors/connections_manager.rs
+++ b/core/src/actors/connections_manager.rs
@@ -19,7 +19,7 @@ use crate::actors::config_manager::send_get_config_request;
use crate::actors::{co... | 3 | 3 | 0 | [{"id": "G0", "claim": "The server-address eligibility check should use map(...).unwrap_or(false) instead of is_some() plus unwrap(), for uniformity and to avoid a wild unwrap.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The fields named xx... | null |
witnet__witnet-rust__948 | witnet/witnet-rust | 948 | defect | b58b087e5f16fa4293f92a1db8bab9b7b29e2283 | e823421161174bad0ad4f9d179522085922f9f3e | Refactor dr.value to dr.witness_reward | Close #915
This is a breaking change, as it changes the protocol schema | diff --git a/data_structures/src/chain.rs b/data_structures/src/chain.rs
index 4d0c9d4de4..721db84777 100644
--- a/data_structures/src/chain.rs
+++ b/data_structures/src/chain.rs
@@ -719,8 +719,7 @@ pub struct ValueTransferOutput {
#[protobuf_convert(pb = "witnet::DataRequestOutput")]
pub struct DataRequestOutput {
... | 1 | 1 | 0 | [{"id": "G0", "claim": "In the rewritten data_request_value_overflow test, the final case (tally_fee: u64::max_value(), ..dro) is the same as the immediately preceding case (tally_fee: u64::max_value(), ..dro.clone()), so it tests the same overflow combination as before instead of a new one.", "category": "testing", "v... | null |
witnet__witnet-rust__955 | witnet/witnet-rust | 955 | defect | 170617a8b78aae5ab86c140bd324a4ddae4d5209 | 94830f0b5a6e05b0ecfd2d66822cf6f52c397de0 | fix(wallet): re-implement index transactions | This PR:
- re-implements the index transactions business logic
- adds key to DBKeyNotFound error
Closes #956 | diff --git a/wallet/src/actors/app/handlers/create_vtt.rs b/wallet/src/actors/app/handlers/create_vtt.rs
index 391778da4f..5bdf3a0177 100644
--- a/wallet/src/actors/app/handlers/create_vtt.rs
+++ b/wallet/src/actors/app/handlers/create_vtt.rs
@@ -37,10 +37,9 @@ impl Handler<CreateVttRequest> for app::App {
let... | 8 | 5 | 0 | [{"id": "G0", "claim": "The `Transaction.value` field was changed to `i64` although a transaction's value cannot be negative.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "If multi-account support is no longer a goal, remove the stale `FIXME: Handle multi... | null |
wix__Detox__1588 | wix/Detox | 1,588 | defect | 3e67bd49b047af22516c4cb591e3fbe8a828647d | edf4a834efaa59e16eea7dafe65c9d5b731f2a5c | use adb, aapt, and emulator on PATH if not found in ANDROID_SDK_ROOT | <!---
Thank you for contributing!
Before submitting a pull request that implements a new functionality or fixing a major bug,
please open an issue first and propose your solution. This way we can discuss before time is
spent on a solution that may not work for us.
Please check the correct option in the below li... | diff --git a/detox/src/devices/android/AAPT.js b/detox/src/devices/android/AAPT.js
index de18176231..6c3b62cd26 100644
--- a/detox/src/devices/android/AAPT.js
+++ b/detox/src/devices/android/AAPT.js
@@ -5,11 +5,12 @@ const exec = require('../../utils/exec').execWithRetriesAndLogs;
const escape = require('../../utils/p... | 8 | 7 | 3 | [{"id": "G0", "claim": "The pull request should not add new --adb/--aapt CLI arguments; Detox should instead resolve adb, aapt and emulator through $PATH when they are not provided by ANDROID_SDK_ROOT/ANDROID_HOME.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "c... | null |
wix__Detox__1676 | wix/Detox | 1,676 | defect | 63147ca3ca3daf487c050e8f682fed030f80825b | f2d533b79f862b99ad134bbd5e1542589737aaf9 | feat: --device-launch-args passthrough parameter | Resolves #1669.
- [x] This is a small change
- [x] This change has been discussed in issue #1669 and the solution has been agreed upon with maintainers.
---
**Description:**
Allows users to provide custom args in CLI that would be passed-through onto the device (Android emulator / iOS simulator) when (if)... | diff --git a/detox/local-cli/test.js b/detox/local-cli/test.js
index 02daeb377d..8f2bede6af 100644
--- a/detox/local-cli/test.js
+++ b/detox/local-cli/test.js
@@ -140,6 +140,10 @@ module.exports.builder = {
alias: 'device-name',
group: 'Configuration:',
describe: 'Override the device name specified in a ... | 4 | 3 | 1 | [{"id": "G0", "claim": "The repeated log-and-exec code for launching the test runner should be extracted into an exec(command, detoxEnvironmentVariables) helper.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The variable holding the launch args... | null |
wix__Detox__1891 | wix/Detox | 1,891 | defect | 311d82ed571e8be8e087a230e52061b4a72a708e | 22d4f49ebe29d588c351061a26035bfca21e20a1 | (Android) Friendly-fail test runner if app crashes on launch | - [ ] This is a small change
- [x] This change has been discussed in issue #1880 and the solution has been agreed upon with maintainers.
---
**Description:**
Fixes #1880 by monitoring instrumentation status immediately after instrumentation launch (i.e. by running the `adb shell am instrument ...` command), ... | diff --git a/detox/android/detox/src/main/java/com/wix/detox/Detox.java b/detox/android/detox/src/main/java/com/wix/detox/Detox.java
index a48ecedbb6..a9ec0339f6 100644
--- a/detox/android/detox/src/main/java/com/wix/detox/Detox.java
+++ b/detox/android/detox/src/main/java/com/wix/detox/Detox.java
@@ -6,14 +6,14 @@
im... | 7 | 7 | 1 | [{"id": "G0", "claim": "The `!_.isUndefined(intervalId)` guard before clearInterval is unnecessary because clearInterval handles falsy values fine.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The crash rejection should use the project's `new ... | null |
wix__Detox__2138 | wix/Detox | 2,138 | defect | d3a90729f50d5920371029d9e9debe85577f1047 | f22cfe235a2e7d416e75c05ac84b5101d13e6d9d | Introduce basic support for all user-notification API's in all relevant use cases | - [ ] This is a small change
- [x] This change has been discussed in issue #1192 and the solution has been agreed upon with maintainers.
---
**Description:**
Resolves #1192, by filling the missing gaps - as described in #2134, namely, by adding support for these two API usage cases:
```js
await device.laun... | diff --git a/detox/android/detox/src/main/java/com/wix/detox/Detox.java b/detox/android/detox/src/main/java/com/wix/detox/Detox.java
index 568e94cb8a..bc5717397b 100644
--- a/detox/android/detox/src/main/java/com/wix/detox/Detox.java
+++ b/detox/android/detox/src/main/java/com/wix/detox/Detox.java
@@ -110,8 +110,7 @@ p... | 2 | 2 | 2 | [{"id": "G0", "claim": "Device.launchApp should keep passing `delayPayload: true` when delivering a payload to a backgrounded app — it is needed for correct iOS timing behaviour, so the removal should be reverted.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1"... | null |
wix__Detox__2226 | wix/Detox | 2,226 | defect | a4383edbe8255edeb40188800dd358efe0392ac6 | 3c8994204565c0c9d71bb62af59105a4b50eac4d | Store element-screenshot results as artifacts | - [x] This is a small change
- [x] This change has been discussed in issue #2012 and the solution has been agreed upon with maintainers.
---
**Description:**
Resolves #2012. Applies the final piece of this puzzle: the administration of artifacts management we have over image-files generated by using this featu... | diff --git a/detox/src/Detox.js b/detox/src/Detox.js
index ffcd8bf91f..cab2ee80e3 100644
--- a/detox/src/Detox.js
+++ b/detox/src/Detox.js
@@ -167,6 +167,7 @@ class Detox {
const matchers = matchersRegistry.resolve(this.device, {
invocationManager,
+ emitter: this._eventEmitter,
});
Object.... | 6 | 5 | 2 | [{"id": "G0", "claim": "Consider e2e-testing that device.takeScreenshot() actually generates the artifact, and under the proper name, if that is not already covered.", "category": "testing", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The docs should use the `takeScreensho... | null |
wix__Detox__2235 | wix/Detox | 2,235 | defect | 9d795ac6d1fdb6a9ec32a2bdf2a7b72b79ac8ea6 | 8278cc99114be225a6fdc5eff25c49a399094316 | Apply some post-processing over the multi ADB-name PR | - [ ] This is a small change
- [ ] This change has been discussed in issue #<?> and the solution has been agreed upon with maintainers.
---
**Description:**
This is a direct continuation of #2169. Mostly, but not solely, focused on improving unit tests and coverage rate. | diff --git a/detox/package.json b/detox/package.json
index 8352134bbe..a0358d163c 100644
--- a/detox/package.json
+++ b/detox/package.json
@@ -101,8 +101,6 @@
"src/utils/sleep.js",
"AAPT.js",
"ADB.js",
- "DeviceHandle.js",
- "EmulatorHandle.js",
"fsext.js",
"debug.js",
... | 5 | 2 | 1 | [{"id": "G0", "claim": "The removal of assertEmulatorHasPort and its call from ADB.devices() drops the guard that aborted with a diagnostic dump when an emulator's telnet port could not be parsed.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The a... | null |
wix__Detox__2242 | wix/Detox | 2,242 | defect | aab7db7cee6067ae8c2b62a7c4d63c5be7bba5ad | d32ee2069f9254c94e4d53178eeadaaffa6b2b88 | feat(jest): support artifact collection for multiple retries with jest.retryTimes(n) | - [x] This change has been discussed in issue #2073 and the solution has been agreed upon with maintainers.
---
**Description:**
Adds support `jest.retryTimes(n)` when used with `jest-circus`.
For example, if a `Flaky test` fails 2 times and then passes on the third, the artifacts will be saved like this:
... | diff --git a/detox/runners/jest-circus/listeners/DetoxCoreListener.js b/detox/runners/jest-circus/listeners/DetoxCoreListener.js
index e8384380ef..9a1e0d165b 100644
--- a/detox/runners/jest-circus/listeners/DetoxCoreListener.js
+++ b/detox/runners/jest-circus/listeners/DetoxCoreListener.js
@@ -64,6 +64,7 @@ class Detox... | 4 | 2 | 1 | [{"id": "G0", "claim": "The new test asserting the (3) suffix for a test that passes on its third invocation seems redundant.", "category": "testing", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new e2e retries test does not validate the final artifacts produced across the... | null |
wix__Detox__2319 | wix/Detox | 2,319 | defect | 9100fc8ccb3d44420bf09cb37c1a0511db47308e | 0280d95eed401d3a67175b695cb7b5a121592551 | Remove warning regarding Android parallel being experimental, add robust version check | - [x] This is a small change
- [x] This change has been discussed in issue #2297 and the solution has been agreed upon with maintainers.
---
**Description:**
Resolves #2297 | diff --git a/detox/local-cli/test.js b/detox/local-cli/test.js
index 6efca81685..74ffe6f649 100644
--- a/detox/local-cli/test.js
+++ b/detox/local-cli/test.js
@@ -66,11 +66,6 @@ function choosePrepareArgs({ cliConfig, detoxArgs, runner, platform }) {
}
if (runner === 'jest') {
- if (platform === 'android' &&... | 5 | 4 | 0 | [{"id": "G0", "claim": "The avdmanager path construction inline in AVDValidator should belong to `utils/environment.js` (i.e. `environment.getAVDManagerPath()`).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The plain `Error` throws in AVDVal... | null |
wix__Detox__2471 | wix/Detox | 2,471 | defect | 7a53b1357149810741986752ede6c67946938c05 | fa0aecd21ae4ba8f19b540a91add4c0425d87dde | Genycloud teardown | ## Description
Another (mandatory) step towards support for Genymotion's SaaS solution (see #2429): supporting tear-down.
One of the most important aspects of using cloud emulators is the proper management of their deletion (in particular, because pricing is usage-time based). This change introduces instances delet... | diff --git a/detox/local-cli/test.js b/detox/local-cli/test.js
index 4383e6541d..d95e5a7997 100644
--- a/detox/local-cli/test.js
+++ b/detox/local-cli/test.js
@@ -6,6 +6,7 @@ const { parse, quote } = require('./utils/shellQuote');
const splitArgv = require('./utils/splitArgv');
const DetoxRuntimeError = require('../s... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add a link to the instance's web GUI, both in the cleanup output and when a cloud emulator spins up, so it would be easy to open and examine the instance.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
wix__Detox__2476 | wix/Detox | 2,476 | defect | da1ce8ba725ff4bd7d1f0a36db397277ec709e7f | 3b172dd5d780c4340a347344c1af6b281f8d9027 | Improve Genymotion leakage warning by including instance names | ## Description
Improve Genymotion leakage warnings by including instance names, in addition to meaningless UUID's.
This incorporates 2 main things:
1. Enhancing the device registry such that it would allow for managing object, and not just strings (!)
2. Managing the device cleanup registry using objects, contain... | diff --git a/detox/src/devices/DeviceRegistry.js b/detox/src/devices/DeviceRegistry.js
index 1aeec9f63d..2f474fb40f 100644
--- a/detox/src/devices/DeviceRegistry.js
+++ b/detox/src/devices/DeviceRegistry.js
@@ -45,7 +45,7 @@ class DeviceRegistry {
}
includes(deviceId) {
- return this._lockfile.read().include... | 2 | 2 | 2 | [{"id": "G0", "claim": "The device-identity/equality approach in DeviceRegistry (lodash _.isEqual over object-like IDs) should be replaced with small wrapper classes that define their own equals(other) logic.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim":... | null |
wix__Detox__2560 | wix/Detox | 2,560 | defect | 042793a5764ff4a549fdab2edff77340facb16f3 | 80b236335e10a60596679f893f539bbf424f4c4e | DeviceRegistry to support all handle types | ## Description
Expand `DeviceRegistry` so as to be made capable of storing device-handles of 3 possible types, rather than just ~2:
- Explicit strings
- Plain objects (functions stripped away)
- New: Class instances.
That is achieved by making changes on two levels:
- Reimplementation of `DeviceRegistry`'s mo... | diff --git a/detox/src/devices/DeviceRegistry.js b/detox/src/devices/DeviceRegistry.js
index 4691ff08a6..483ddb874a 100644
--- a/detox/src/devices/DeviceRegistry.js
+++ b/detox/src/devices/DeviceRegistry.js
@@ -10,6 +10,22 @@ const readOptions = {
encoding: 'utf8',
};
+class DeviceHandlesList {
+ constructor(dev... | 1 | 1 | 0 | [{"id": "G0", "claim": "The \"sanitized\" naming given to the device-handle data is unexplained and misleading — no sanitization (e.g. against a hacker attack) is actually happening, so it should be renamed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
wix__Detox__2613 | wix/Detox | 2,613 | defect | 8171bd36aed7fa699ad6fc857471de532d5d00ce | 37a7e038d3510dee3dbc89061e76d02357a01751 | Introduce device.setLaunchArg() | ## Description
I've decided to take a step forward and reduce the added complexity in e2e's of large-scale apps (as Wix' internal ones) in trying to prepare and set up suitable app launch arguments.
The typical use case is of modules settings up mock servers, in particular.
Some mock servers are provided by fram... | diff --git a/detox/index.d.ts b/detox/index.d.ts
index c9ee1be9a1..b56560e534 100644
--- a/detox/index.d.ts
+++ b/detox/index.d.ts
@@ -283,10 +283,34 @@ declare global {
*/
id: string;
/**
- * Holds a descriptive name of the device. Example: emulator-5554 (Pixel_API_2... | 4 | 1 | 1 | [{"id": "G0", "claim": "setLaunchArg should validate its value argument instead of silently storing any value — set on valid values, unset on false/undefined/null (which the author preferred to do via an explicit clearLaunchArg() rather than by throwing) and throw on anything else.", "category": "correctness", "verdict... | null |
wix__Detox__2624 | wix/Detox | 2,624 | defect | a9f675b2665c2fff90c6bf9182f42a7c957c97a0 | bd524a59d66232594b5d449413ef0779af00992a | Introduce launch-args modification API | ## Description
A rewrite of #2618, #2613, introducing app launch-args editing according to the following syntax:
```js
device.appLaunchArgs.modify({
newArg: 'aValue',
existingArgToOverride: 'newValue',
existingArgToDelete: undefined,
});
```
and there's also:
```js
device.appLaunchArgs.reset();
de... | diff --git a/detox/index.d.ts b/detox/index.d.ts
index c9ee1be9a1..86a69efc4c 100644
--- a/detox/index.d.ts
+++ b/detox/index.d.ts
@@ -274,6 +274,55 @@ declare global {
reuse?: boolean;
}
+ /**
+ * A construct allowing for the querying and modification of user arguments passed to ... | 5 | 4 | 1 | [{"id": "G0", "claim": "The JSDoc example in index.d.ts should call `device.appLaunchArgs.modify(...)`, not the nonexistent `device.modify(...)`.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The method `modify` should perhaps be named `assign`, ... | null |
wix__Detox__2642 | wix/Detox | 2,642 | defect | 48768839007fbf88e65f57d0d53494b9c8c330c0 | 4a7747935e7361113f139bda6f35039dbd9489b0 | Clean up default log printing to prevent clutter | This will be the default output:
<img width="1202" alt="Good" src="https://user-images.githubusercontent.com/2270433/107978479-81b07e00-6fc5-11eb-992e-0018e0f54307.png">
Instead of:
<img width="1228" alt="Bad" src="https://user-images.githubusercontent.com/2270433/107977511-e8cd3300-6fc3-11eb-8291-56519fa655fe.png... | diff --git a/detox/local-cli/test.js b/detox/local-cli/test.js
index 6fe27fb347..6f73997a8c 100644
--- a/detox/local-cli/test.js
+++ b/detox/local-cli/test.js
@@ -217,7 +217,7 @@ function launchTestRunner({ argv, env, specs }) {
specs.join(' ')
].join(' ');
- log.info(printEnvironmentVariables(env) + fullCom... | 1 | 1 | 1 | [{"id": "G0", "claim": "Remapping console.log to log.debug may not be a legit change; users calling console.log should get console.log (info-level) behavior.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
wix__Detox__2703 | wix/Detox | 2,703 | defect | c41b685498cb150468b81099eb814ce623bef368 | 1caa5609cc7b23e4d9f86767c9714ba583104bb4 | Android debug sync | Fixes #1788.
## Description
- This pull request fixes the issue described here: #1788
In this pull request, I have enabled usage of `debug-synchronization` for Android.
The main issue why this was not working - in spite of most of the groundwork already laid out, was that on the Detox native end, there was on... | diff --git a/detox/android/detox/build.gradle b/detox/android/detox/build.gradle
index c590d068cc..16d237fb88 100644
--- a/detox/android/detox/build.gradle
+++ b/detox/android/detox/build.gradle
@@ -113,7 +113,11 @@ dependencies {
// noinspection GradleDynamicVersion
testImplementation 'com.facebook.react:rea... | 6 | 4 | 0 | [{"id": "G0", "claim": "The java.util.concurrent.ThreadPoolExecutor import added to Detox.java is probably redundant.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "It would make sense to log the missing-arguments case as an error and move that ... | null |
wix__Detox__2775 | wix/Detox | 2,775 | defect | dd1d5c7deedf379aecf9841e00db80157e83ba99 | 8f40d5b70e42a298dba963753e87d12ffb45d5c0 | Apply some touch-ups following #2768 | ## Description
In this pull request, I have introduced some touch-ups as a follow-up to #2768.
<!--
Step 3: Please review the checklist below.
-->
---
> _For features/enhancements:_
- [ ] I have added/updated the relevant references in the [documentation](https://github.com/wix/Detox/tree/master/docs)... | diff --git a/detox/src/devices/drivers/android/genycloud/GenyCloudDriver.js b/detox/src/devices/drivers/android/genycloud/GenyCloudDriver.js
index 9f3c3c17ee..f2f4554aeb 100644
--- a/detox/src/devices/drivers/android/genycloud/GenyCloudDriver.js
+++ b/detox/src/devices/drivers/android/genycloud/GenyCloudDriver.js
@@ -3... | 1 | 1 | 0 | [{"id": "G0", "claim": "Use the `await expect(promise).rejects.toThrow(...)` matcher instead of the try/catch-then-fail pattern in the unit tests, e.g. in GenyCloudInstanceLauncher.test.js.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
wix__Detox__2778 | wix/Detox | 2,778 | defect | d2be9fc82e24a130074b21bdb7bc2e4248927235 | d1b93449cbff15a1f535f00bcffe147709bbcea4 | Make DeviceRegistry DB-like: hold ids+data instead of objects | ## Description
<!--
Thank you for contributing!
Step 1: Before submitting a pull request that introduces a new functionality or fixes a bug,
please open an issue where we could discuss the suggestion, problem - and potential ways to fix.
-->
- This pull request is associated with the issue described here: #... | diff --git a/detox/src/devices/DeviceRegistry.js b/detox/src/devices/DeviceRegistry.js
index 02f6783d74..cd5a253b83 100644
--- a/detox/src/devices/DeviceRegistry.js
+++ b/detox/src/devices/DeviceRegistry.js
@@ -4,25 +4,35 @@ const fs = require('fs-extra');
const ExclusiveLockfile = require('../utils/ExclusiveLockfile'... | 3 | 1 | 1 | [{"id": "G0", "claim": "The registry should signal (warn or error) when a device that is already registered is registered again, instead of silently re-registering it.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Since ids are already the primary ... | null |
wix__Detox__2888 | wix/Detox | 2,888 | defect | fc0f5e45c1c0d3d41a55ffb04ccd7463f442e5c2 | 18026ce59e751da421e7c0d3f1b6f15ccaf1e988 | adjustSliderToPosition on Android | ## Description
Adding adjustSliderToPosition and toHaveSliderPosition for Android - addresses https://github.com/wix/Detox/issues/2792.
> _For features/enhancements:_
- [x] I have added/updated the relevant references in the [documentation](https://github.com/wix/Detox/tree/master/docs) files.
> _For API chang... | diff --git a/detox/android/detox/src/full/java/com/wix/detox/espresso/DetoxAction.java b/detox/android/detox/src/full/java/com/wix/detox/espresso/DetoxAction.java
index 2cced13260..8822e35006 100644
--- a/detox/android/detox/src/full/java/com/wix/detox/espresso/DetoxAction.java
+++ b/detox/android/detox/src/full/java/c... | 9 | 9 | 2 | [{"id": "G0", "claim": "In `toHaveSliderPosition`, use `Math.abs(actualValue - expectedValue) <= tolerance` with 0 as the default tolerance, eliminating the `if (tolerance > 0)` special case.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In the constrai... | null |
wix__Detox__2911 | wix/Detox | 2,911 | defect | 2c6478d6137bd0f3b3d3e92ee30fa82ad6f1d365 | f18ca785cc7f40f110a54b297bacf7567d789a53 | Add support for launch argument detoxURLBlacklistRegex on Android | Until now, the launchArgs detoxURLBlacklistRegex was supported only on ios - this PR adds support on Android. Relates to issue https://github.com/wix/Detox/issues/1695.
| diff --git a/detox/android/detox/src/full/java/com/wix/detox/DetoxMain.kt b/detox/android/detox/src/full/java/com/wix/detox/DetoxMain.kt
index 5e4f0bd88b..4b0ef0f6e9 100644
--- a/detox/android/detox/src/full/java/com/wix/detox/DetoxMain.kt
+++ b/detox/android/detox/src/full/java/com/wix/detox/DetoxMain.kt
@@ -32,6 +32,... | 3 | 3 | 2 | [{"id": "G0", "claim": "The new Android detoxURLBlacklistRegex blacklist support needs E2E test coverage, as discussed in person.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G3", "claim": "Rename the LaunchArgs blacklist accessors to `getURLBlacklist` and `hasURLBl... | null |
wix__Detox__2922 | wix/Detox | 2,922 | defect | 33e2df0eb619dcfe7f1d5affbc78c5df34872cda | adc30e2d7380e2440aa2902bb576561cf4ce719d | Fix issues with android on api's below 23 | Fixes issues with installing and launching the app on android for api levels below 23.
Based upon mnightingale's PR
https://github.com/wix/Detox/pull/2906
and addresses the following issues:
- Fixes https://github.com/wix/Detox/issues/2919
- Fixes https://github.com/wix/Detox/issues/2527 | diff --git a/detox/android/detox/src/main/java/org/joor/Reflect.java b/detox/android/detox/src/main/java/org/joor/Reflect.java
index df58777e0e..092d196747 100644
--- a/detox/android/detox/src/main/java/org/joor/Reflect.java
+++ b/detox/android/detox/src/main/java/org/joor/Reflect.java
@@ -13,6 +13,8 @@
*/
package o... | 3 | 2 | 0 | [{"id": "G0", "claim": "The version guard in Reflect.set should be written as `>= Build.VERSION_CODES.M` rather than the equivalent `SDK_INT > Build.VERSION_CODES.LOLLIPOP_MR1`.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The single-use `need... | null |
wix__Detox__3009 | wix/Detox | 3,009 | defect | 3dfcbf52827a6d42ecdb6360c418ae9484494af3 | 7c66f49df136f4c44a8f18cc928c37bcea41f15f | types: add typings for element(...).getAttributes() | ## Description
- This pull request resolves #2971
In this pull request, I have added the `getAttributes()` TypeScript typings as requested - not sure the exact styling requirements of the `index.d.ts` file - I'd be happy to rearrange anything if needed.
- [x] add an E2E test for a scroll view
- [x] add an ... | diff --git a/detox/index.d.ts b/detox/index.d.ts
index 07da47c5a7..44b0bdf01a 100644
--- a/detox/index.d.ts
+++ b/detox/index.d.ts
@@ -10,6 +10,7 @@
// Current contributors:
// * Yaroslav Serhieiev <https://github.com/noomorph>
// * Oren Zakay <https://github.com/OrenZak>
+// * Chris Frewin <https://github.com/princ... | 17 | 14 | 3 | [{"id": "G0", "claim": "The JSDoc example for getAttributes() should use descriptive assertions (e.g. jestExpect(attributes.visible).toBe(true)) instead of console.log calls.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The attribute interface d... | null |
wix__Detox__3102 | wix/Detox | 3,102 | defect | 98260426e81af45e5b208acb2cd6067d4115b202 | 0fb2b6b7f943971f96cda0ceeb375e058682a1a8 | fix(artifacts): escape visibility debug screenshots on iOS | ## Description
Resolves https://github.com/wix/Detox/issues/3101
In this pull request, I have changed handling of debug visibility artifacts – instead of scheduling "move me a folder", we scan through the individual files inside it and schedule each one individually:
```js
for (const innerPath of fs.globSync(... | diff --git a/.retext-spell.dic b/.retext-spell.dic
index 37e4032ee3..319c9c87be 100644
--- a/.retext-spell.dic
+++ b/.retext-spell.dic
@@ -135,6 +135,7 @@ unbreak/M
unencrypted
unminified
unobfuscated
+uninstallation
unregister/M
util/M
webhook/M
diff --git a/detox/package.json b/detox/package.json
index 863f5eb1... | 5 | 3 | 1 | [{"id": "G0", "claim": "Refactor _onInvokeFailure so the visibility directory contents are read only once, filtering files by .png extension via path.extname, instead of fail-fasting on isDirEmptySync and re-reading via globSync (which also leaves dirs containing only non-png files unhandled).", "category": "performanc... | null |
wix__Detox__3114 | wix/Detox | 3,114 | defect | 7c87d5c0e7838f3d3dca99221cff395cb0ccd748 | 03fc57603a44d9ed9ddf3776a4393d151e599983 | fix: prevent a retry loop from hanging up the test runners | ## Description
- This pull request resolves #2481
In this pull request, I have:
* added `shouldUnref` option to `sleep` utility
* added `shouldUnref ` option to `retry` utility
* added `shouldUnref: true` to the `retry()` call for Android emulator
* updated unit tests
* checked manually the end result.
To... | diff --git a/detox/package.json b/detox/package.json
index 863f5eb16e..c1fc0b8b49 100644
--- a/detox/package.json
+++ b/detox/package.json
@@ -33,6 +33,7 @@
},
"devDependencies": {
"@types/child-process-promise": "^2.2.1",
+ "@types/node": "^12.20.37",
"@types/ws": "^7.4.0",
"eslint": "^4.11.0",... | 4 | 2 | 0 | [{"id": "G0", "claim": "sleep() should take a positional `unref = false` parameter instead of an options object.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The `unref` argument/option should be named `shouldUnref`.", "category": "maintainability", "ver... | null |
wix__Detox__3300 | wix/Detox | 3,300 | defect | 95700e061cbc73a8bdcdc9e731ecebbc74e8b5e2 | 06835f803706587bb4e220f8c647ebac71572cbf | Support community slider | ## Description
This PR adds support for the Community Slider.
- This pull request resolves #3226
| diff --git a/detox/android/detox/build.gradle b/detox/android/detox/build.gradle
index 9afd1abaac..b5dcb2d15f 100644
--- a/detox/android/detox/build.gradle
+++ b/detox/android/detox/build.gradle
@@ -121,6 +121,7 @@ dependencies {
// Unit-testing deps.
dependencies {
+ implementation project(path: ':@react-native... | 4 | 2 | 1 | [{"id": "G0", "claim": "The new `implementation project(path: ':@react-native-community_slider')` dependency added to detox/android/detox/build.gradle will fail in projects that don't use the community slider.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "c... | null |
wix__Detox__3313 | wix/Detox | 3,313 | defect | d7a587f3d9f36fc8f10e8fc4e7b1c7ff2af38d17 | 1075da197eca2db30fc892eec5fc05552beb6a90 | build(releaseDocumentation): push version changes to the checked-out branch. | Fix the docs version release (`releaseDocumentation.js`) by pushing the version changes to `wix/Detox:master` branch.
Before that, the changes were committed, but [only locally](https://buildkite.com/wix-mobile-oss/detox/builds/497#bd4beb87-5312-42f4-a6c7-535f6a474b40/117-965) (on the local clone made during the relea... | diff --git a/scripts/utils/releaseDocumentation.js b/scripts/utils/releaseDocumentation.js
index 739f661326..5f64da34ed 100644
--- a/scripts/utils/releaseDocumentation.js
+++ b/scripts/utils/releaseDocumentation.js
@@ -16,6 +16,7 @@ function buildDocsForVersion(version) {
exec.execSync(`npm run docusaurus docs:ver... | 3 | 3 | 0 | [{"id": "G0", "claim": "This style of test (asserting exact execSync call counts and arguments) is not very useful.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Mocking node's native modules (fs and shell-utils) in these tests is discouraged.", "cat... | null |
wix__Detox__3392 | wix/Detox | 3,392 | defect | 11860fe1dc436faa0d175e1212e8b68863e2a843 | d059532a9044b52e38628e1e91c6ecaff6202992 | feat: drop support for jest<27.2.5 | ## Description
Resolves #3394
| diff --git a/detox/package.json b/detox/package.json
index b7457058dc..4fa17db256 100644
--- a/detox/package.json
+++ b/detox/package.json
@@ -44,7 +44,6 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-unicorn": "^39.0.0",
"jest": "^27.0.0",
- "jest-environment-node": "^27.0.0",
"mockdate": "^... | 1 | 1 | 0 | [{"id": "G0", "claim": "The version assertion should not get its own dedicated function while the preliminary assertions stay inline — either extract all of the assertions or none, for consistent styling.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
wix__Detox__3498 | wix/Detox | 3,498 | defect | 105488778bbc4de4e2defed3e267ab0cc33fbe0b | 3f8f6ef623c9e52a49a8f9553705e475b8c0c330 | fix(android): crash message handling on client.waitUntilAppIsReady | ## Description
Resolves #3500.
## Notes
Adds a 3rd party dependency to read launch arguments (because seemingly we have it implemented only for Android):
```diff
+ "react-native-launch-arguments": "^3.1.0",
```
🤷♂️
: Detox enable synchronization | ## Description
Enable/disable the synchronization mechanism with a launch argument.
- This pull request addresses the issue described here: #3270
Fixes #3461
| diff --git a/detox/android/detox/src/full/java/com/wix/detox/LaunchArgs.java b/detox/android/detox/src/full/java/com/wix/detox/LaunchArgs.java
index e9d0006fc0..f9507988bc 100644
--- a/detox/android/detox/src/full/java/com/wix/detox/LaunchArgs.java
+++ b/detox/android/detox/src/full/java/com/wix/detox/LaunchArgs.java
@... | 10 | 8 | 2 | [{"id": "G0", "claim": "The new LaunchArgs accessors should be named getEnableSynchronization and hasEnableSynchronization instead of getDetoxEnableSynchronization and hasDetoxEnableSynchronization.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "ReactNat... | null |
wix__Detox__3614 | wix/Detox | 3,614 | defect | 319f1d4c734ae93cc26c1fbf9d205c34a1c47d68 | a013a27ab0cbb55c31740a178228165221f4af4f | bugfix: avd validator emulator version should obey `headless` | ## Description
This is a bugfix to address the `headless` config when running tests (invoked as `emulator -version` by the `AVDValidator`s emulator version validator.
- Resolves #3613
In this pull request, I have forwarded the `headless` config option to the `AVDValidator` so that the existing emulator version ... | diff --git a/detox/src/devices/allocation/drivers/android/emulator/AVDValidator.js b/detox/src/devices/allocation/drivers/android/emulator/AVDValidator.js
index 95ad52d0f2..07d57f07e0 100644
--- a/detox/src/devices/allocation/drivers/android/emulator/AVDValidator.js
+++ b/detox/src/devices/allocation/drivers/android/em... | 2 | 2 | 1 | [{"id": "G0", "claim": "The pull request's change (passing headless through the AVD validator) ships with no unit tests, and the reviewer asks whether unit tests should be added.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "In EmulatorAllocDriver.test... | null |
wix__Detox__3672 | wix/Detox | 3,672 | defect | f3d15786e5799e95f748a24183ec61a6a50944a8 | eb4adb01e4a36bb79355790fd5238bc3e1d4bb40 | Fix(Android): Emulator boot not detected >= api 31 | ## Description
Detect when emulator boots >= api 31
Fixes: https://github.com/wix/Detox/issues/3071
Fixes: https://github.com/wix/Detox/issues/3342 | diff --git a/detox/src/devices/allocation/drivers/android/emulator/EmulatorLauncher.js b/detox/src/devices/allocation/drivers/android/emulator/EmulatorLauncher.js
index 3bc3ad87eb..3acc8a4058 100644
--- a/detox/src/devices/allocation/drivers/android/emulator/EmulatorLauncher.js
+++ b/detox/src/devices/allocation/driver... | 1 | 1 | 1 | [{"id": "G0", "claim": "The log-tailing approach to emulator boot detection should be replaced with a different approach (as shown in the linked comparison).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
wix__Detox__3686 | wix/Detox | 3,686 | defect | a1c70efd4951589269af6269143cf8c9c9b9f2da | df0bd1306f218a408b26395f59dd7dbdb2e1301a | Add unit-tests for the primary-secondary realms | ## Description
<!--
Thank you for contributing!
Step 1: Before submitting a pull request that introduces a new functionality or fixes a bug,
please open an issue where we could discuss the suggestion, problem - and potential ways to fix.
-->
- This pull request fixes #3643
<!--
Step 2: Provide an overvi... | diff --git a/detox/__tests__/setupJest.js b/detox/__tests__/setupJest.js
index 22acf69667..e50761c31e 100644
--- a/detox/__tests__/setupJest.js
+++ b/detox/__tests__/setupJest.js
@@ -4,6 +4,7 @@ jest.mock('../src/logger/DetoxLogger');
const path = require('path');
+const _ = require('lodash');
const yargs = requi... | 3 | 3 | 0 | [{"id": "G0", "claim": "The worker-id guard added in installWorker should use the idiomatic `!= null` check instead of explicitly comparing against both null and undefined.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The PR should not expose ... | null |
wix__Detox__3756 | wix/Detox | 3,756 | defect | 2e806f7d58330098a46ce757d125bd80f9940610 | 40465aa7980686cce5600ceb1208f5df5a5ae167 | fix: immutable matchers | ## Description
Resolves #3675 | diff --git a/detox/src/android/AndroidExpect.test.js b/detox/src/android/AndroidExpect.test.js
index dda0b69a44..4d9c806679 100644
--- a/detox/src/android/AndroidExpect.test.js
+++ b/detox/src/android/AndroidExpect.test.js
@@ -93,6 +93,15 @@ describe('AndroidExpect', () => {
await e.expect(e.element(e.by.id('tes... | 2 | 2 | 1 | [{"id": "G0", "claim": "The new immutability tests should also assert that the original matchers themselves did not mutate, i.e. that `base`/`some` and `modifier`/`other` still equal their original forms after combining.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "... | null |
wix__Detox__3790 | wix/Detox | 3,790 | defect | 4f1782c1bac3141feb5405600bb5ac0d44a7169e | 9326e1c30db2c9fbb57fea191d3259e1557f4d3d | feat(android): support setDatePickerDate | ## Description
- This pull request addresses the issue described here: #3789
In this pull request, I have extended the setDatePickerDate action to work on android as well.
setDatePickerDate is already working for android in this pr and I also updated one relevant test.
I have yet to investigate whether more te... | diff --git a/detox/android/detox/build.gradle b/detox/android/detox/build.gradle
index 9185a26a03..62a068b9c6 100644
--- a/detox/android/detox/build.gradle
+++ b/detox/android/detox/build.gradle
@@ -95,6 +95,9 @@ dependencies {
api('androidx.test.espresso:espresso-web:3.4.0') {
because 'Web-View testing'
... | 9 | 8 | 6 | [{"id": "G0", "claim": "The new setDatePickerDate functionality is missing unit test coverage, which the reviewer hopes is trivial enough to add.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The JSDoc example should recommend an example that works ide... | null |
wix__Detox__3936 | wix/Detox | 3,936 | defect | c87ab274a43c773b62911499a283d904a8038341 | f43c237c2015d4ab06833c220331cf947840ad5a | fix: missing method waitFor(...).toBeFocused() | ## Description
I've run into this in my tests:
```
TypeError: (0 , _detox.waitFor)(...).toBeFocused is not a function
6 | await waitFor(element(by.id('email-input')))
> 7 | .toBeFocused()
| ^
8 | .withTimeout(5000);
```
TypeScript suggested it was poss... | diff --git a/detox/src/android/AndroidExpect.test.js b/detox/src/android/AndroidExpect.test.js
index 6252c46842..8b26a716cd 100644
--- a/detox/src/android/AndroidExpect.test.js
+++ b/detox/src/android/AndroidExpect.test.js
@@ -165,6 +165,8 @@ describe('AndroidExpect', () => {
await e.waitFor(e.element(e.by.id('i... | 1 | 1 | 1 | [{"id": "G0", "claim": "The added e2e coverage for waitFor(...).toBeFocused() should be backed by real e2e tests exercising focus/unfocus behaviour, not by refactoring the existing suite.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
wix__Detox__3954 | wix/Detox | 3,954 | defect | 56fc94f971626c124a6d71895c4aa6b262cc1481 | 2bd2f4a79ce8dbfdae06ffe9d6921122bb03aeb7 | Fix detoxURLBlacklistRegex arg for launchApp() on iOS | ## Description
<!--
Thank you for contributing!
Step 1: Before submitting a pull request that introduces a new functionality or fixes a bug,
please open an issue where we could discuss the suggestion, problem - and potential ways to fix.
-->
- This pull request fixes #3953
<!--
Step 2: Provide an overvi... | diff --git a/detox/ios/Detox/DetoxInit.m b/detox/ios/Detox/DetoxInit.m
index 7f60c9e739..31110741ce 100644
--- a/detox/ios/Detox/DetoxInit.m
+++ b/detox/ios/Detox/DetoxInit.m
@@ -67,10 +67,14 @@ static void detoxConditionalInit()
settings[@"enabled"] = @([syncEnabled boolValue]);
}
- NSArray *blacklistRegex = [... | 3 | 2 | 0 | [{"id": "G0", "claim": "The second `await expect(element(by.text('Long Network Request Working!!!'))).toBeVisible();` is redundant because the preceding `waitFor(...).toBeVisible().withTimeout(4000)` already throws on timeout, so it should be removed as suggested.", "category": "maintainability", "verdict": "supported"... | null |
wix__Detox__4100 | wix/Detox | 4,100 | defect | e34367c15db7e6f0649de98895d95cbfa542dc6c | e9b0239be352613d4621a2ef55d3164661c398e5 | feat: support regex in matchers | ## Description
<!--
Thank you for contributing!
Step 1: Before submitting a pull request that introduces a new functionality or fixes a bug,
please open an issue where we could discuss the suggestion, problem - and potential ways to fix.
-->
- This pull request addresses the issue described here: #3366
<!... | diff --git a/detox/android/detox/src/full/java/com/wix/detox/espresso/DetoxMatcher.java b/detox/android/detox/src/full/java/com/wix/detox/espresso/DetoxMatcher.java
index 31a23f0bfd..f9a23fcaaa 100644
--- a/detox/android/detox/src/full/java/com/wix/detox/espresso/DetoxMatcher.java
+++ b/detox/android/detox/src/full/jav... | 11 | 10 | 0 | [{"id": "G0", "claim": "The three near-identical regex matchers in ViewMatchers.kt duplicate the BoundedMatcher structure and should be replaced by a shared factory method (possibly extracted to another file), as sketched by the reviewer.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope... | null |
wix__Detox__4376 | wix/Detox | 4,376 | defect | 2838b569bcbc45f82758b11e83a945f69b5f4bac | 9265f9856e96465d72dee1b06d17145f1c20f447 | fix: communicate crash errors more clearly | ## Description
- This pull request addresses recurring internal support tickets where our users seem to use the following pattern:
```js
try {
await tapOnSomething();
} finally {
await tapOnSomethingElse();
}
```
If `await tapOnSomething()` makes the application crash, the consequent action, `await tap... | diff --git a/detox/src/client/Client.js b/detox/src/client/Client.js
index 4fcc31139d..c4a25a8e52 100644
--- a/detox/src/client/Client.js
+++ b/detox/src/client/Client.js
@@ -137,6 +137,10 @@ class Client {
}
async sendAction(action) {
+ if (this._pendingAppCrash) {
+ throw this._pendingAppCrash;
+ }... | 1 | 1 | 0 | [{"id": "G0", "claim": "The single test added for 'on AppWillTerminateWithError', which checks both the scheduled termination with rejection of pending requests and the behaviour after the app reconnects, should be split into 2 separate tests as was done with the prod-tests equivalent.", "category": "testing", "verdict... | null |
wix__Detox__4508 | wix/Detox | 4,508 | defect | 497a8f6ddbe56074bfe8d98f8bc85885698dee1e | 0095b575abbc8d0b8da17886b216c6696947f88f | feat(config): multi-app build and start scripts | ## Description
In this pull request, I have extended Detox config resolution so that it can take `build` and `start` scripts not only from every app, but it can take configuration-scoped overrides, where a single command does all the building or app server running.
> _For features/enhancements:_
- [x] I have ad... | diff --git a/detox/detox.d.ts b/detox/detox.d.ts
index 722cb98d78..930022450e 100644
--- a/detox/detox.d.ts
+++ b/detox/detox.d.ts
@@ -33,6 +33,8 @@ declare global {
logger?: DetoxLoggerConfig;
session?: DetoxSessionConfig;
testRunner?: DetoxTestRunnerConfig;
+ build?: ... | 2 | 1 | 0 | [{"id": "G0", "claim": "Multi-app build and start could be handled by default using build caching (Gradle) or similar, instead of the explicit build scripts this PR adds.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The PR should align on a single term f... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.