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

Engine store api #53

Merged
merged 3 commits into from
Oct 2, 2023
Merged

Engine store api #53

merged 3 commits into from
Oct 2, 2023

Conversation

ferranbt
Copy link
Collaborator

@ferranbt ferranbt commented Sep 29, 2023

📝 Summary

This PR solidifies the API of the engine store. Due to the old mempool and the store using different Bid types, once the APIs were merged in a single interface in #51 the result was not ideal:

  • Two methods FetchEngineBidById and FetchBidById doing the same thing but returning different types.
  • An extra SubmitBid method that only did indexing by version and decryptConfiditon were the same functionality could be merged inside InitializeBid.

📚 References


  • I have seen and agree to CONTRIBUTING.md

defer log.Info("bid submitted", "bid", bid, "store", r.Store)

var bidsByBlockAndProtocol []types.Bid
var bidsByBlockAndProtocol []suave.BidId
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indexing was changed to include only the bid id and no add extra space storing the bids again.

"github.com/stretchr/testify/require"
)

func testBackendStore(t *testing.T, store suave.ConfidentialStoreBackend) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A generic testing suite for any type of backend store.

@ferranbt ferranbt mentioned this pull request Sep 29, 2023
1 task
@ferranbt ferranbt merged commit 4564ef2 into main Oct 2, 2023
@ferranbt ferranbt deleted the engine-store-api branch October 2, 2023 11:07
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