This PR addresses an issue with the saveGroups processing in transaction handling. Previously, due to the changes introduced in cosmos-sdk v50, the removal of logs from block results caused failures in loading all transactions into the database. This led to the explorer showing no transactions for blocks containing at least one group-related transaction after the v1.19.0 Provenance release.
The fix implemented here uses events for a block's transactions and the new msg index attribute, ensuring backward compatibility. It allows the re-processing of blocks prior to v1.19.0 where logs were available but the msg index attribute was not.
Additionally, this PR moves GroupSave processing to the groups service, laying the groundwork for a more robust test suite. While the test suite still needs further development, the ability to re-run transactions using saved JSON files from a gRPC endpoint will significantly speed up debugging in the future. This pattern can also be applied in other areas of the project.
Other improvements include enhanced logging for retries and proper saving of the error block. Previously, the error block wasn't updated on retries, making it difficult to track changes in errors. Now, the error block will always be updated correctly during retries.
closes: #528
closes: #529
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
[ ] Targeted PR against correct branch (see CONTRIBUTING.md)
[ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
[ ] Wrote unit and integration
[ ] Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
[ ] Re-reviewed Files changed in the Github PR explorer
[ ] Review Codecov Report in the comment section below once CI passes
Description
This PR addresses an issue with the
saveGroups
processing in transaction handling. Previously, due to the changes introduced in cosmos-sdk v50, the removal of logs from block results caused failures in loading all transactions into the database. This led to the explorer showing no transactions for blocks containing at least one group-related transaction after the v1.19.0 Provenance release.The fix implemented here uses events for a block's transactions and the new
msg index
attribute, ensuring backward compatibility. It allows the re-processing of blocks prior to v1.19.0 where logs were available but themsg index
attribute was not.Additionally, this PR moves
GroupSave
processing to thegroups
service, laying the groundwork for a more robust test suite. While the test suite still needs further development, the ability to re-run transactions using saved JSON files from a gRPC endpoint will significantly speed up debugging in the future. This pattern can also be applied in other areas of the project.Other improvements include enhanced logging for retries and proper saving of the error block. Previously, the error block wasn't updated on retries, making it difficult to track changes in errors. Now, the error block will always be updated correctly during retries.
closes: #528 closes: #529
Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why.
Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes