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

[Core] Externalize a shared Mempool interface & implementation #388

Closed
12 tasks
Olshansk opened this issue Dec 9, 2022 · 0 comments · Fixed by #437
Closed
12 tasks

[Core] Externalize a shared Mempool interface & implementation #388

Olshansk opened this issue Dec 9, 2022 · 0 comments · Fixed by #437
Assignees
Labels
core Core infrastructure - protocol related p2p P2P specific changes utility Utility specific changes

Comments

@Olshansk
Copy link
Member

Olshansk commented Dec 9, 2022

Objective

Make the Mempool interface and implementation a common high-level type that can be reused across different modules

Origin Document

This discussion in #374: #374 (comment)

Screenshot 2022-12-08 at 4 53 32 PM

Goals

  • Create a Mempool type that other modules can easily import & reuse
  • Clean up the code so all the modules are using the same mempool implementation

Deliverable

  • Create a shared mempool object based on utility/types/Mempool into shared/mempool
  • Import and use shared/mempool in the utility module
  • Import and use shared/mempool in the p2p module
  • Add a couple mempool specific tests
  • In utility/test/module_test.go: TODO(#388): Expose a GetMempoolfunction inutility_module so we can remove this reflection.

Non-goals / Non-deliverables

  • Modify existing business logic

General issue deliverables

  • Update the appropriate CHANGELOG(s)
  • Update any relevant local/global README(s)
  • Update relevant source code tree explanations
  • Add or update any relevant or supporting mermaid diagrams

Testing Methodology

  • **Mempool tests **: make test_mempool
  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md

Creator: @Olshansk
Co-Owners: @deblasis

@Olshansk Olshansk added core Core infrastructure - protocol related p2p P2P specific changes utility Utility specific changes labels Dec 9, 2022
deblasis added a commit that referenced this issue Feb 3, 2023
#388) (#437)

## Description

This PR Makes the `Mempool` interface and implementation a common
high-level type that can be reused across different modules

## Issue

Fixes #388

## Type of change

Please mark the relevant option(s):

- [x] New feature, functionality or library
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Major breaking change
- [ ] Documentation
- [ ] Other <!-- add details here if it a different type of change -->

## List of changes

- Created generic/configurable fifo mempool
- Implemented TxMempool variant WIP

## Testing

- [x] `make develop_test`
- [x]
[LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md)
w/ all of the steps outlined in the `README`

<!-- REMOVE this comment block after following the instructions
 If you added additional tests or infrastructure, describe it here.
 Bonus points for images and videos or gifs.
-->

## Required Checklist

- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have tested my changes using the available tooling
- [x] I have updated the corresponding CHANGELOG

### If Applicable Checklist
- [x] I have updated the corresponding README(s); local and/or global
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added, or updated,
[mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding
README(s)
- [ ] I have added, or updated, documentation and
[mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*`
if I updated `shared/*`README(s)

---------

Signed-off-by: Alessandro De Blasis <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core infrastructure - protocol related p2p P2P specific changes utility Utility specific changes
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants