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

Estimate gas price adequately #1

Open
matthiasgeihs opened this issue Jun 8, 2022 · 0 comments
Open

Estimate gas price adequately #1

matthiasgeihs opened this issue Jun 8, 2022 · 0 comments

Comments

@matthiasgeihs
Copy link
Contributor

Copied from hyperledger-labs/go-perun#332

Location

https://github.com/hyperledger-labs/go-perun/blob/9349d86249e080d3fc93d8d5ac82197a0c07f0d0/backend/ethereum/channel/contractbackend.go#L38

Problem

We just set a default, very high gasLimit for all calls.

Proposal

Set a more appropriate gas limit per call.

@matthiasgeihs matthiasgeihs changed the title Eth Backend: Estimate gas price adequately Estimate gas price adequately Jun 8, 2022
iljabvh pushed a commit that referenced this issue Feb 2, 2024
* channel: Include shared Nonce object, incrementing the nonce of an account while the transaction is broadcast. Implement sync.Mutex, locking the nonce incrementals.
In erc20_depositor.go, the depositing process is locked during the "Approve" function call with ```lockKey```. The function ```(d *ERC20Depositor) Deposit``` is renamed to `````(d *ERC20Depositor) DepositOnly`

* client: To avoid timeouts caused by the added locking mechanism during ERC20 deposits, ```context.WithTimeout``` and ```twoPartyTestTimeout``` has been increased in fund_test.go and payment_test.go.

* client/test: Timeouts have been increased to avoid premature timeout errors due to the locking mechanism above.

---------

Signed-off-by: Ilja von Hoessle <[email protected]>
Signed-off-by: sophia1ch <[email protected]>
iljabvh added a commit that referenced this issue Feb 2, 2024
Fix: Remove IncreaseAllowance & Add shared nonce (#1)
iljabvh pushed a commit that referenced this issue Feb 20, 2024
* channel: Include shared Nonce object, incrementing the nonce of an account while the transaction is broadcast. Implement sync.Mutex, locking the nonce incrementals.
In erc20_depositor.go, the depositing process is locked during the "Approve" function call with ```lockKey```. The function ```(d *ERC20Depositor) Deposit``` is renamed to `````(d *ERC20Depositor) DepositOnly`

* client: To avoid timeouts caused by the added locking mechanism during ERC20 deposits, ```context.WithTimeout``` and ```twoPartyTestTimeout``` has been increased in fund_test.go and payment_test.go.

* client/test: Timeouts have been increased to avoid premature timeout errors due to the locking mechanism above.

---------

Signed-off-by: Ilja von Hoessle <[email protected]>
Signed-off-by: sophia1ch <[email protected]>
sophia1ch added a commit that referenced this issue Mar 19, 2024
* channel: Include shared Nonce object, incrementing the nonce of an account while the transaction is broadcast. Implement sync.Mutex, locking the nonce incrementals.
In erc20_depositor.go, the depositing process is locked during the "Approve" function call with ```lockKey```. The function ```(d *ERC20Depositor) Deposit``` is renamed to `````(d *ERC20Depositor) DepositOnly`

* client: To avoid timeouts caused by the added locking mechanism during ERC20 deposits, ```context.WithTimeout``` and ```twoPartyTestTimeout``` has been increased in fund_test.go and payment_test.go.

* client/test: Timeouts have been increased to avoid premature timeout errors due to the locking mechanism above.

---------

Signed-off-by: Ilja von Hoessle <[email protected]>
Signed-off-by: sophia1ch <[email protected]>
Signed-off-by: Sophia Koehler <[email protected]>
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

No branches or pull requests

1 participant