-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Deploying TRC20 on a private node #6204
Comments
@dkatzan Here's my understanding: Therefore, when running in a QEMU environment, the drastic slowdown in processing speed means that simply increasing the maxTimeRatio parameter cannot fully compensate for the mismatch caused by the underlying execution delay. Suggestion: If conditions permit, it is recommended to deploy the same TRC20 contract on a native x86_64 device to see if the same issue still occurs. This can help rule out problems related to the simulated environment. |
@dkatzan one way to verify it is your local machine's performance problem, you could try to deploy your TRC-20 contract on Transcan Nile Testnet first. |
By the way,I looked at your contract code. The contract mainly inherits from the standard TRC20 and TRC20Detailed implementations. The code itself is very standard and is not much different from common TRC20 contracts. It also uses Solidity version 0.5.0 and does not introduce any particularly new opcodes or instructions. However, the suggestion of @Sunny6889 is good, and you can give it a try to confirm that the problem is not related to the contract compilation. |
@angrynurd @Sunny6889 Thx for u quick response, I can confirm I was able to succesfully deploy my contract into nile testnet So the issues seems unrelated to contract completion I also think the issue is not related to running in my arm machine with QEMU since I added the --debug flag, causing the node to now timeout on CPU performance, so I believe it has something to do with my configuration? |
@dkatzan Does your hardware configuration meet the minimum hardware requirements? Additionally, what are your JVM flags? You can find this information by running the command |
Hi @Sunny6889 I then start the node with the command: running
not sure how I can start the Java process with different JVM flags while running it with the |
Hi, I think I got it to work thx for the support! |
@dkatzan Good for it. Suggested jvm params for java-tron is |
@Sunny6889 are those the suggested params even for running a private node? |
@dkatzan oh, there's no need for a private node if the transaction volume is very limited. My previous suggestion was for a mainnet node, as the syncing transaction volume is significantly larger in that case. |
Hi, I'm trying to setup a local private chain for development and failing to deploy a TRC20 contract
initially, I saw logs in the form of:
22:28:29.424 INFO [qtp2038670805-30] [VM](Program.java:1134) minTimeRatio: 0.0, maxTimeRatio: 5.0, vm should end time in us: 107604299922, vm now time in us: 107604341724, vm start time in us: 107604249922
Which I suspect are a result of my running on an m1 mac, so everything is running slower with
qemu-x86_64
, I tried increasing maxTimeRatio, but it didn't seem to effect the vm timeout, so I ended up running in--debug
mode to avoid this checkI now see errors of the form:
and found these relevant threads:
https://github.com/tronprotocol/java-tron/issues/5576#5576
and tried to follow, but still with no luck
this is my config :
and I tried having
allowTvmTransferTrc10
both on and off but with no luckmy contract code was compiled from here and is :
"60806040523480156200001157600080fd5b50d380156200001f57600080fd5b50d280156200002d57600080fd5b506040518060400160405280600d81526020017f596f7572546f6b656e4e616d65000000000000000000000000000000000000008152506040518060400160405280600381526020017f59544e000000000000000000000000000000000000000000000000000000000081525060128260039080519060200190620000b49291906200038a565b508160049080519060200190620000cd9291906200038a565b5080600560006101000a81548160ff021916908360ff1602179055505050506200011a33620001016200012060201b60201c565b60ff16600a0a6402540be400026200013760201b60201c565b62000439565b6000600560009054906101000a900460ff16905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620001db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f54524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b620001f7816002546200030160201b62000e771790919060201c565b60028190555062000255816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546200030160201b62000e771790919060201c565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60008082840190508381101562000380576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620003cd57805160ff1916838001178555620003fe565b82800160010185558215620003fe579182015b82811115620003fd578251825591602001919060010190620003e0565b5b5090506200040d919062000411565b5090565b6200043691905b808211156200043257600081600090555060010162000418565b5090565b90565b610fc180620004496000396000f3fe608060405234801561001057600080fd5b50d3801561001d57600080fd5b50d2801561002a57600080fd5b50600436106100c35760003560e01c8063395093511161008b578063395093511461027957806370a08231146102df57806395d89b4114610337578063a457c2d7146103ba578063a9059cbb14610420578063dd62ed3e14610486576100c3565b806306fdde03146100c8578063095ea7b31461014b57806318160ddd146101b157806323b872dd146101cf578063313ce56714610255575b600080fd5b6100d06104fe565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101105780820151818401526020810190506100f5565b50505050905090810190601f16801561013d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101976004803603604081101561016157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105a0565b604051808215151515815260200191505060405180910390f35b6101b96105b7565b6040518082815260200191505060405180910390f35b61023b600480360360608110156101e557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105c1565b604051808215151515815260200191505060405180910390f35b61025d610672565b604051808260ff1660ff16815260200191505060405180910390f35b6102c56004803603604081101561028f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610689565b604051808215151515815260200191505060405180910390f35b610321600480360360208110156102f557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061072e565b6040518082815260200191505060405180910390f35b61033f610776565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561037f578082015181840152602081019050610364565b50505050905090810190601f1680156103ac5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610406600480360360408110156103d057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610818565b604051808215151515815260200191505060405180910390f35b61046c6004803603604081101561043657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108bd565b604051808215151515815260200191505060405180910390f35b6104e86004803603604081101561049c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108d4565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105965780601f1061056b57610100808354040283529160200191610596565b820191906000526020600020905b81548152906001019060200180831161057957829003601f168201915b5050505050905090565b60006105ad33848461095b565b6001905092915050565b6000600254905090565b60006105ce848484610b52565b610667843361066285600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610dee90919063ffffffff16565b61095b565b600190509392505050565b6000600560009054906101000a900460ff16905090565b6000610724338461071f85600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e7790919063ffffffff16565b61095b565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561080e5780601f106107e35761010080835404028352916020019161080e565b820191906000526020600020905b8154815290600101906020018083116107f157829003601f168201915b5050505050905090565b60006108b333846108ae85600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610dee90919063ffffffff16565b61095b565b6001905092915050565b60006108ca338484610b52565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109e1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180610f6a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a67576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610f236022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610bd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610f456025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180610f006023913960400191505060405180910390fd5b610caf816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610dee90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d42816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e7790919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600082821115610e66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b600080828401905083811015610ef5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe54524332303a207472616e7366657220746f20746865207a65726f206164647265737354524332303a20617070726f766520746f20746865207a65726f206164647265737354524332303a207472616e736665722066726f6d20746865207a65726f206164647265737354524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26474726f6e5820c45cfbe4a2707afa5f67d1200c0e0f068e72194e78866ed8706185185349794464736f6c63430005120031"
Any help would be appreciated
The text was updated successfully, but these errors were encountered: