This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
merge changes from 2.2.x into develop #10657
Merged
Merged
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
add some addtional includes to fix build with boost 1.77 - 2.2
huangminghuang/update-fc
[docs] resourse payer support in cleos is not available in rc1
Update README.md with the entry to download Ubuntu 20.04
[docs] Update docs, fix links, add legal feedback
…way to start RocksDB, provide a warning if no options file is supplied
… other pipelines.
[2.2.x] Update base image and build script pipelines.
…ace_2.2.x_EPE-996
detect if no return value instead of catching exception
…_trace_2.2.x_EPE-996 Support send transaction failure trace 2.2.x epe 996
Reset sync_known_lib_num when closing a connection - 2.2.x
…os-tester don't package rodeos and tester
spoonincode
previously requested changes
Aug 25, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this PR's base is master not develop
Is it possible to get a list of PRs this is up-porting? |
Not just a list, but a complete summary of all changes. |
linhuang-blockone
approved these changes
Aug 26, 2021
# Conflicts: # README.md # docs/01_nodeos/07_features/15_private_chain_access/index.md # docs/20_upgrade-guide/index.md # libraries/fc # plugins/chain_plugin/chain_plugin.cpp # plugins/state_history_plugin/state_history_plugin.cpp # programs/cleos/main.cpp # tests/Node.py
huangminghuang
force-pushed
the
huangminghuang/merge-2.2.x
branch
from
August 27, 2021 19:33
9fd47d7
to
7a56aea
Compare
huangminghuang
added a commit
that referenced
this pull request
Sep 1, 2021
12 tasks
huangminghuang
added a commit
that referenced
this pull request
Sep 1, 2021
Revert the incorrect doc changes from PR #10657
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Change Description
This PR merges changes related to state_history_plugin amqp-trx-plugin, rodeos, eosio-tester .
amqp_trx_plugin don't declare queue 📦 #10618:
amqp_trx_plugin
to not declare queue. Instead it will assume queue exists.--amqp-queue-name
to cleos to allow user specification of queue instead of hard-coded "trx"SHiP: Use shared_ptr instead of weak_ptr (explicit and implicit) 📦 #10611 :
rodeos: Add support for stream_wapper_v1 with std::string route 📦 #10606 :
stream_wrapper_v1
withstd::string
route which removes the restriction to useeosio::name
for routing keys.Add recover_key support to eosio-tester #10598 :
Add support for
recover_key
ineosio-tester
. Requires Include recover_key into tester_intrinsics eosio.cdt#1185Rodeos filter current_time() 📦 #10582 :
current_time()
host function for query wasms. This PR adds support forcurrent_time()
in filter wasms.Rename receiver to make code more readable - develop-boxed #10575 :
Update to the force-write-stride to 100,000 #10561 :
Update to the force-write-stride to 100,000
Use tested rocksdb_options.ini for sample file and add missing max_wr… #10557 :
Publish the tested options file for example. Add max_write_buffer_number if options file is not present.
SHiP post send_update to main thread to avoid overwhelming the main thread - develop-boxed #10550 :
medium
so that othermedium
or higher tasks have an opportunity to run.Stop rodeos if unable to listen on wql-listen #10549 :
wql-listen
address.Init force_write_stride to 1 #10548 :
Init
force_write_stride
because it is used in modulus to avoid divide by 0disable undo_stack by default, set tested typical rocksdb configurati… #10547 :
For the convenience of users and less prone to make mistakes, undo_stack is disabled by default,
and
--enable-undo-stack
is required to enable it; if options file is not provided, typical rocksdb configurationparameters will be used; If
--rdb-threads
and--rdb-max-files
are used, rodeos will not start and detailed warning is given.Make undo_stack configurable and add quit function for exception hand… #10529 :
Add
--disable-undo-stack
torodoes
startup option to disable undo_stack handling.Gracefully shut down
rodeos
when a fork happens if undo stack is not enabled.Added force-write-stride option in rodeos to control manual rocksdb flush frequency #10508 :
Details of force-write-stride option in rodeos: Maximum number of blocks to process before forcing rocksdb to flush. This option is primarily useful to control re-sync durations under disaster recovery scenarios (when rodeos has unexpectedly exited). This option ensures blocks stored in rocksdb are at most force-write-stride blocks behind the current head block being processed by rodeos. However, saving too frequently may affect performance. It is likely that rocksdb itself will save rodeos data more frequently than this setting by flushing memtables to disk, based on various rocksdb options. In contrast, when rodeos exits normally, it saves the last block processed by rodeos into rocksdb and will continue processing new blocks from that last processed block number when it next starts up.
Add options file configuration to RocksDB and adjust default configur… #10503 :
Add RocksDB options file support and adjust default configurations. Options file is specified by command line argument
--rdb-options-file
. Please see Documentation Additions below for details.Fix memory leak (24GB per second) when rodeos starts with --filter-wa… #10519 :
When
rodeos
'ship_client
fails to connect tonodeos
(like whennodeos
is not running),.ship_client
callscloner_session
'sclose
() withretry
set totrue
. This triggerscloner_plugin
to recreatecloner_session
every second until a connection is established.cloner_session
createsrodeos_filter
object ifrodeos
starts with--filter-wasm
option. Although destructor ofrodeos_filter
is called before recreation, its memory is not completely freed. The root cause is thefilter_state
inrodeos_filter
has a membereosio::vm::wasm_allocator wa
.wa
allocates VM memory when initiated. This memory must be released by explicitfree()
.The same problem in
thread_state
is fixed by this PR as well.Add recover_key & assert_recover_key to rodeos #10456 :
recover_key
&assert_recover_key
to rodeos for use in queriesPassthrough exit code of WASM start function as exit code of eosio-tester #10382 :
The
eosio-tester
program would only return an exit code of 1 (to indicate a problem) if it did not attempt to execute the test WASM (e.g. due to running help or a problem parsing arguments) or if it did attempt to execute the test WASM but failed to return successfully because of some exception (including exceptions caused by executingeosio_assert_message
). Otherwise, it would return an exit code of 0 (indicating success).This works fine for test cases that would check for failures using (directly or indirectly)
eosio_assert_message
, for example: calling a function which callseosio::check
and the condition fails; or usingREQUIRE
in Catch2. But in other situations this would mask failures. For example, when usingCHECK
in Catch2, the errors are printed out and then ultimately the failure of the test run is indicated through the exit code returned by themain
function. So in such failures it would appear looking at only the exit code of runningeosio-tester
(which is whatctest
does) that the tests all passed.This PR checks to see if a return value exists for the
start
function that is called when the test WASM is executed. If so, it assumes it is a signed 32-bit integer, extracts that value and returns that as the exit code. If it doesn't exist, it will continue with the current behavior of returning 0.Note to fully take advantage of this change, the test WASMs must be compiled with a
start
function that passes through the return value ofmain
. For that change, see: Passthrough return of main within start function of tester WASMs. eosio.cdt#1101.Rodeos timeout fix #10252 :
wql-idle-timeout
option as it does not work as intended (see below)boost’s new
expire_after
timer(s) is a terrible interface if you ask me. rodeos was killing an active connection after the default 30 second timer because the reset of the timer was only reseting one of the internal timers.Here is the code for boost
expires_after
and the comment from the code
So there are TWO timers and if you are not VERY careful it will only set ONE of them.
In our test case, only one was reset. The other timer would fire and kill the connection.
Unless I’m missing something, the boost example code also has the same issue.
https://www.boost.org/doc/libs/1_75_0/libs/beast/example/http/server/async/http_server_async.cpp
If there is an outstanding (pending) read or write then the associated timer is not touched.
I think the way forward here is to implement our own timers for idle timeout and read/write operations. This will be worked under a different PR.
Allow rodeos to recover from kill-9 #10164 :
Add new get/set param methods #10097 :
Add get_raw_abi to rodeos #10083 :
cleos needs this to send transaction to rodeos.
add compile time option to enforce a chain id 📦 #10049 :
SHIP clients often do not perform any validation of the blocks they are receiving. For high assurance deployments SHIP clients need complete confidence they are receiving fully validated blocks. compile time option to disable light validation options 📦 #9721 added a compile time option to disable options in nodeos that disable full validation. With proper deployment permissions, unix socket support for state history endpoint 📦 #9963 can make it easier to prove that the SHIP client is connecting to the SHIP endpoint it expects (a fully validating trustworthy nodeos). Still, the SHIP client doesn't actually have proof that a fully validating nodeos is following the expected "real" chain (consider a malicious actor starting a fully trustworthy nodeos with a malicious genesis.json and then feeding that rouge chain with actions on accounts the SHIP client is looking for).
This adds a compile time option
-DEOSIO_REQUIRE_CHAIN_ID=
where nodeos will only operate with a given chain id. An additional tool is added,eosio-chainid
, which will print the chain id of a given genesis json which may make it easier to determine the proper chain id before building. I'm not sure the additional tool is worth it over just starting nodeos with a genesis json and doing aget info
?I have no idea what to do about unit tests when this option is enabled.
amqp_trace_plugin SHiP protocol for transaction_trace #10057 :
Update to latest eos-vm on eosio-boxed #10024 :
unix socket support for rodeos ship connection & httpql server 📦 #10001 :
Add support for rodeos connecting to state history endpoint via unix socket (as exposed via unix socket support for state history endpoint 📦 #9963). Also add support for the HTTP QL server to listen on a unix socket. Like
http-server-address
andstate-history-endpoint
,wql-listen
has been modified such that if it's configured with the empty string the TCP endpoint is completely disabled.unix socket support for state history endpoint 📦 #9963 :
Oftentimes clients consuming from nodeos' state history endpoint fully trust the data received from this endpoint. It certainly doesn't have to be this way -- a client connected to the state history endpoint could perform light validation, for example. But oftentimes that is not the case; even rodeos fully trusts the state history endpoint it connects to.
This change adds a new option to state_history_plugin to expose its endpoint over a unix socket in addition or in lieu of the existing TCP endpoint. In some secure environments this allows more tight coupling of nodeos and rodeos (or other ship consumers) to enforce that the state history client always connects to the expected (trustworthy) nodeos.
The
state-history-endpoint
option has been changed to behave similar tohttp-server-address
: ifstate-history-endpoint
is configured as an empty string, the TCP endpoint is fully disabled.rodeos: allow queries to use sha functions #9708 :
rodeos: allow queries to use sha functions
rodeos filters: print_time_us intrinsic #9307 :
Add print_time_us intrinsic to rodeos filters.
std::promise use #9331 :
set_value
&get_future
ack amqp input trx after execution #9303 :
ack
AMQPamqp_trx_plugin
transaction wait until transaction has been executed.rodeos: checkpoint support #9234 :
rodeos can now generate checkpoints (live backup of database) using
/v1/rodeos/create_checkpoint
if--wql-checkpoint-dir
is enabled.Rodeos wasm limits #9241 :
Make rodeos query wasm memory limit configurable
rodeos: improve mmap failure prevention and reporting #9205 :
It appears that rodeos running on a certain k8s cluster is having trouble using mmap. This change:
Start consuming again when connection reestablished to AMQP 📦 #10615 :
Don't consume amqp messages until unpaused #10541 added support for starting up nodeos not consuming from AMQP queue. This change however does not start consuming again when the AMQP connection is loss and re-established. This PR adds back in start of consuming when the AMQP connection is re-established.
Don't consume amqp messages until unpaused #10541 :
Don't consume amqp messages until unpaused
Add support for specifying reply-to to amqp message 📦 #10412 :
Add block_uuid to transaction trace 📦 #10371 :
amqp_trx_plugin
amqp_trx_plugin ack immediately on trx failure #10334 :
amqp_trx_plugin correlation_id #10316 :
Set correlation_id of the amqp trace message to correspond to the correlation_id of the incoming amqp trx message. For amqp_trace_plugin amqp trace messages do not set correlation_id since it does not correspond to an incoming amqp message. This matches with amqp intended use case and matches clients expected behavior. Now clients can set correlation id to whatever they desire, which of course could include transaction id.
Rodeos per block ack #10162 :
Separate amqp_trx_plugin from amqp_trace_plugin #10141 :
amqp_trx_plugin
no longer depends onamqp_trace_plugin
for sending transaction traces to AMQP.amqp_trace_plugin
still exists and provides ability to send all transaction traces to AMQP.amqp_trx_plugin
is setup to only send transaction traces for transactions that it processes.amqp_trx_plugin
. If areply-to
is sent with the transaction then the trace will be send to the AMQP default exchange connection with thatrouting-key
. Thecorrelation-id
is set to the transaction id. If areply-to
is not specified then no trace is sent to AMQP.Reliable amqp_trx_plugin & amqp_trace_plugin #10127 :
Add reliability options to
amqp_trx_plugin
&amqp_trace_plugin
amqp_trace_plugin
now has configurable reliability viaamqp-trace-reliable-mode
amqp_trace_plugin
now has configurable queue viaamqp-trace-queue-name
option.amqp_trx_plugin
now has configurable queue viaamqp-trx-queue-name
option.reliable_amqp_publisher
.reliable_amqp_publisher
now callson_fatal_error
callback instead of dropping messages which in all cases callsapp().quit()
now.amqp_handler
to usesingle_channel_retrying_amqp_connection
to provide reliability and to move away from unsupportedAMQP::LibBoostAsioHandler
.Note: A follow-on PR is planned that will separate
amqp_trace_plugin
fromamqp_trx_plugin
.Speculative validation optimizations #9594 :
develop-boxed
version of Speculative validation optimizations #9593execute_incoming_transaction
callingrestart_speculative_block
for theamqp_trx_plugin
not indevelop
.unapplied_transaction_queue
used to have aprocess_mode
where it would not store aborted or forked-out transactions when in knew that the node would never produce a block. This was an optimization because there seemed to be no reason to cache aborted or forked-out transactions. Since the trx has been validated locally and will not be validated again, why keep it around? If you are producing you need to keep it so on a fork-switch the trxs are not lost. But there seemed to be no reason to keep them for speculative mode. However, theunapplied_transaction_queue
is also used when validating a block to look up already validated and constructedtransaction_metadata
. Keeping the already validated trxs in the queue allows for faster validation of received blocks for all the transactions already received by the node.last-block-time-offset-us
which doesn't really make any sense since the block is only speculative and will not be broadcast on the network. With this PR, all speculative blocks use theproduce-time-offset-us
including the 12th block.Return failure traces when running with amqp_trx_plugin #9872 :
amqp_trx_plugin
retrying_amqp_connection: commonize more amqp connection management stuff #9294 :
Getting a bit tired of copy pasting around some amqp connection management stuff in a few places. retrying_amqp_connection tries to solve the typical use case of needing a single channel connected to an AMQP server that is retried on failure. Compared to the code that was in reliable_amqp_publisher previously, a few functional differences are:
But there will likely be future improvements easier to add this way too, like TLS support with peer auth for example.
ack amqp input trx after execution #9303 :
ack
AMQPamqp_trx_plugin
transaction wait until transaction has been executed.Using default logger in amqp_trx_plugin #9256 :
amqp_trx
logger is no longer used as theamqp_trx_plugin
&amqp_trace_plugin
use the default logger.amqp_trx_plugin - transaction in, transaction_trace out #9181 :
New plugins:
amqp_trx_plugin
&amqp_trace_plugin
amqp_trx_plugin
amqp_trace_plugin
enabled then errors are reported via theamqp_trace_plugin
. Errors include: too many trx in progress and signature issues.Binary
fc::pack
format:amqp_trace_plugin
CorrelationID
set to transaction id.Binary
fc::pack
format:Change Type
Select ONE:
Testing Changes
Select ANY that apply:
Consensus Changes
API Changes
Documentation Additions