blockworks-foundation / mango-explorer

A project to explore and provide useful code for Mango Markets (https://mango.markets/).
MIT License
155 stars 87 forks source link

[marketmaker] possible to configure tpu retransmissions (max retries in txn opts) when sending a transaction #44

Closed ochaloup closed 2 years ago

ochaloup commented 2 years ago

There is a missing way to configure the max retries on sending transaction to RPC node. The attempt of this PR is to fix this deficiency. What do you think @OpinionatedGeek ?

OpinionatedGeek commented 2 years ago

I like it a lot - thanks for doing this!

One thing though. The client already retries sending to the RPC node in some circumstances, so I worry 'max retries' might not be clear that this setting governs the number of retry attempts the RPC server will make when sending it to the validator, not the number of retry attempts when sending to the RPC server.

Can you think of a better name for it? All my attempts turn out long and unwieldy.

ochaloup commented 2 years ago

@OpinionatedGeek I see, I can try, just you know the naming is the one of the hardest issue in the computer engineering :-) I can think of like tpu_retransmissions or tpu_retries. Would that makes sense?

OpinionatedGeek commented 2 years ago

tpu_retransmissions sounds excellent - really makes it clear to me what it sets. Many thanks for this!

ochaloup commented 2 years ago

@OpinionatedGeek great, thank you. I renamed the max retries to tpu retransmissions (plus added an update on missing building calls at context builder in respect of transaction_status_collector). Please, take a look. Thanks!

OpinionatedGeek commented 2 years ago

Brilliant - thanks!