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

Fixing the issue with duplicate transaction synchronization processes #2324

Merged
merged 13 commits into from
Oct 11, 2024

Conversation

xgreenx
Copy link
Collaborator

@xgreenx xgreenx commented Oct 9, 2024

Ignore peer if we already are syncing transactions from it.
Added metrics for sync and async processor.
Added metrics for all GraphQL queries.

Checklist

  • New behavior is reflected in tests

Before requesting review

  • I have reviewed the code myself

@xgreenx xgreenx added the no changelog Skip the CI check of the changelog modification label Oct 9, 2024
@xgreenx xgreenx requested a review from a team October 9, 2024 15:57
@xgreenx xgreenx self-assigned this Oct 9, 2024
@xgreenx xgreenx added no changelog Skip the CI check of the changelog modification and removed no changelog Skip the CI check of the changelog modification labels Oct 9, 2024
@xgreenx xgreenx added no changelog Skip the CI check of the changelog modification and removed no changelog Skip the CI check of the changelog modification labels Oct 9, 2024

impl<Output> ExecutionTime<Output> {
/// Unwraps the future output and returns the execution report.
pub fn unwrap(self, metric: &FuturesMetrics) -> Output {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we name this something else? Like record_to_metrics or something like that.

The unwrap actually threw me off lol. I was reading it as unwrap_or for some Result and that made me confused about all the types.

AurelienFT
AurelienFT previously approved these changes Oct 9, 2024
@xgreenx xgreenx changed the base branch from release/v0.38.0 to master October 10, 2024 12:50
@xgreenx xgreenx dismissed AurelienFT’s stale review October 10, 2024 12:50

The base branch was changed.

@FuelLabs FuelLabs deleted a comment from Amirbakhtiaro Oct 10, 2024
@xgreenx xgreenx requested review from MitchTurner, AurelienFT and a team October 10, 2024 14:11
AurelienFT
AurelienFT previously approved these changes Oct 10, 2024
@xgreenx xgreenx removed the no changelog Skip the CI check of the changelog modification label Oct 11, 2024
AurelienFT
AurelienFT previously approved these changes Oct 11, 2024
@xgreenx xgreenx requested a review from a team October 11, 2024 14:05
Copy link
Member

@rymnc rymnc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this pr deals with metrics it would be nice to try using the image on devnet to ensure that the values are as intended


### Changed

#### Breaking
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all of these entries(added/fixed/changes/breaking) have different sizes

is that intentional? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is fiiiiiiine)

@xgreenx
Copy link
Collaborator Author

xgreenx commented Oct 11, 2024

since this pr deals with metrics it would be nice to try using the image on devnet to ensure that the values are as intended

Testnet already uses this image and values as expected=)

rymnc
rymnc previously approved these changes Oct 11, 2024
@rymnc rymnc dismissed their stale review October 11, 2024 14:17

changelog wasn't fixed :)

@rymnc rymnc self-requested a review October 11, 2024 14:18
Copy link
Member

@rymnc rymnc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving to not block on the changelog

impl<Output> ExecutionTime<Output> {
/// Extracts the future output and records the execution report into the metrics.
pub fn extract(self, metric: &FuturesMetrics) -> Output {
// TODO: Use `u128` when `AtomicU128` is stable.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we shoould probably have an issue for this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also it might be wise to use something like https://docs.rs/portable-atomic for now

@xgreenx xgreenx merged commit 77c76a1 into master Oct 11, 2024
37 checks passed
@xgreenx xgreenx deleted the hotfix/duplicate-tx-syncing branch October 11, 2024 14:50
@rafal-ch rafal-ch mentioned this pull request Oct 11, 2024
rafal-ch added a commit that referenced this pull request Oct 11, 2024
## Version v0.39.0

### Added
- [2324](#2324): Added metrics
for sync, async processor and for all GraphQL queries.
- [2320](#2320): Added new CLI
flag `graphql-max-resolver-recursive-depth` to limit recursion within
resolver. The default value it "1".


## Fixed
- [2320](#2320): Prevent
`/health` and `/v1/health` from being throttled by the concurrency
limiter.
- [2322](#2322): Set the
salt of genesis contracts to zero on execution.
- [2324](#2324): Ignore peer
if we already are syncing transactions from it.

#### Breaking

- [2320](#2330): Reject
queries that are recursive during the resolution of the query.

### Changed

#### Breaking
- [2311](#2311): Changed the
text of the error returned by the executor if gas overflows.

## What's Changed
* chore(executor): instrument errors to be more meaningful by @rymnc in
#2311
* fix(dummy_da_block_costs): remove dependency on polling_interval and
use channel instead by @rymnc in
#2314
* fix(txpool): Error in GossipsubMessageAcceptance variant docstrings by
@netrome in #2316
* refactor: Eager returns in txpool_v2::service::Task::run by @netrome
in #2325
* fix(api_service): exclude health checks from throttling with
ConcurrencyLimitLayer by @rymnc in
#2320
* Remove the `normalize_rewards_and_costs()` function by @rafal-ch in
#2293
* fix(genesis): set salt of contract on execution of genesis state
configuration by @rymnc in
#2322
* Fixing the issue with duplicate transaction synchronization processes
by @xgreenx in #2324
* Reject queries that are recursive during the resolution by @xgreenx in
#2330


**Full Changelog**:
v0.38.0...v0.39.0
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.

5 participants