-
Notifications
You must be signed in to change notification settings - Fork 785
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
Adding optional confirm_req answers #803
Conversation
If tthis is request for forked block/account representative knows about
|
Yeah, testing new commit with it |
I think you misunderstood what I meant. |
Hm, ok |
This should be valid now |
LGTM |
Actually, I think you'll have to revert the last two commits :(. Even if a block's root exists, the block itself (or another successor) may not exist, which causes a crash. |
Hm, there is check for nullptr, it what conditions it can cause crash? |
I could use such a function in my work. |
For debug mode: This is fine to not have successor
for confirm_req options
LGTM again. |
nanocurrency#803 cover this case
* Move boost_log_setup before boost_regex when linking (nanocurrency#933) Without this when compiling rai_node on fedora 28 I get many undefined references starting with: ``` [ 68%] Linking CXX executable rai_node /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libboost_log_setup.a(init_from_settings.o): Funktiossa ”boost::log::v2s_mt_posix::(anonymous namespace)::default_syslog_sink_factory<char>::create_sink(boost::log::v2s_mt_posix::basic_settings_section<char> const&)”: (.text+0x1b72): määrittelemätön viite kohteeseen ”boost::log::v2s_mt_posix::sinks::syslog_backend::set_severity_mapper(boost::log::v2s_mt_posix::aux::light_function<boost::log::v2s_mt_posix::sinks::syslog::level (boost::log::v2s_mt_posix::record_view const&)> const&)” ``` * Confirm req to all peers if reps list is empty (nanocurrency#937) or online stake is less than required quorum * Update README.md (nanocurrency#941) Road-map and Twitter Link updates * std::error_code and std::expected implementation * Remove store_entry class since it's effectively just a pair of rai::mdb_val * Speed up travis builds: enable ccache, cache cargo and reduce test timeouts (nanocurrency#957) * Do not hang trying to upload to docker in unofficial repos docker push hung asking for a password if the password environment variable was not set. With this change it fails immediately. * Enable ccache on linux and osx * Cache homebrew downloads This does not avoid the compilation of the homebrew packages but stores the downloaded sources, speeding up the installation process. * Enable cargo caching * Cache load-tester cargo binaries * Reduce default timeout per test suite to 120 seconds One of the tests hangs in the CI system, reducing the timeout to have quicker feedback. It can be re-adjusted in the future if 120 is not enough for a successful run. * Fix logging config serialization * Raw history changes (nanocurrency#943) * Return "balance" in raw history for state blocks * Return "previous" in raw history * Remove previous for open block * Added "bootstrap_connections_max" to beta.json (nanocurrency#960) * CLI refactoring * Fix the work value of the beta network genesis block (nanocurrency#963) * Fix deterministic wallet keys in boost 1.67 or above (nanocurrency#967) * Fix deterministic wallet keys in boost 1.67 or above * Match existing casting idiom * Fix several core_test issues (nanocurrency#959) * Fix test rpc.version * Sometimes election can start before block_processor commit * Attempt to process confirmed block if it's not in ledger yet * Fix QT block creation tests * Enable tests upgrade_v1_v2 & send_single_many_peers * Increase iterations for fork_pre_confirm * Fix -Wconversion-null warnings * Disable confirm_if_quorum for already confirmed election * Fix error with 0 key in wallet store * Redo "Disable confirm_if_quorum" * Increase possible synchronizing time for QT wallet * Log ID for each RPC call (nanocurrency#951) Now it's logged only on completion * Fix more core tests * Fix rpc.wallet_ledger * Fix more time comparison in rpc tests * Rewriting RPC with error codes * Clang formatting * Clang formatting * Merge RPC chain & RPC successors * Merge mrai_to_raw+krai_to_raw+rai_to_raw & mrai_from_raw+krai_from_raw+rai_from_raw * Small changes * Reduce code with wallet_impl * Reduce code with account_impl * Formatting * Several errors * Reduce code size with count_impl * count_optional_impl * Formatting * Disable node.bootstrap_connection_scaling * Fix message.confirm_ack_serialization * Initialize booleans when not explicitly set (nanocurrency#971) * Add epoch blocks to disable old type blocks (nanocurrency#955) * Add version field to account_info and min_version to pending_info * Add epoch block support to ledger * Add epoch block settings to config, and remove state canaries * Add test for epoch blocks * Add receive upgrade test for epoch blocks * Ignore old nodes on the beta network * Add min_version to RPC pending and wallet_pending * Add account_version field to account_info RPC * Fix formatting * Remove epoch block config (de)serializing * Mark epoch blocks in history (nanocurrency#968) * Mark epoch blocks in history * Extra info for raw * Remove epoch block from non-raw RPC history * Move raw check * Fix upgrade_v11_to_v12 when already upgraded * Fix rpc.version test * Fix system.generate_send_existing * Require core tests to pass in Travis (nanocurrency#969) * Formatting * hash_impl * Edit hash_impl to accept "block" * rpc_control_impl * amount_impl * Doule write issue * Typo * Typo * Fix rai::block_store::upgrade_v11_to_v12 * threshold_optional_impl * Simplification * Simplification * Fix * work_optional_impl * Remove double check * Simplification * Return "account" in history * modify type error: age => count (nanocurrency#932) * Hopefully fix rpc.work_get * Move rai/node library definition to separate CMakeLists.txt * Move rai/lib library definition to separate CMakeLists.txt * Add latest version FindBoost.cmake * Move rai_node to a separate CMakeLists.txt * Move secure into its own folder * Move ed25519 to its own CMakeLists.txt * Avoid compiling rai_lib twice This was apparently done to simplify the linking of the tests but it is not needed if the library is compiled as STATIC as it seems to be currently. This is because CMAKE_SHARED_LIBS is set to off by default. * Fix compilation of core_test * Fix miniupnpc include directories from the main CMakeLists.txt * Fix compilation of GUI * Move badly placed icon from secure to rai_wallet * Fix includes * Fix dependencies * Add missing dependencies to lmdb * Fix compilation of GUI and tests * Another pass removing left-overs in CMakeLists.txt * Set exe linker flags globally * Fix linux compilation: link against threading and dl * Move all GUI specific code to the same if * Only link lmbd dependencies to lmdb * Move ACTIVE_NETWORK definition after option declaration It was being used before its declaration * Restore compiler extensions (fixes compilation on windows) * Use custom lmdb * Fix dependency of wallet on WinExtras and include * Fix compilation and packaging in appveyor * Build install target to build everything necessary for packaging * Download vc_redist before building because the install target requires it * Guard compilation of qt_test under RAIBLOCKS_TEST * Start commenting out extra link libraries, include directories, etc. * Group GUI declarations * Add missing dependency secure -> boost * Start modernizing cmake code * Fix compilation of node * Group all gtest code under if (RAIBLOCKS_TEST) * Remove left-overs in CMakeLists.txt * Comment out platform libs, to be added later if needed minor cleanup of platform_wallet_libs * Indent * Define RAIBLOCKS_VERSION MAJOR and MINOR only where needed * Force cmake to store libraries and executables in the root of the build dir This fixes the tests because they could not find the rai_node executable * Unify file extension list between check-commit-format and clang-format-all * Apply clang-format-all.sh * Change lmdb reference to official repo And point to the correct branch * Fix wallet_work_get * Optional data for amount_impl * Less lines * Simplify wallet_balances * Fix * Hopefully fix wallet.seed_work_generation * Fix possible wallet locked errors in RPC (nanocurrency#977) send, receive, change * Fix * Fix peer_container.split * Remove unnecessary observer subscriptions to reduce a bit of locking overhead * Explicitly set message type values * Separate new versions into a new DB table * Fix nano_wallet * Fix building rai_node * Allow the "bulk_pull" bootstrapping message to accept a block hash as… (nanocurrency#973) Allow the "bulk_pull" bootstrapping message to accept a block hash as its first argument in replace of an account hash * Update README.md updated medium link * Make "bulk_pull" with a start block inclusive of that start block (nanocurrency#985) * Fixed a test that was relying on incorrect semantics for "bulk_pull" * Make "bulk_pull" with a start block inclusive of that start block * Appveyor Fixes (nanocurrency#1009) * Appveyor Fixes Fixed Pull Request building Configured Build matrix for Live and Beta Updated for MSVC 2017 build environment * Docker deployment Stop trying to deploy docker unless in nanocurrency/raiblocks repo * typo :/ * Update deploy-docker.sh * Update deploy-docker.sh remove travis changes, will redo in another branch * Minor cleanups in cmake code (nanocurrency#1007) * cmake,style: remove conditions in else() and endif() clauses It is redundant and makes the code harder to read. * Group argon2-related declarations * Group blake2-related declarations * Move core_test and slow_test to their own CMakeLists.txt * Set correct interface include directories to gtest target With this change targets that link to gtest get the correct include directories automatically. * Move all nano_wallet declarations together * Do not define an intermediate variable sources * Remove duplicated dependency on lmdb * Converting epoch tag to an enum class instead of a uint8_t. Fixed an issue where a version was incorrectly being converted to a uint256_t giving incorrect behavior in sucessor clearing. * Using full typename. * Futurproofing case statements if a new enumeration value is added. * Formatting. * Fix travis builds for OSX (nanocurrency#1016) * Don't insert elections if we're stopped. * Moving vote announce loop in to its own thread. * Formatting. * Fix * Move processing of votes in to its own thread. * Using a single transaction across all votes being processed. * Use library for deterministic_key * rai::pub_key function from library * Prevent possible empty responses * Eliminate dispatching broadcasting winner from queueing on an IO thread and calculating rep votes in a single transaction instead of multiple. * Referencing correct parameter. * Allowing more test iterations. * Fix epoch block fork process_result * Disable double vote request for forks nanocurrency#803 cover this case * Fix rpc.confirmation_history test (nanocurrency#1027) * Testing for absense of source block in elections. * Check if a block can still fit before sending out a vote and if not, terminate the election. * Fixing merge conflicts and bounding test iterations. * Formatting. * Remove transaction write lock from bootstrap * Consolidate received_frontier transactions * Empty response message when there's no error code value * Remove active blocks from *_pending RPC calls * Add option to include active in RPC *_pending * Attach epoch to mdb_val since the block store needs to encode this information anyway. This cleans up a lot of call-site logic to figure out epoch of account_info and pending_info. * Automated Build for Beta (nanocurrency#1035) * Log votes for very long unconfirmed elections (nanocurrency#1031) * Log votes for very long unconfirmed elections * Fix * Fix * Fix * Minimum announcement minimum cut in half should reduce network usage (nanocurrency#1036) * Avoid block_processor queue duplicates (nanocurrency#1000) * Avoid block_processor duplicates * Using unordered_set * blocks.push_back * forced.push_back * Send confirmation request to all peers if representatives list is empty… (nanocurrency#999) * Send confirmation request to all peers if representatives list is empty or observer weight is less than online_weight_minimum * Fix * Fix * More intuitive comparision * Calculate if representative isn't recorded for several IP addresses * Use rep_acct * Save network with many elections in progress * Increase rep_crawl count if observed peers weight < online_weight_minimum (nanocurrency#1001) * Increase rep_crawl speed if observed peers weight < online_weight_minimum * Use uint16_t * peers.online_weight_minimum * Improve network::broadcast_confirm_req * Calculate if representative isn't recorded for several IP addresses * docker latest tag not applied if regex RC matches (nanocurrency#1042) f the tag matches RC dont tag as latest in docker (closes nanocurrency#1004) * Bulk pull account (nanocurrency#1039) Added "bulk_pull_account" bootstrapping request * Allow OpenSSL 1.1 (nanocurrency#950) Tested with OpenSSL 1.1.0f (Debian Stretch) and OpenSSL 1.0.2g (Ubuntu 16.04 LTS) * Deadlines in tests (nanocurrency#1026) * Deadline support for google tests * Migrated node.cpp to deadlines * Migrated gap_cache.cpp and ledger.cpp to deadlines * Migrated network.cpp to deadlines * Migrated rpc.cpp to deadlines * Migrated wallet(s).cpp to deadlines * Migrated qt.cpp to deadlines * Fix missing return in deadline-test PR (nanocurrency#1049) * Do not mix confirmed & aborted elections (nanocurrency#1048) * Do not mix confirmed & aborted elections * Add delay before aborting election In case of uncommited write transaction in block_processor * Fix node.fork_open_flip test * Fixing possible tests issues node.fork_multi_flip, node.fork_open, node.fork_flip, node.fork_keep * Prevent spam from long unconfirmed elections (nanocurrency#1011) * If an endpoint is not connected, don't throw an exception when logging its IP (nanocurrency#1051) * In debug mode, rethrow caught exceptions (nanocurrency#1050) * Replacing RPC wallet_balance_total with wallet_info (nanocurrency#776) * Replacing RPC wallet_balance_total with wallet_info Additional info: - accounts count - deterministic index - deterministic count - adhoc_count * Add hash only votes, which can be batched (nanocurrency#1025) * Bump protocol version to Protocol V13 * Fixed failing is_v6() assertions. * Fix votes.add_cooldown * Using an explicit operator for conversions from mdb_val instead of a function so names won't drift from typenames. * Make mdb_val understand account_info instead of the other way around. * Make mdb_val understand pending_info instead of the other way around. * Make mdb_val understand pending_key instead of the other way around. * Make mdb_val understand block_info instead of the other way around. * Make block_store understand genesis instead of the other way around. * Moving lmdb stuff to its own file. * Using explicit type conversion on mdb_val instead of constructor on account_info. * Using explicit type conversion on mdb_val instead of constructor on pending_info. * Using explicit type conversion on mdb_val instead of constructor on pending_key. * Using explicit type conversion on mdb_val instead of constructor on block_info. * Using explicit type conversion on mdb_val instead of constructor on vote. * Removing unused function and fix formatting. * Encapsulating some db-specific implementation-detail functions from the block_store interface. * Creating store_iterator implementation class so it can be parameterized on different DB backends. * Adding conversion for uint128_union. * Adding rai::block operators for mdb_val. * Formatting. * Type can be reduced to an std::pair now that the secondary_storage bool was removed. * Removing unnecessary indirection. * Allow a sentinel end iterator that doesn't require an implementation iterator. * formatting * Using rai::pub_key instead of ed25519_publickey * Don't use library in secure * Qt wallet peer count, sorting and width * Fix rai::store_merge_iterator::cursor_current * Use DB comparison operator instead of directly using memcmp. * Rewriting store_merge_iterator in terms of store_iterator for extra reuse. * Adding is_end_sentinal function to determine if an iterator represents the end iterator. * Ensure active_transaction thread is stopped on shutdown. * Convert store_iterator_impl to a generic base class and subclass for both mdb_iterator and mdb_merge_iterator. * Adding strong typing for store iterators. * Support non-prefixed block deserialization. * Correcting types for top-level wallet name iteration. * Remove exposing mdb_val from the interface of store_iterator_impl. * Stuff * Remove file * Merged in PR#1061, PR#1062, and PR#1072 and associated fixes from master from beta network testing * Moved time for hash by votes timestamp to 2 weeks from now * Bump version number to patch release * Fix possible write transaction lock (nanocurrency#1079) * Qt editing fix (nanocurrency#1080) * Initialize rep_crawler_exists (nanocurrency#1084) * Pass around a transaction inside the wallet (nanocurrency#1083) * Move enter_initial_password out of node.background (nanocurrency#1081) * Increment V15 version to V15.2 * Do not vote if voting is disabled in config (nanocurrency#1078) * Ensure full blocks are not generated by "compute_rep_votes" (nanocurrency#1090) * Updated rep_weights.bin for bootstrap weights (nanocurrency#1086) * Remove ded files * Things missed in merge * Update blockstore * Update common * Update common * Update utility * Update secure/ledger * Update stats * Update versioning * Update versioning.hpp * Update * Update node * Update * Update node * Update errors * Fix merge err * Update node wallet * Update * Update bananode entry * Update * Fix imports * Change name * Un-do * Fix readme
If tthis is request for forked block/account representative knows about