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

i1784 remove invalid tx from mempool and delivery tracker #1803

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

pragmaxim
Copy link
Collaborator

@pragmaxim pragmaxim commented Aug 11, 2022

Closes #1784

@pragmaxim pragmaxim requested a review from kushti August 11, 2022 12:34
pragmaxim and others added 10 commits August 11, 2022 16:21
…lyFailedModification and invalidated in DeliveryTracker
…e' of github.com:ergoplatform/ergo into i1784-remove-invalid-tx-from-mempool-and-delivery-tracker
…er' of github.com:ergoplatform/ergo into i1784-remove-invalid-tx-from-mempool-and-delivery-tracker
…e' of github.com:ergoplatform/ergo into i1784-remove-invalid-tx-from-mempool-and-delivery-tracker
…er' of github.com:ergoplatform/ergo into i1784-remove-invalid-tx-from-mempool-and-delivery-tracker
Base automatically changed from i1801-modifier-error-should-contain-modifier-id-and-type to v4.0.40 August 17, 2022 17:21
Base automatically changed from v4.0.40 to master August 18, 2022 08:15
…ove-invalid-tx-from-mempool-and-delivery-tracker
@kushti kushti changed the base branch from master to v4.0.41 August 21, 2022 21:10
history.reportModifierIsInvalid(modToApply, progressInfo).map { case (newHis, newProgressInfo) =>
context.system.eventStream.publish(SemanticallyFailedModification(modToApply, e))
UpdateInformation(newHis, updateInfo.state, Some(modToApply), Some(newProgressInfo), updateInfo.suffix)
case Failure(ex: MalformedModifierError) if ex.modifierTypeId == Transaction.ModifierTypeId =>
Copy link
Member

Choose a reason for hiding this comment

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

how can transaction appear here at all?

Failed modifier should be a block I guess

Copy link
Collaborator Author

@pragmaxim pragmaxim Aug 26, 2022

Choose a reason for hiding this comment

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

It works like this :

I assume that even though block is considered invalid, we wanted to flag invalidate this particular TX in mempool, right?

Copy link
Member

Choose a reason for hiding this comment

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

Not so simple, as history.reportModifierIsInvalid is expecting block ,not transaction

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We call reportModifierIsInvalid(modToApply) in both cases, just in case of MalformedModifierError with TxType modifier we EliminateTransactions so it gets removed from MemPool

Base automatically changed from v4.0.41 to master August 25, 2022 16:25
@pragmaxim pragmaxim changed the base branch from master to v4.0.43 September 7, 2022 21:33
Base automatically changed from v4.0.43 to master September 17, 2022 17:48
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