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

fix(deploy): Snow deployment can't addLink #827

Open
andrii-kl opened this issue Dec 1, 2022 · 8 comments
Open

fix(deploy): Snow deployment can't addLink #827

andrii-kl opened this issue Dec 1, 2022 · 8 comments
Assignees

Comments

@andrii-kl
Copy link
Collaborator

andrii-kl commented Dec 1, 2022

Overview

Deployment process can't pass.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run deploysc.sh
  2. See error

config.txt

Error

BSC_RPC_URI: https://arctic-rpc.icenetwork.io:9933
Using network 'bsc'.

Add link btp://0x2.icon/cx3a5bcb33421e2c09215091471bc9635f736997fd
ProviderError: exceeds block gas limit
at module.exports (/icon-bridge/devnet/docker/icon-bsc/scripts/bmc.js:16:34)
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: -32603,
hijackedStack: 'ProviderError: exceeds block gas limit\n' +

@bbist
Copy link
Collaborator

bbist commented Dec 2, 2022

@andrii-kl, can you check if the txn gas limit being assigned is below the block gas limit? If you're using default settings, please enforce a manual gas limit below block gas limit of SNOW chain.

@manishbista28
Copy link
Collaborator

@sdpisreddevil -- is it possible for you to check why addLink() is not working ?

@andrii-kl
Copy link
Collaborator Author

andrii-kl commented Dec 5, 2022

@bbist @manishbista28 @sdpisreddevil
The issue is not trivial.
So to isolate the problem I called the function through the Remix app and I got the same error.
It means that icon-bridge is not the reason of this issue.
Also I try with different gas limits (in remix), the results were same.

Screen Shot 2022-12-03 at 1.28.36 PM.png

The interesting point that I found that the function addService is working properly, you can add any new services.

My ideas:
After the update of the Arctic testnet, Arctic has new substrate and Frontier (EVM), some functionality that we use in the addLink are not working.

I tried to find the problem with Remix debugger, but app breaks each time when I try to debug addLink transaction.

@sdpisreddevil
Copy link
Collaborator

Going through the code, and seems like the new Arctic testnet is having problem on the encoding RLP codes.
Will look through it deeply today.

@manishbista28
Copy link
Collaborator

manishbista28 commented Dec 5, 2022

specifying "gas" manually on truffle config seems to get the method addLink() working.
I used the following on bmc truffle config

        bsc: {
            ...
            gas: 9000000,
            gasPrice: 20000000000
        }

Can you guys confirm ?

Currently, truffle itself estimates gas necessary for a transaction and sets the gas limit accordingly on a transaction request Specifying the method manually can help but it has its own downsides too.

  1. If a large value is to be selected, one will have to ensure that the deployer account has at least (specified gas limit times gas price) amount of native token even if the transaction itself may consume a small fraction of the specified gas limit

2.there are constraints such as gas_limit X gas price should be less than 1 ETH on bsc chain. It may or may not be applicable on other chains. This constrains how large a gas limit can be placed for the specified gas price.

  1. Whether the specified gas limit is sufficient for all types of transactions (including truffle migrate or upgrade ones)

@manishbista28
Copy link
Collaborator

could complete ICON-BSC-SNOW testnet deployment afterwards.

@sdpisreddevil
Copy link
Collaborator

By specifying "gas" manually on metamask transaction builder fixed the working of addLink().

On Arctic as the transaction fee is increased by 2000x we've to check every other user triggered method if the GAS will be enough to implement the method.

We can proceed ahead to complete ICON-BSC-ARCTIC deployment and testings.

@manishbista28
Copy link
Collaborator

@sdpisreddevil
if the solution involves using a fixed "gas" parameter, will this change to bmc's truffle config be committed through this ticket ?
Will a static value of "gas" be suitable for all known transaction types (e.g. deployment, upgrade and configuration txns) ?

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

4 participants