Node icon indicating copy to clipboard operation
Node copied to clipboard

Rework Sending Payables payments without batch txns

Open kauri-hero opened this issue 1 year ago • 1 comments

Currently blocked by GH-744 https://github.com/MASQ-Project/MASQ-Node-issues/issues/744

We are come to realize that sending payables payment transactions in batch transactions across the JSON-RPC specs to the blockchain service providers is more trouble than expected and many providers are having issues processing them. This includes Alchemy, Nodies, LlamaNode and others.

The design for batch transactions was made at a time where the cost of sending many RPC calls was a lot higher, but nowadays it is more feasible to utilize RPC providers without as much concern on the cost of these RPC calls.

Consider reworking the payables payments to be done normally with individual eth_sendRawTransaction calls for each one.

It may be worth factoring this change to include as user toggle or option that allows batch transactions to still be used, if the user decides to enable it. By default, singular payment calls should be enabled for payables payments

kauri-hero avatar Oct 09 '24 10:10 kauri-hero

Hey @kauri-hero 👋

I have an idea; let me know what you think about it.

The understanding is that transactions will eventually become part of the mempool whether we send them in batch or in form of single payments, the distinguishing part is the gas price, the parameter that miners care about. When we create a lot of transactions with the same optimized gas price that the RPC has provided us, then the chances of that batch succeeding are slim, as the gas prices have risen due to high demand. To accommodate the rising gas prices caused by a higher volume of transactions, we should increase our gas price value so that miners will always prioritize them, reducing the chances of failure.

My proposal is to multiply the gas price by a constant value. I prefer that we make this constant user-configurable so that users can decide how quickly they want their payments to be processed. Based on that, we can set the gas price to be 10%, 20%, or 30% higher than the optimized gas price provided by the RPC.

Theoretically, I believe this will resolve the issue of slow payments, and it should be easy to implement. : )

utkarshg6 avatar Mar 24 '25 05:03 utkarshg6