Skip to content

Internal: store the full TX context in confirmations #265

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

Merged
merged 2 commits into from
Oct 13, 2022

Conversation

odesenfans
Copy link
Contributor

@odesenfans odesenfans commented May 14, 2022

Problem: a part of the information regarding on-chain confirmations
is dropped, thereby losing useful metadata for use in later processes.
Example: the time field of confirmations could be used to determine
when confirmations were received.

Solution: store the entire transaction context in the confirmations
array of messages. This means that two additional fields are now
preserved: the transaction block timestamp and the publisher.

As we need to re-fetch this data from chain data, a new migration
script resets the chain height to re-process all transactions.
We reset the confirmation status of all messages to unconfirmed
and deleted their confirmations array to let the node automatically
migrate to the new format.

@odesenfans
Copy link
Contributor Author

This PR replaces parts of #254. The plan:

  1. Re-fetch the tx context for all messages so that we have the block timestamp in the confirmations array
  2. Introduce the confirmation/reception time fields.

@odesenfans odesenfans force-pushed the od-pass-tx-context-to-incoming branch 3 times, most recently from c9951cf to 205b3c1 Compare May 14, 2022 20:48
@odesenfans odesenfans requested a review from hoh May 17, 2022 08:39
@odesenfans odesenfans modified the milestone: May release May 17, 2022
@odesenfans odesenfans force-pushed the od-pass-tx-context-to-incoming branch from 205b3c1 to f1a4ce4 Compare June 14, 2022 13:33
@odesenfans odesenfans force-pushed the od-pass-tx-context-to-incoming branch from f1a4ce4 to d1cf005 Compare September 26, 2022 11:05
@odesenfans odesenfans changed the title [TXs] Store the full TX context in confirmations Internal: store the full TX context in confirmations Sep 26, 2022
@hoh hoh assigned odesenfans and unassigned hoh Oct 13, 2022
We now store the entire context of the transaction in the confirmations
array of messages. This means that two additional fields are now
preserved: the transaction block timestamp and the publisher.

As we need to re-fetch this data from chain data, a new migration
script resets the chain height to re-process all transactions.
We reset the confirmation status of all messages to unconfirmed
and deleted their confirmations array to let the node automatically
migrate to the new format.

Renamed some fields of the `TxContext` class in order to use
the same format in all DB collections and to avoid a breaking
change in the messages confirmation format.
@odesenfans odesenfans force-pushed the od-pass-tx-context-to-incoming branch from 66aa150 to f6c0f92 Compare October 13, 2022 08:36
@odesenfans odesenfans merged commit f4446ff into aleph-im:dev Oct 13, 2022
@odesenfans odesenfans deleted the od-pass-tx-context-to-incoming branch October 13, 2022 12:02
odesenfans added a commit that referenced this pull request Oct 17, 2022
We now store the entire context of the transaction in the confirmations
array of messages. This means that two additional fields are now
preserved: the transaction block timestamp and the publisher.

As we need to re-fetch this data from chain data, a new migration
script resets the chain height to re-process all transactions.
We reset the confirmation status of all messages to unconfirmed
and deleted their confirmations array to let the node automatically
migrate to the new format.

Renamed some fields of the `TxContext` class in order to use
the same format in all DB collections and to avoid a breaking
change in the messages confirmation format.
odesenfans added a commit that referenced this pull request Oct 27, 2022
We now store the entire context of the transaction in the confirmations
array of messages. This means that two additional fields are now
preserved: the transaction block timestamp and the publisher.

As we need to re-fetch this data from chain data, a new migration
script resets the chain height to re-process all transactions.
We reset the confirmation status of all messages to unconfirmed
and deleted their confirmations array to let the node automatically
migrate to the new format.

Renamed some fields of the `TxContext` class in order to use
the same format in all DB collections and to avoid a breaking
change in the messages confirmation format.
odesenfans added a commit that referenced this pull request Jan 9, 2023
We now store the entire context of the transaction in the confirmations
array of messages. This means that two additional fields are now
preserved: the transaction block timestamp and the publisher.

As we need to re-fetch this data from chain data, a new migration
script resets the chain height to re-process all transactions.
We reset the confirmation status of all messages to unconfirmed
and deleted their confirmations array to let the node automatically
migrate to the new format.

Renamed some fields of the `TxContext` class in order to use
the same format in all DB collections and to avoid a breaking
change in the messages confirmation format.
odesenfans added a commit that referenced this pull request Mar 21, 2023
We now store the entire context of the transaction in the confirmations
array of messages. This means that two additional fields are now
preserved: the transaction block timestamp and the publisher.

As we need to re-fetch this data from chain data, a new migration
script resets the chain height to re-process all transactions.
We reset the confirmation status of all messages to unconfirmed
and deleted their confirmations array to let the node automatically
migrate to the new format.

Renamed some fields of the `TxContext` class in order to use
the same format in all DB collections and to avoid a breaking
change in the messages confirmation format.
This was referenced Apr 14, 2023
odesenfans added a commit that referenced this pull request Apr 24, 2023
We now store the entire context of the transaction in the confirmations
array of messages. This means that two additional fields are now
preserved: the transaction block timestamp and the publisher.

As we need to re-fetch this data from chain data, a new migration
script resets the chain height to re-process all transactions.
We reset the confirmation status of all messages to unconfirmed
and deleted their confirmations array to let the node automatically
migrate to the new format.

Renamed some fields of the `TxContext` class in order to use
the same format in all DB collections and to avoid a breaking
change in the messages confirmation format.
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