koinos / koinos-mempool

The mempool microservice stores pending transactions for inclusion in blocks by the block producer.
MIT License
0 stars 1 forks source link

Allow transactions to expire based on the wall clock time #66

Closed sgerbino closed 1 year ago

sgerbino commented 1 year ago

Resolves #64.

Brief description

Allow transactions to expire based on the wall clock time. Adds the configuration option transaction-expiration which takes the number of seconds a transaction should expire after.

Checklist

Demonstration

❯ ./programs/koinos_mempool/Debug/koinos_mempool
2022-10-04 17:19:51.075666 (mempool.Koinos) [main.cpp:124] <info>: Starting mempool...
2022-10-04 17:19:51.076853 (mempool.Koinos) [main.cpp:125] <info>: Number of jobs: 8
2022-10-04 17:19:51.076947 (mempool.Koinos) [main.cpp:126] <info>: Transaction expiration: 120s
2022-10-04 17:19:51.078407 (mempool.Koinos) [main.cpp:312] <info>: Connecting AMQP client...
2022-10-04 17:19:51.082048 (mempool.Koinos) [retryer.cpp:106] <warning>: Failure during client connection to AMQP, retrying in 1000ms
2022-10-04 17:19:52.082746 (mempool.Koinos) [retryer.cpp:73] <warning>: Failure during client connection to AMQP, retrying in 2000ms
2022-10-04 17:19:54.083530 (mempool.Koinos) [retryer.cpp:73] <warning>: Failure during client connection to AMQP, retrying in 4000ms
^C2022-10-04 17:19:54.456569 (mempool.Koinos) [main.cpp:137] <info>: Caught signal, shutting down...
2022-10-04 17:19:54.458776 (mempool.Koinos) [main.cpp:358] <info>: Shut down gracefully