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

Don't Panic! #539

Closed
utkarshg6 opened this issue Oct 10, 2024 · 0 comments · Fixed by #540
Closed

Don't Panic! #539

utkarshg6 opened this issue Oct 10, 2024 · 0 comments · Fixed by #540
Assignees
Labels
bug Something isn't working

Comments

@utkarshg6
Copy link
Collaborator

utkarshg6 commented Oct 10, 2024

Don't Panic

The thing is if an originating node receives a gossip from the other Node saying, "Hey! Meet this guy.", and it turns out that we were already trying to build a neighborship with that guy, we're going to panic. 😱

We don't need to.

So, let's change the panic to an error log, here's your panic on node/src/neighborhood/overall_connection_status.rs:96 ==>

if self.connection_stage != ConnectionStage::TcpConnectionEstablished {
    panic!(
        "Can't update the stage from {:?} to {:?}",
        self.connection_stage,
        ConnectionStage::StageZero
    )
};

Now, we can in fact split this into following cases:

Case 1: if self.connection_stage == StageZero it means that we already know this guy 😉

Case 2: if self.connection_stage == TcpConnectionEstablished it means, we're on the ideal track 👍

Case 3: Other cases, we should panic!

@utkarshg6 utkarshg6 converted this from a draft issue Oct 10, 2024
@utkarshg6 utkarshg6 moved this from 🆕 New to 🏗 Development In Progress in MASQ Node v2 Oct 10, 2024
@utkarshg6 utkarshg6 self-assigned this Oct 10, 2024
utkarshg6 added a commit that referenced this issue Oct 10, 2024
utkarshg6 added a commit that referenced this issue Oct 10, 2024
@utkarshg6 utkarshg6 moved this from 🏗 Development In Progress to 📃 Quality Assurance Unfinished in MASQ Node v2 Oct 10, 2024
@kauri-hero kauri-hero added the bug Something isn't working label Oct 11, 2024
utkarshg6 added a commit that referenced this issue Oct 15, 2024
* GH-539: Don't Panic

* GH-539: remove commented out code
@github-project-automation github-project-automation bot moved this from 📃 Quality Assurance Unfinished to ✅ Done in MASQ Node v2 Oct 15, 2024
utkarshg6 added a commit that referenced this issue Jan 6, 2025
* GH-813: Correctly parse max block range error message (#531)

* GH-500: Adding Base chains (#510)

* GH-500: ready for an urged live test

* GH-500: probably finished the deployment of Base, let's get the QA going

* GH-500: removed an eprintln!

* GH-500: version changed to 0.8.1

---------

Co-authored-by: Bert <Bert@Bert.com>

* update readme and tag v0.8.1 (#532)

Signed-off-by: KauriHero <kaurihero@masq.ai>

* GH-524: Disable `entry_dns` (#526)

* GH-539: Don't Panic! (#540)

* GH-539: Don't Panic

* GH-539: remove commented out code

* New Version: v0.8.2 (#542)

* GH-744: Review-1 first lot of changes

* GH-744: Review-1 - fixed more tests

* GH-744: improved wildcard IP check

* GH-744: removed unused imports

* GH-744: fixed a bunch more comments from review 1

* GH-744: resolved more review comments

* GH-744: started converting gas_price units from gwei to wei

* GH-744: finish converting gas price from gwei to wei

* GH-744: Formating & removed warnings

* GH-744: Added TransactionFailed to TransactionReceiptResult

* GH-606: Initialize start_block to none to use latest block (#374)

* GH-606: Initialize start_block to none to use latest block

* GH-606: Apply PR feedback changes

* GH-606: Apply PR feedback changes

* GH-606: Apply PR feedback changes

* GH-606: Apply PR review 4 feedback changes

* GH-606: Squashing commits

- Save start_block_nbr if no msg but send as non-Option
- Always commit
- Reduce logging levels and simplify
- Follow the Option naming pattern

* GH-600: set_start_block only called in accountant/scanners/mod.rs

* GH-606: PR Feedback - parameterize a test

* GH-606: Address PR feedback

* GH-606: Implement parameterized test without crate macro

* GH-744: Migrated the guts of get_transaction_receipt_in_batch to process_transaction_receipts

* GH-744: Moved submit_payables_in_batch to blockchain_interface

* GH-744: removed test: blockchain_bridge_can_return_report_transaction_receipts_with_an_empty_vector

* GH-744: Fixed a few more URGENCY comments

* GH-744: cleanup & formatting

* GH-744: add some TODOs as discussed on Wed and Thu

* GH-744: handle_request_transaction_receipts chaged error to a DEBUG log

* GH-744: handle_retrieve_transactions inbeded extract_max_block_count

* GH-744: code refactor

* GH-744: removed transaction_id from Agent

* GH-744: Removed get_gas_price from submit_batch call

* GH-744: logger is now a reference in send_payables_within_batch

* GH-744: send_payables_within_batch web3_batch is now a reference

* GH-744: sign_and_append_multiple_payments accounts is now a reference

* GH-744 removed Blockchan_interface_mock

* GH-744: Refactored all 4 test for send_payables_within_batch

* GH-744: cleanup & formatting

* GH-744: small fixs

* GH-744: handle_normal_client_data detects wildcard IP & localhost with error

* GH-744: Finished all urgent comments

* GH-744: changed actions macos-12 to 13

* GH-744: increased sleep time for test provided_and_consumed_services_are_recorded_in_databases

* GH-744: Fixed multinode tests

* GH-744: Added start block +1 to handle_transaction_logs

* GH-744: Fixed some tests

* GH-744: Fixes from review 2

* GH-744: Fixed test debtors_are_credited_once_but_not_twice

* GH-744: removed BlockNumber::Number

* GH-744: Resolved TODOs

* GH-744: First commit for review-3, fixed tests

* GH-744: Refactored TxReceipt

* GH-744: Refactored TxResponse

* GH-744 moved & renamed blockchain_interface_utils.rs

* GH-744: fixed test: dns_resolution_failure_for_wildcard_ip_with_real_nodes

* GH-744: add review 4 changes

* GH-744: add review 5 changes

* GH-744: remove the map_err()

* GH-744: migrate the logging code to a different function

* GH-744: add review 6 changes

---------

Signed-off-by: KauriHero <kaurihero@masq.ai>
Co-authored-by: MASQrauder <60554948+masqrauder@users.noreply.github.com>
Co-authored-by: Bert <65427484+bertllll@users.noreply.github.com>
Co-authored-by: Bert <Bert@Bert.com>
Co-authored-by: KauriHero <kaurihero@masq.ai>
Co-authored-by: Syther007 <null.0.node@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants