-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add started_elections topic to websockets #3851
Merged
clemahieu
merged 37 commits into
nanocurrency:develop
from
gr0vity-dev:develop_started_elections
Jul 11, 2022
Merged
Add started_elections topic to websockets #3851
clemahieu
merged 37 commits into
nanocurrency:develop
from
gr0vity-dev:develop_started_elections
Jul 11, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clemahieu
reviewed
Jul 9, 2022
rpm build image, and signing container rpm build updates
* confirmation_height_clear cli account param * Add back missing password option * Improve the error/help messages to the required account option - Improve the error message to say the account can be 'all' - Improve the confirmation_height_clear help message to inform the value 'all' can be passed to clear all accounts Co-authored-by: Thiago Silva <thiago@nano.org>
* Remove unused Travis CI script * Removes deploy-docker.sh as it is unused * Replacing mention to Travis to CI instead
… reached. This prevents the unchecked table size from increasing beyond reasonable bounds when it's in sync. # Conflicts: # nano/node/blockprocessor.cpp
# Conflicts: # nano/secure/store/unchecked_store_partial.hpp
…ck under heavy vote load.
The network bytes (magic bytes), the first 2 byts of the header, were not correctly checked. They were checked in the network class inbound function but that function is called for realtime messages after the handshake is completed. It is not called for bootstrap messages not handshake messages. Also the version checking was not done properly so I am doing it now properly immediately after the magic bytes tests. The checks are done at the following 3 places: * nano::bootstrap_server::receive_header_action * nano::transport::tcp_channels::start_tcp_receive_node_id * nano::message_parser::deserialize_buffer The last one is likely only used by UDP and test scripts that use UDP. So we should be able to remove the last one when we remove the UDP code. # Conflicts: # nano/core_test/network.cpp
…y#142) - Limit the vote_processor::flush_active() - The is_active var became useless, also moved the lock position - Move the condition.notify_all() up - Improve function flush documentation - Test normal behavior is getting more votes than processing - Also updated the invalid_signature test to ASSERT_TIMELY since it should wait for a flush to happen. - Also removed the lock for reading total_processed atomic variable - Explicitly check for timeout in unit test vote_processor.overflow - Vote processor: clear votes and notify condition variable on thread exit In theory the vote processor can be stopped and have votes left in its queue which would just be strange and a potential source of problems. Also, a final kick of the condition variable is needed on thread exit and after vote clearing. - Check for confirm req loop blocking too long on vote process flush This has been a problem in the past and it is always tricky to do flush operations, so it is prudent to add a check for timeout here and display a warning in release and throw an assert in debug builds. - Use std::memory_order_relaxed in vote processor::flush for total_processed There is no need to take a memory barrier when reading the atomic total_processed, so use relaxed memory order. Co-Authored-By: Dimitrios Siganos <dimitris@siganos.org> Co-authored-by: Dimitrios Siganos <dimitris@siganos.org> # Conflicts: # nano/core_test/vote_processor.cpp
* Remove unused `previous_balance` field and unnecessary ledger lookup * Add a new hinted election behavior * Adjust time to live for hinted elections * Reenable inactive vote cache with more aggressive threshold (big thanks to @trashman for tuning those parameters) * Fix `inactive_votes_cache_election_start` unit test * Add test for vote hinting election limit * Add config option for vote hinting limit * Use a counter for number of active hinted elections * Add more election stats * Revert "Add config option for vote hinting limit" This reverts commit d5a9fd5. * Use ratio as hinted election limit instead of absolute value * Naming change to `active_elections_hinted_limit_percentage` * Vote hinting cleanup # Conflicts: # nano/core_test/active_transactions.cpp # nano/lib/stats.cpp # nano/lib/stats.hpp # nano/node/election.cpp # nano/node/election_scheduler.cpp
This disables migrating of unchecked table from lmdb to rocksdb, however, this upgrade really isn't needed. # Conflicts: # nano/secure/store.hpp # nano/secure/store/unchecked_store_partial.hpp
…d use for_each with a functor to execute on each result. This prevents iteration details from being exposed externally. # Conflicts: # nano/core_test/block_store.cpp # nano/nano_node/entry.cpp # nano/node/json_handler.cpp # nano/node/lmdb/lmdb.cpp # nano/node/node.cpp # nano/secure/store.hpp # nano/secure/store/unchecked_store_partial.hpp
…::for_each and removing backend-specific variants. # Conflicts: # nano/node/lmdb/lmdb.cpp # nano/node/lmdb/lmdb.hpp # nano/node/rocksdb/rocksdb.cpp # nano/node/rocksdb/rocksdb.hpp # nano/secure/store/unchecked_store_partial.hpp
…hold is reached. Blocks are pruned in fifo order. # Conflicts: # nano/node/node.cpp # nano/secure/store/unchecked_store_partial.hpp
Fixing rpc.unchecked_get which didn't get translated properly with the for_each conversion. # Conflicts: # nano/node/json_handler.cpp # nano/secure/store/unchecked_store_partial.hpp
fixes nanocurrency#154 # Conflicts: # nano/node/active_transactions.cpp
…#3841) * Block constructors to builders conversion in unit tests * Formatting fix
…ed by unit tests to easily create an empty ledger. This removes a lot of boilerplate code in associated tests. (nanocurrency#3848)
…y-dev/nano-node into develop_started_elections
clemahieu
reviewed
Jul 9, 2022
clemahieu
approved these changes
Jul 11, 2022
dsiganos
added
the
documentation
This item indicates the need for or supplies updated or expanded documentation
label
Jul 11, 2022
dsiganos
approved these changes
Jul 11, 2022
pwojcikdev
approved these changes
Jul 11, 2022
thsfs
added
websockets
and removed
rpc
Changes related to Remote Procedure Calls
labels
Jan 19, 2023
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
documentation
This item indicates the need for or supplies updated or expanded documentation
enhancement
websockets
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new topic "started_elections" to websockets.
add observers.active_started for started elections
Update tests