Skip to content

Conversation

@bharath-123
Copy link
Contributor

@bharath-123 bharath-123 commented Sep 27, 2024

This PR implements the StreamExecuteOptimisticBlock. StreamExecuteOptimisticBlock listens for optimistic block execution requests. On receiving a StreamExecuteOptimisticBlockRequest, we execute the block and wait for the mempool to be cleared. Once it's cleared, we return a StreamExecuteOptimisticBlockResponse back to the auctioneer.
We also allow only 1 client to be connected to StreamExecuteOptimisticBlock. We achieve this by maintaining an atomic boolean called executeOptimisticBlockStreamConnected where we perform a CompareAndSwap to update it from false to true everytime somebody connects to it.

Changes made:

  1. Implement the StreamExecuteOptimisticBlock grpc method
  2. Add mock_grpc_stream.go file which contains a basic MockStream implementation used to mock grpc streams during unit testing.
  3. Add unit tests

@bharath-123 bharath-123 force-pushed the bharath/add-mempool-clearing-event branch from 67e8bb3 to 7428c4f Compare September 27, 2024 10:30
@bharath-123 bharath-123 changed the title implement stream execute optimistic block feat: implement stream execute optimistic block Sep 27, 2024
@bharath-123 bharath-123 force-pushed the bharath/add-mempool-clearing-event branch from 7428c4f to 14d50b2 Compare September 27, 2024 11:06
@bharath-123 bharath-123 changed the title feat: implement stream execute optimistic block feat: Trusted Auctioneer: implement stream execute optimistic block Sep 30, 2024
@bharath-123 bharath-123 force-pushed the bharath/add-mempool-clearing-event branch from 14d50b2 to 9d5e8a9 Compare September 30, 2024 18:09
@bharath-123 bharath-123 force-pushed the bharath/implement-optimistic-execution branch from b2656a4 to 3c385b6 Compare September 30, 2024 18:39
@bharath-123 bharath-123 marked this pull request as ready for review October 1, 2024 18:11
@bharath-123 bharath-123 force-pushed the bharath/add-mempool-clearing-event branch 2 times, most recently from c39ff65 to f13364b Compare October 16, 2024 17:53
@bharath-123 bharath-123 force-pushed the bharath/implement-optimistic-execution branch from 4c77ff2 to b607990 Compare October 16, 2024 17:58
@bharath-123 bharath-123 force-pushed the bharath/add-mempool-clearing-event branch from f13364b to 0be6ac1 Compare October 24, 2024 06:43
@bharath-123 bharath-123 force-pushed the bharath/implement-optimistic-execution branch from b607990 to 00ec806 Compare October 24, 2024 07:01
@bharath-123 bharath-123 force-pushed the bharath/add-mempool-clearing-event branch from 0be6ac1 to 59f90a7 Compare October 24, 2024 08:50
@bharath-123 bharath-123 force-pushed the bharath/implement-optimistic-execution branch from a78ff12 to 9868513 Compare October 24, 2024 08:52
@bharath-123 bharath-123 force-pushed the bharath/add-mempool-clearing-event branch from 59f90a7 to 5d40100 Compare October 24, 2024 15:24
@bharath-123 bharath-123 force-pushed the bharath/implement-optimistic-execution branch from 9868513 to 96030a1 Compare October 24, 2024 15:25
@bharath-123 bharath-123 force-pushed the bharath/add-mempool-clearing-event branch from 5d40100 to 40652a0 Compare October 29, 2024 08:17
@bharath-123 bharath-123 force-pushed the bharath/implement-optimistic-execution branch 2 times, most recently from a3c4509 to d7f0830 Compare November 4, 2024 06:48
@bharath-123 bharath-123 force-pushed the bharath/add-mempool-clearing-event branch from 15d4ce4 to e7abf02 Compare November 10, 2024 09:09
@bharath-123 bharath-123 force-pushed the bharath/implement-optimistic-execution branch from 822240a to ffa4fcb Compare November 10, 2024 09:12
@bharath-123 bharath-123 force-pushed the bharath/add-mempool-clearing-event branch from e7abf02 to 0158846 Compare November 12, 2024 08:45
@bharath-123 bharath-123 force-pushed the bharath/implement-optimistic-execution branch from ffa4fcb to 5c33b09 Compare November 12, 2024 08:45
@bharath-123 bharath-123 force-pushed the bharath/add-mempool-clearing-event branch from 0158846 to fd3dd2c Compare November 20, 2024 06:54
@bharath-123 bharath-123 force-pushed the bharath/implement-optimistic-execution branch from 27d7ce4 to 3013a91 Compare November 20, 2024 06:55
@bharath-123 bharath-123 force-pushed the bharath/add-mempool-clearing-event branch from fd3dd2c to 99acf19 Compare January 9, 2025 09:55
@bharath-123 bharath-123 force-pushed the bharath/implement-optimistic-execution branch from ae9498d to 7471ef9 Compare January 9, 2025 09:56
chore: Trusted Auctioneer: update the protos
feat: Trusted Auctioneer: Add initial set of metrics for auctioneer
feat: Trusted Auctioneer: Code cleanups
…-block

feat: Trusted Auctioneer: Add API to query the current optimistic block
feat: Trusted Auctioneer: Support unmarshalling signed allocations and placing it at the TOB
feat: Trusted Auctioneer: Add a cmd line flag to run a Flame node in auctioneer mode
refactor: Trusted Auctioneer: Separate execution api service and optimistic execution api service
feat: Trusted Auctioneer: Implement bundle streaming
@bharath-123 bharath-123 merged commit 9496cb9 into bharath/add-mempool-clearing-event Jan 13, 2025
@bharath-123 bharath-123 mentioned this pull request Jan 13, 2025
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