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

feat: speedy scc (PRO-777 PRO-593 PRO-434) #3986

Merged
merged 16 commits into from
Sep 25, 2023
Merged

Conversation

AlastairHolmes
Copy link
Contributor

@AlastairHolmes AlastairHolmes commented Sep 11, 2023

@j4m1ef0rd I'm going to close your PR's and integrate those comments and changes into this PR. Considering the behaviour is noticeably different then before.

@AlastairHolmes AlastairHolmes changed the title feat: speedy scc feat: speedy scc (PRO-777) Sep 12, 2023
@linear
Copy link

linear bot commented Sep 12, 2023

PRO-777 Speed up finalisation in APIs

Currently, after an API call (both LP-API and Broker-API) has submitted an extrinsic, the API call does not return until several blocks have been generated AFTER the block containing the submitted extrinsic. We should change it so that once the extrinsic is accepted in a block, the call returns.

@AlastairHolmes AlastairHolmes changed the title feat: speedy scc (PRO-777) feat: speedy scc (PRO-777 PRO-593) Sep 15, 2023
@linear
Copy link

linear bot commented Sep 15, 2023

PRO-593 SCC fill nonce gap when using only submit_signed_extrinsic

Using only submit_signed_extrinsic (instead of finalize_signed_extrinsic) will not cause the nonce filling behaviour of the SCC to be used. This means the extrinsic submission can get stuck. finalize_signed_extrinsic is not always desirable as it many repeatedly submit any given extrinsic.

@AlastairHolmes AlastairHolmes force-pushed the feat/speedy-scc branch 2 times, most recently from 6929538 to 852a4e0 Compare September 19, 2023 09:17
@AlastairHolmes AlastairHolmes marked this pull request as ready for review September 19, 2023 09:18
@AlastairHolmes
Copy link
Contributor Author

I'd like to merge this as in a continue refactoring and adding tests (As this has been tested previously, and it an important improvement).

@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Merging #3986 (865b3fe) into main (178df88) will decrease coverage by 0%.
Report is 7 commits behind head on main.
The diff coverage is 29%.

@@          Coverage Diff           @@
##            main   #3986    +/-   ##
======================================
- Coverage     72%     72%    -0%     
======================================
  Files        368     369     +1     
  Lines      58484   59264   +780     
  Branches   58484   59264   +780     
======================================
+ Hits       42327   42648   +321     
- Misses     14060   14500   +440     
- Partials    2097    2116    +19     
Files Changed Coverage Δ
api/lib/src/lib.rs 31% <0%> (ø)
api/lib/src/lp.rs 0% <0%> (ø)
...ne/src/state_chain_observer/client/base_rpc_api.rs 1% <0%> (-<1%) ⬇️
...e/src/state_chain_observer/client/error_decoder.rs 88% <0%> (ø)
...tate_chain_observer/client/extrinsic_api/signed.rs 0% <0%> (ø)
.../client/extrinsic_api/signed/submission_watcher.rs 25% <16%> (-9%) ⬇️
engine/src/state_chain_observer/client/mod.rs 17% <18%> (-<1%) ⬇️
...t/extrinsic_api/signed/submission_watcher/tests.rs 96% <95%> (+2%) ⬆️
...gine/src/state_chain_observer/sc_observer/tests.rs 88% <100%> (+<1%) ⬆️

... and 29 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@AlastairHolmes AlastairHolmes enabled auto-merge (squash) September 25, 2023 14:07
@AlastairHolmes AlastairHolmes changed the title feat: speedy scc (PRO-777 PRO-593) feat: speedy scc (PRO-777 PRO-593 PRO-434) Sep 25, 2023
@linear
Copy link

linear bot commented Sep 25, 2023

PRO-434 Add tracing to State Chain Client

We currently don't use tracing to log submitted extrinsics in the SCC, making it hard to debug some issues.

We should log what was requested from the SCC and what was actually submitted.

@AlastairHolmes AlastairHolmes merged commit f872142 into main Sep 25, 2023
44 checks passed
@AlastairHolmes AlastairHolmes deleted the feat/speedy-scc branch September 25, 2023 14:52
dandanlen pushed a commit that referenced this pull request Sep 26, 2023
* disable gap filling

* resubmit_window

* next_account_nonce rpc

squash

* use next_account_nonce

* New InBlock interface changes only

* submission ids

* submit with watch stream

* check if submission in block

* Cache blocks inside SubmissionWatcher

* comments

* use until_in_block inside api code

* fix

* fix test

* fix for real

* logs
dandanlen pushed a commit that referenced this pull request Sep 26, 2023
* disable gap filling

* resubmit_window

* next_account_nonce rpc

squash

* use next_account_nonce

* New InBlock interface changes only

* submission ids

* submit with watch stream

* check if submission in block

* Cache blocks inside SubmissionWatcher

* comments

* use until_in_block inside api code

* fix

* fix test

* fix for real

* logs
dandanlen pushed a commit that referenced this pull request Sep 28, 2023
* disable gap filling

* resubmit_window

* next_account_nonce rpc

squash

* use next_account_nonce

* New InBlock interface changes only

* submission ids

* submit with watch stream

* check if submission in block

* Cache blocks inside SubmissionWatcher

* comments

* use until_in_block inside api code

* fix

* fix test

* fix for real

* logs
dandanlen pushed a commit that referenced this pull request Oct 9, 2023
* disable gap filling

* resubmit_window

* next_account_nonce rpc

squash

* use next_account_nonce

* New InBlock interface changes only

* submission ids

* submit with watch stream

* check if submission in block

* Cache blocks inside SubmissionWatcher

* comments

* use until_in_block inside api code

* fix

* fix test

* fix for real

* logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants