pokt-network / pocket

Official implementation of the Pocket Network Protocol v1
https://pokt.network
MIT License
61 stars 33 forks source link

[IBC] Make the IBC Host a submodule with access to the bus #868

Closed h5law closed 11 months ago

h5law commented 1 year ago

Description

Summary generated by Reviewpad on 13 Jul 23 10:41 UTC

This pull request includes several changes across multiple files. Here is a summary of the changes:

  1. In the file ibc/handle_message_test.go, the file was renamed to ibc/ibc_msg_mempool_test.go with a similarity index of 85%.
  2. In the same file, the imports were modified, and the strings package was added.
  3. The test function TestHandleMessage_ErrorAlreadyInMempool was renamed to TestEmitMessage_MessageAddedToLocalMempool. Some code within the renamed test function was also modified, including changes in the preparation of test data and the addition of a transaction to the mempool.
  4. The test function TestHandleMessage_BasicValidation_Message was renamed to TestIBCMessage_BasicValidation_Message.
  5. The test function TestHandleMessage_BasicValidation_Transaction was renamed to TestIBCMessage_BasicValidation_Transaction.
  6. A new test function TestHandleMessage_ErrorAlreadyInMempool was added to check for the error of having a duplicate transaction in the mempool.
  7. A new test function TestHandleMessage_ErrorAlreadyCommitted was added to check for the error of having an already committed transaction.
  8. The test function TestHandleMessage_GetIndexedMessage was modified to include changes in the preparation of the environment.
  9. The test function TestHandleMessage_AddToMempool was removed.

Additionally, other files such as treestore_module.go, emitter.go, submodule.go, config.validator4.json, persistence/ibc.go, defaults.go, bus_module.go, ibc_store_module.go, bulk_store_cache.go, ibc_host_module.go, config.validator4.json, persistence/test/benchmark_state_test.go, p2p/README.md, runtime/manager_test.go, shared/node.go, persistence/test/manager_test.go, shared/modules/bulk_store_cache.go, ibc.go, shared/node.go, ics24.md, main_test.go have also been modified.

Please let me know if you need more information or details about any specific change.

Issue

Fixes #854

Type of change

Please mark the relevant option(s):

List of changes

Testing

Required Checklist

If Applicable Checklist

h5law commented 12 months ago

🚨 I REWROTE HISTORY 🚨

As I took this branch out of a WIP draft I have rebased and cleaned up the commit history (fixups etc). This is the only time this will happen as this PR is now ready for review.

CC: @Olshansk @bryanchriswhite

h5law commented 11 months ago

@Olshansk added tests to cover the flushing and pruning works on new height events