Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-744: Prepare for merge #567

Merged
merged 58 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
6fcc1cd
GH-813: Correctly parse max block range error message (#531)
masqrauder Sep 29, 2024
a4fb720
GH-500: Adding Base chains (#510)
bertllll Oct 2, 2024
91f3b8c
update readme and tag v0.8.1 (#532)
kauri-hero Oct 3, 2024
f5572f3
GH-524: Disable `entry_dns` (#526)
utkarshg6 Oct 8, 2024
7693d00
GH-539: Don't Panic! (#540)
utkarshg6 Oct 15, 2024
8ad336d
New Version: v0.8.2 (#542)
utkarshg6 Oct 15, 2024
3d35b4c
GH-744: Review-1 first lot of changes
Syther007 Oct 21, 2024
cc709be
GH-744: Review-1 - fixed more tests
Syther007 Oct 22, 2024
e9bddc8
GH-744: improved wildcard IP check
Syther007 Oct 22, 2024
b72c61b
GH-744: removed unused imports
Syther007 Oct 22, 2024
d4c5be9
GH-744: fixed a bunch more comments from review 1
Syther007 Oct 25, 2024
43456e7
GH-744: resolved more review comments
Syther007 Nov 1, 2024
4d7fa8a
GH-744: started converting gas_price units from gwei to wei
Syther007 Nov 1, 2024
6a3ceaf
GH-744: finish converting gas price from gwei to wei
Syther007 Nov 4, 2024
8f131bb
GH-744: Formating & removed warnings
Syther007 Nov 4, 2024
67a9786
GH-744: Added TransactionFailed to TransactionReceiptResult
Syther007 Nov 5, 2024
0caf945
GH-606: Initialize start_block to none to use latest block (#374)
masqrauder Nov 6, 2024
4db1f91
GH-744: Migrated the guts of get_transaction_receipt_in_batch to proc…
Syther007 Nov 8, 2024
b0aed3a
GH-744: Moved submit_payables_in_batch to blockchain_interface
Syther007 Nov 11, 2024
fac4936
GH-744: removed test: blockchain_bridge_can_return_report_transaction…
Syther007 Nov 12, 2024
c5ddb57
GH-744: Fixed a few more URGENCY comments
Syther007 Nov 13, 2024
237a533
GH-744: cleanup & formatting
Syther007 Nov 13, 2024
1be2642
GH-744: add some TODOs as discussed on Wed and Thu
utkarshg6 Nov 15, 2024
8d22c61
GH-744: handle_request_transaction_receipts chaged error to a DEBUG log
Syther007 Nov 15, 2024
b3cafe4
GH-744: handle_retrieve_transactions inbeded extract_max_block_count
Syther007 Nov 15, 2024
ab32fb6
GH-744: code refactor
Syther007 Nov 15, 2024
1a92588
GH-744: removed transaction_id from Agent
Syther007 Nov 18, 2024
5172c82
GH-744: Removed get_gas_price from submit_batch call
Syther007 Nov 18, 2024
89419ed
GH-744: logger is now a reference in send_payables_within_batch
Syther007 Nov 18, 2024
5181f1c
GH-744: send_payables_within_batch web3_batch is now a reference
Syther007 Nov 18, 2024
54ab85e
GH-744: sign_and_append_multiple_payments accounts is now a reference
Syther007 Nov 18, 2024
e93c0f1
GH-744 removed Blockchan_interface_mock
Syther007 Nov 19, 2024
ef88ab4
GH-744: Refactored all 4 test for send_payables_within_batch
Syther007 Nov 20, 2024
f18b8a6
GH-744: cleanup & formatting
Syther007 Nov 20, 2024
a5e6f68
GH-744: small fixs
Syther007 Nov 20, 2024
3d4f552
GH-744: handle_normal_client_data detects wildcard IP & localhost wit…
Syther007 Nov 22, 2024
4de72c8
GH-744: Finished all urgent comments
Syther007 Nov 25, 2024
94cea47
Merged in Master
Syther007 Dec 3, 2024
9a6bcb4
GH-744: changed actions macos-12 to 13
Syther007 Dec 4, 2024
7499332
GH-744: increased sleep time for test provided_and_consumed_services_…
Syther007 Dec 4, 2024
e2317ae
GH-744: Fixed multinode tests
Syther007 Dec 16, 2024
1c4b7f0
GH-744: Added start block +1 to handle_transaction_logs
Syther007 Dec 17, 2024
e80e1d0
GH-744: Fixed some tests
Syther007 Dec 17, 2024
b3bb461
Merge branch 'GH-744-merge-test' of https://github.com/MASQ-Project/N…
Syther007 Dec 17, 2024
0c82a79
GH-744: Fixes from review 2
Syther007 Dec 18, 2024
6961751
GH-744: Fixed test debtors_are_credited_once_but_not_twice
Syther007 Dec 18, 2024
ace75e7
GH-744: removed BlockNumber::Number
Syther007 Dec 18, 2024
e132f66
GH-744: Resolved TODOs
Syther007 Dec 18, 2024
6b9d987
GH-744: First commit for review-3, fixed tests
Syther007 Dec 20, 2024
d81ac19
GH-744: Refactored TxReceipt
Syther007 Dec 20, 2024
69f70c1
GH-744: Refactored TxResponse
Syther007 Dec 20, 2024
d30dc27
GH-744 moved & renamed blockchain_interface_utils.rs
Syther007 Dec 23, 2024
83dc7bc
GH-744: fixed test: dns_resolution_failure_for_wildcard_ip_with_real_…
Syther007 Dec 23, 2024
91eefcf
GH-744: add review 4 changes
utkarshg6 Dec 30, 2024
f4b8150
GH-744: add review 5 changes
utkarshg6 Dec 31, 2024
64f2f40
GH-744: remove the map_err()
utkarshg6 Jan 2, 2025
a047291
GH-744: migrate the logging code to a different function
utkarshg6 Jan 2, 2025
d07760b
GH-744: add review 6 changes
utkarshg6 Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
target:
- { name: linux, os: ubuntu-22.04 }
- { name: macos, os: macos-12 }
- { name: macos, os: macos-13 }
- { name: windows, os: windows-2022 }

name: Build node on ${{ matrix.target.os }}
Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ stage - MASQ Network and it's developers are not responsible for any activity, o
## Source
The MASQ project was forked from Substratum's Node project in order to carry on development after Substratum ceased
operations in October of 2019. In 2021, Substratum's Node repositories were removed from GitHub, so the fork link
with MASQ was broken, but all credit for the original idea, the original design, and the first two years of MASQ's
development belongs to Substratum.
with MASQ was broken, but all credit for the original idea and the original design belongs to Substratum (and properly attributed through GPLv3 license)

## Running the MASQ Node

Expand Down Expand Up @@ -452,6 +451,4 @@ recommend using a 64-bit version to build.

We do plan to release binaries that will run on 32-bit Windows, but they will likely be built on 64-bit Windows.

Copyright (c) 2019-2022, MASQ Network

Copyright (c) 2017-2019, Substratum LLC and/or its affiliates. All rights reserved.
Copyright (c) 2019-2024, MASQ Network
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably create a card in which we'll replace the year 2024 for 2025 in all occurrences of these copyrights.

Copy link
Collaborator Author

@utkarshg6 utkarshg6 Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the new card - #569

4 changes: 2 additions & 2 deletions automap/Cargo.lock

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

2 changes: 1 addition & 1 deletion automap/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "automap"
version = "0.8.0"
version = "0.8.2"
authors = ["Dan Wiebe <[email protected]>", "MASQ"]
license = "GPL-3.0-only"
description = "Library full of code to make routers map ports through firewalls"
Expand Down
4 changes: 2 additions & 2 deletions dns_utility/Cargo.lock

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

2 changes: 1 addition & 1 deletion dns_utility/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dns_utility"
version = "0.8.0"
version = "0.8.2"
license = "GPL-3.0-only"
authors = ["Dan Wiebe <[email protected]>", "MASQ"]
copyright = "Copyright (c) 2019, MASQ (https://masq.ai) and/or its affiliates. All rights reserved."
Expand Down
2 changes: 1 addition & 1 deletion masq/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "masq"
version = "0.8.0"
version = "0.8.2"
authors = ["Dan Wiebe <[email protected]>", "MASQ"]
license = "GPL-3.0-only"
description = "Reference implementation of user interface for MASQ Node"
Expand Down
13 changes: 8 additions & 5 deletions masq/src/commands/configuration_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ impl ConfigurationCommand {
dump_parameter_line(
stream,
"Start block:",
&configuration.start_block.to_string(),
&configuration
.start_block_opt
.map(|m| m.separate_with_commas())
.unwrap_or_else(|| "[Latest]".to_string()),
);
Self::dump_value_list(stream, "Past neighbors:", &configuration.past_neighbors);
let payment_thresholds = Self::preprocess_combined_parameters({
Expand Down Expand Up @@ -333,7 +336,7 @@ mod tests {
exit_byte_rate: 129000000,
exit_service_rate: 160000000,
},
start_block: 3456,
start_block_opt: None,
scan_intervals: UiScanIntervals {
pending_payable_sec: 150500,
payable_sec: 155000,
Expand Down Expand Up @@ -378,7 +381,7 @@ mod tests {
|Max block count: [Unlimited]\n\
|Neighborhood mode: standard\n\
|Port mapping protocol: PCP\n\
|Start block: 3456\n\
|Start block: [Latest]\n\
|Past neighbors: neighbor 1\n\
| neighbor 2\n\
|Payment thresholds: \n\
Expand Down Expand Up @@ -433,7 +436,7 @@ mod tests {
exit_byte_rate: 20,
exit_service_rate: 30,
},
start_block: 3456,
start_block_opt: Some(1234567890u64),
scan_intervals: UiScanIntervals {
pending_payable_sec: 1000,
payable_sec: 1000,
Expand Down Expand Up @@ -476,7 +479,7 @@ mod tests {
|Max block count: 100,000\n\
|Neighborhood mode: zero-hop\n\
|Port mapping protocol: PCP\n\
|Start block: 3456\n\
|Start block: 1,234,567,890\n\
|Past neighbors: [?]\n\
|Payment thresholds: \n\
| Debt threshold: 2,500 gwei\n\
Expand Down
41 changes: 34 additions & 7 deletions masq/src/commands/set_configuration_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use masq_lib::shared_schema::gas_price_arg;
use masq_lib::shared_schema::min_hops_arg;
use masq_lib::short_writeln;
use masq_lib::utils::ExpectValue;
use std::num::IntErrorKind;

#[derive(Debug, PartialEq, Eq)]
pub struct SetConfigurationCommand {
Expand Down Expand Up @@ -35,9 +36,17 @@ impl SetConfigurationCommand {
}

fn validate_start_block(start_block: String) -> Result<(), String> {
match start_block.parse::<u64>() {
Ok(_) => Ok(()),
_ => Err(start_block),
if "latest".eq_ignore_ascii_case(&start_block) || "none".eq_ignore_ascii_case(&start_block) {
Ok(())
} else {
match start_block.parse::<u64>() {
Ok(_) => Ok(()),
Err(e) if e.kind() == &IntErrorKind::PosOverflow => Err(
format!("Unable to parse '{}' into a starting block number or provide 'none' or 'latest' for the latest block number: digits exceed {}.",
start_block, u64::MAX),
),
Err(e) => Err(format!("Unable to parse '{}' into a starting block number or provide 'none' or 'latest' for the latest block number: {}.", start_block, e))
}
}
}

Expand All @@ -59,7 +68,7 @@ impl Command for SetConfigurationCommand {
const SET_CONFIGURATION_ABOUT: &str =
"Sets Node configuration parameters being enabled for this operation when the Node is running.";
const START_BLOCK_HELP: &str =
"Ordinal number of the Ethereum block where scanning for transactions will start.";
"Ordinal number of the Ethereum block where scanning for transactions will start. Use 'latest' or 'none' for Latest block.";

pub fn set_configurationify<'a>(shared_schema_arg: Arg<'a, 'a>) -> Arg<'a, 'a> {
shared_schema_arg.takes_value(true).min_values(1)
Expand Down Expand Up @@ -103,7 +112,7 @@ mod tests {
);
assert_eq!(
START_BLOCK_HELP,
"Ordinal number of the Ethereum block where scanning for transactions will start."
"Ordinal number of the Ethereum block where scanning for transactions will start. Use 'latest' or 'none' for Latest block."
);
}

Expand All @@ -122,10 +131,28 @@ mod tests {
assert!(result.contains("cannot be used with one or more of the other specified arguments"));
}

#[test]
fn validate_start_block_catches_invalid_values() {
assert_eq!(validate_start_block("abc".to_string()), Err("Unable to parse 'abc' into a starting block number or provide 'none' or 'latest' for the latest block number: invalid digit found in string.".to_string()));
assert_eq!(validate_start_block("918446744073709551615".to_string()), Err("Unable to parse '918446744073709551615' into a starting block number or provide 'none' or 'latest' for the latest block number: digits exceed 18446744073709551615.".to_string()));
assert_eq!(validate_start_block("123,456,789".to_string()), Err("Unable to parse '123,456,789' into a starting block number or provide 'none' or 'latest' for the latest block number: invalid digit found in string.".to_string()));
assert_eq!(validate_start_block("123'456'789".to_string()), Err("Unable to parse '123'456'789' into a starting block number or provide 'none' or 'latest' for the latest block number: invalid digit found in string.".to_string()));
}
#[test]
fn validate_start_block_works() {
assert!(validate_start_block("abc".to_string()).is_err());
assert!(validate_start_block("1566".to_string()).is_ok());
assert_eq!(
validate_start_block("18446744073709551615".to_string()),
Ok(())
);
assert_eq!(validate_start_block("1566".to_string()), Ok(()));
assert_eq!(validate_start_block("none".to_string()), Ok(()));
assert_eq!(validate_start_block("None".to_string()), Ok(()));
assert_eq!(validate_start_block("NONE".to_string()), Ok(()));
assert_eq!(validate_start_block("nOnE".to_string()), Ok(()));
assert_eq!(validate_start_block("latest".to_string()), Ok(()));
assert_eq!(validate_start_block("LATEST".to_string()), Ok(()));
assert_eq!(validate_start_block("LaTeST".to_string()), Ok(()));
assert_eq!(validate_start_block("lATEst".to_string()), Ok(()));
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion masq/tests/startup_shutdown_tests_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ fn handles_startup_and_shutdown_integration() {
"--data-directory",
dir_path.to_str().unwrap(),
"--blockchain-service-url",
"https://example.com",
"https://nonexistentblockchainservice.com",
]);

let (stdout, stderr, exit_code) = masq_handle.stop();
Expand Down
2 changes: 1 addition & 1 deletion masq_lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "masq_lib"
version = "0.8.0"
version = "0.8.2"
authors = ["Dan Wiebe <[email protected]>", "MASQ"]
license = "GPL-3.0-only"
description = "Code common to Node and masq; also, temporarily, to dns_utility"
Expand Down
Loading