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

add transaction discarded event #3173

Open
Neotamandua opened this issue Dec 12, 2024 · 1 comment
Open

add transaction discarded event #3173

Neotamandua opened this issue Dec 12, 2024 · 1 comment
Labels
priority:minor Low priority issues

Comments

@Neotamandua
Copy link
Member

Neotamandua commented Dec 12, 2024

Summary

Needed by #2600 and also needed to properly handle any case during a transaction's lifecycle. Right now, you can only listen for a Removed(Hash) event and then assume that it will be discarded at some point because there will never be an Executed(&'t SpentTransaction) event. This is not something you should rely on.

Possible Solution (optional)

Add a discarded event type to the node data TransactionEvent and sent this event out for cases where a transaction is discarded. Document the discarded event to include what "discarded" means and what cases trigger a transaction to be discarded.

@Neotamandua Neotamandua added the priority:minor Low priority issues label Dec 15, 2024
@Neotamandua
Copy link
Member Author

We don't need this event if it is clear that a transaction will only be discarded if it is invalid for the protocol. This means that we only need to make sure that a transaction is never discarded if it is created by our wallets or by our SDKs, since these implementations comply with the protocol specifications.

Invalid means that the transaction payload is incorrect (e.g., missing or malformed data, or a minimum gas limit below the set minimum).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:minor Low priority issues
Projects
None yet
Development

No branches or pull requests

1 participant