* removed obsolete check that is superseded by the unblock checks below
* if messages race transaction submit has failed, do not restart loop. Instead, wait for new best nonces from target node and retry selection. That's because submit has probably failed because other relayer has submitted same nonces
* reset nonces_to_submit and nonces_submitted if at least one of selected/submitted nonces is already at target
* removed extra check
* submit lane unblock transactions from relay
* moved body of select_nonces_to_deliver to the separate select_race_action
* extracted latest_confirmed_nonce_at_source method
* return Option<RaceAction> from select_race_action
* make required_source_header_at_target async
* remove extra argument from required_source_header_at_target
* small fixes in tests
* Revert "return Option<RaceAction> from select_race_action"
This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.
* implement required_source_header_at_target using what-if approach
* fix compilation
* fmt
* clippy
* moved some code to the can_submit_transaction_with
* Simplify submit_and_watch_signed_extrinsic
The way submit_and_watch_signed_extrinsic is used now, we can always
derive the SignParam from other params. If in the future we need more
customization possibilities, we can define a new method.
* Simplify submit_signed_extrinsic
* Send maybe_batch_tx as a parameter
Send `maybe_batch_tx` as a parameter to `submit_proof()`. This way we
can deduplicate the logic that submits the extrinsic for
`messages_source and `messages_target` and we can simplify the logic in
the race loop a bit.
* Define BatchProofTransaction
Deduplicate BatchConfirmationTransaction and BatchDeliveryTransaction by
replacing both of them with BatchProofTransaction
* Define ChainWithUtilityPallet and BatchCallBuilderConstructor
- Define `ChainWithUtilityPallet` in order to be able to associate the
batching functionality with chains
- Defining `BatchCallBuilderConstructor` in order to have a more reliable
way of checking whether an end of a messages pipeline supports batching
or no. `BatchCallBuilderConstructor::new_builder()` returns an
`Option<BatchCallBuilder>`.This is a bit safer because each time a caller
tries to start creating a batch call, it will call `new_builder()` and
will be required to handle the returned `Option`. Before we only had a
bool `BATCH_CALL_SUPPORTED` the caller could have forgetten to check.
* do not require new headers if lane is empty
* handle edge case (need proof-of-delivery-confirmations to be able to submit delivery tx) in required_source_header_at_target
* clippy
* batch transactions in message relay: API prototype
* get rid of Box<dyn BatchTransaction> and actually submit it
* test batch transactions
* message_lane_loop_works_with_batch_transactions
* removed logger
* BatchConfirmationTransaction + BatchDeliveryTransaction
* more prototyping
* fmt
* continue with batch calls
* impl BatchCallBuilder for ()
* BatchDeliveryTransaction impl
* BundledBatchCallBuilder
* proper impl of BundledBatchCallBuilder + use it in RialtoParachain -> Millau
* impl prove_header in OnDemandHeadersRelay
* impl OnDemandParachainsRelay::prove_header (needs extensive tests)
* added a couple of TODOs
* return Result<Option<BatchTx>> when asking for more headers
* prove headers when reauire_* is called && return proper headers from required_header_id
* split parachains::prove_header and test select_headers_to_prove
* more traces and leave TODOs
* use finality stream in SubstrateFinalitySource::prove_block_finality
* prove parachain head at block, selected by headers relay
* const ANCIENT_BLOCK_THRESHOLD
* TODO -> proof
* clippy and spelling
* BatchCallBuilder::build_batch_call() returns Result
* read first proof from two streams
* FailedToFindFinalityProof -> FinalityProofNotFound
* changed select_headers_to_prove to version from PR review
* fix(spellcheck): test of fixing
* fix(hunspell): improved many typos etc.
* fix(hunspell): all errors solved
* fix(hunspell): extended scope of files - the build should fail
* Return error code.
* Fix spelling, sort dictionary.
* fix(hunspell): added fix to gitlabs check
* fix(typo): one typo and test of verification on github
* fix(typo): one typo
Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
* use plain source_queue view when selecting nonces for delivery
* Revert "use plain source_queue view when selecting nonces for delivery"
This reverts commit f1fdc3fa9a0934271b125328e69e4f16014780d1.
* Revert "Revert "use plain source_queue view when selecting nonces for delivery""
This reverts commit ccefa5ece24c675649251ebc5c686ef972eed2f4.
* clippy
* fmt
* require lane source -> target headers when weknow all headers that have produced messages, but are unable to deliver all messages because of unrewarded relayers vec capacity
* Update relays/messages/src/message_race_delivery.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>