ava-labs / avalanchego

Go implementation of an Avalanche node.
https://avax.network
BSD 3-Clause "New" or "Revised" License
2.12k stars 669 forks source link

Can't deploy the smart contract on zero gas fee price #1185

Open rajnishfrost opened 1 year ago

rajnishfrost commented 1 year ago

Describe the bug after the setup of avalanche local test network as instruct in the document . when we are deploying contract its charges gas fee , while starting up the nodes we are using flag "--tx-fee=0" for 0 gas fee .

example - ./build/avalanchego --public-ip=127.0.0.1 --http-port=9550 --tx-fee=0 --staking-port=9551 --db-dir=db/node1 --network-id=local --staking-tls-cert-file=$(pwd)/staking/local/staker1.crt --staking-tls-key-file=$(pwd)/staking/local/staker1.key same way other four node setups with some changes

To Reproduce => which command triggred the issue : truffle migrate --network avalanche => Provide us with commands that you used to start your validators: ./build/avalanchego --public-ip=127.0.0.1 --http-port=9550 --tx-fee=0 --staking-port=9551 --db-dir=db/node1 --network-id=local --staking-tls-cert-file=$(pwd)/staking/local/staker1.crt --staking-tls-key-file=$(pwd)/staking/local/staker1.key

Expected behavior smart contract should deploy on local network and respond with success status and contract address without charging gas fee or gas fee should be zero.

Logs Starting migrations...

Network name: 'private' Network id: 43112 Block gas limit: 100000000 (0x5f5e100)

1_initial_migration.js

Deploying 'Migrations'

transaction hash: 0xfa93e2e175aead4dc9a35744da04a07e8fbbaca4d02a646dfe24d7dd8a017f42 Blocks: 0 Seconds: 0 contract address: 0x52C84043CD9c865236f11d9Fc9F56aa003c1f922 block number: 1 block timestamp: 1670398618 account: 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC balance: 49999999.943089965 gas used: 250154 (0x3d12a) gas price: 227.5 gwei value sent: 0 ETH total cost: 0.056910035 ETH

Saving migration to chain. Saving artifacts

> Total cost: 0.056910035 ETH

Summary

Total deployments: 1 Final cost: 0.056910035 ETH

it costing fee for deployment of smart contract .

Operating System ubuntu os 20.04.5 (LTS) os type - 64 bit processor - Intel® Core™ i5-4590T CPU @ 2.00GHz × 4 ram - 16 GB DDR3 rom - 256 GB (hdd)

StephenButtolph commented 1 year ago

The docs are completely insufficient here.

All of the fee based flags at the avalanchego level only relate to the X-chain and the P-chain.

I don't think the C-chain configs easily allow a user to specify the fee rules.

github-actions[bot] commented 1 year ago

This issue has become stale because it has been open 60 days with no activity. Adding the lifecycle/frozen label will cause this issue to ignore lifecycle events.