Ha ĐANG
  • Member for 3 years, 5 months
  • Last seen this week
Why admin.addPeer() command did not add parity client for private chain with Docker?
0 votes

according to your compose file, the parity peer should be "enode://.....@172.16.128.10:30300

View answer
Copy Geth full node onto external drive then continue syncing
2 votes

I think we can mount external storage and to set it as ancient data folder --datadir.ancient value Data directory for ancient chain segments (default = inside chaindata) ref: https://github.com/...

View answer
Create fastest possible localhost Ethereum test net
0 votes

You can use rinkeby or gorlier poa testnet, if it’s not fast enough you can run your own testnet with small block time, say, 1-2 seconds

View answer
Giving a big nonce in transaction doesn't return anything?
0 votes

You must to provide the correct nonce. The high nonce tnx will be pending in txpool queue until all the lower nonce tnx was mined

View answer
Transaction execution guarantee
0 votes

Besides the technical issues, there’s a political issue also. your tnx might never be included in the block when all miners take a censorship on your tnx.

View answer
how to avoid re-entrancy vulnerability warning?
1 votes

You should to update state before calling the transfer method. Because if you don’t update state then if the receiver is a smart contract it can call back your contract method to transfer again and ...

View answer
Is there a web3 api written in golang to interact with Eth nodes?
0 votes

You can use eth client that already include in the code base of go-ethereum to interactive with chain like web3 You can reference to my sample repo below https://github.com/hadv/go-ethclient/blob/...

View answer
Geth -- Is this possible to setup a private chain that only mining when accept TXs
0 votes

You can do it even on the ethereum mainnet but I think we cannot enforce this into the consensus

View answer
Why txHash in sendSignedTransaction giving Undefined value on sending on rinkeby testnet
0 votes

You may need to specific the value for from of the tnx also as below const txObject ={ from: account1, nonce: web3.utils.toHex(txCount+1), to: account2, value: web3.utils.toHex(web3....

View answer
Remove coinbase transactions in private net
0 votes

Is there any way geth source code could be modified to remove miners reward and hence coinbase transactions? Ethereum will give mining reward for coinbase by adding to it's balance. Then if you don'...

View answer
Getting Tx is not a constructor when executing this program
Accepted answer
18 votes

In the new version you should change const Tx = require('ethereumjs-tx') to const Tx = require('ethereumjs-tx').Transaction

View answer
Why is the holder balance more than total supply? Why has nothing been sent to the contract?
2 votes

What have I done wrong? WRONG _balances[msg.sender] = _balances[msg.sender].sub(tokensToTransfer); CORRECT _balances[msg.sender] = _balances[msg.sender].sub(value); Why has nothing been sent to ...

View answer
How to get the miner address of a block with infura Rinkeby endpoint?
2 votes

I've read some docs online that to get the miner/sealer/signer address of a particular block that runs with the Ethereum PoA/Clique consensus (the Rinkeby testnet for example), I need to call the ...

View answer
Error transferring balance. Runs out of gas
0 votes

I think It's only warning from Remix IDE due to it cannot perform estimated gas properly because EVM don't know what is in address of portfolio. If it's smart contract then the gas used will be ...

View answer
Error: gas required exceeds allowance or always failing transaction in Remix using Ropsten network
Accepted answer
1 votes

I can deploy your contract and call sendEtherToReceiver method successfully on Ropsten network https://ropsten.etherscan.io/address/0xacf89f2bc4bd1971cf8827f57e013031a62f514c#code https://ropsten....

View answer
How to add custom precompiled contract?
Accepted answer
2 votes

This is good reference that do a new pre-compile contract for Ethereum next hardfork named Istanbul https://github.com/keep-network/go-ethereum/pull/4/files Basically, you only need to implement two ...

View answer
Why does function GetEVM set the balance of from address to MaxBig256?
2 votes

This is only the temporary EVM for running tnx to get the value then it doesn't make and changes in the state/blockchain

View answer
Why does the `DoCall` function use the first account by default?
1 votes

This is only the Call API expose to everyone then from is not deal. The state is only temporarily for execute the call and cannot update any real state so it do no harm at all. You can see on the ...

View answer
Call a smart contract from the protocol level
0 votes

We can do it by using abigen tool to generate go binding to the smart contract and call contract's method on consensus level against a backend with current chain's state. Similar to Ethereum's ...

View answer
How to modify the algorithm of transaction selection in Ethereum private net?
Accepted answer
4 votes

Sure, you can implement your own algorithm to order the txpool. Currently, they order by gas price that make sense for mining incentive https://github.com/ethereum/go-ethereum/blob/...

View answer
How to create a RawTransaction for contract interaction Web3j
0 votes

I think you can use createFunctionCallTransaction to make the smart contract call transaction like below link https://docs.web3j.io/transactions.html#transacting-with-a-smart-contract Then use ...

View answer
Inline assembly, good or bad practice
4 votes

I think there're some points that we need to use assembly in the documents 1. smth that cannot be done by plain Solidity https://solidity.readthedocs.io/en/v0.5.3/assembly.html#example pragma ...

View answer
Transaction disappeared from the pending transactions in node
Accepted answer
2 votes

I think it was timeout. By default, the lifetime of tnx is 3 hours https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options --txpool.lifetime value Maximum amount of time non-...

View answer
Is it possible to hard fork a private network to Constantinople?
Accepted answer
2 votes

Simply, we need to do the same things as ethereum do for their networks on your chain. We have two options: 1. First is do like this answer How to setup constantinople fork for private ethereum ...

View answer
Is there a way to export/import peers?
0 votes

With the current version of geth, peers already contains enode then we can simply export peers by below javascript code snippet admin.peers.forEach(function(value){console.log(value.enode)})

View answer
Geth v1.8.21 slow syncing on archival node
0 votes

Geth 1.8.22-stable seems good https://github.com/ethereum/go-ethereum/issues/19167

View answer
Cannot create property 'from' on string
Accepted answer
0 votes

This issue from web3js may help https://github.com/ethereum/web3.js/issues/2376 version 36 works well to, and if you have a typescript base, you need to use 36. But there will be a new release ...

View answer
Clarification on "password" argument for web3.eth.personal.sign
0 votes

it is the password that you pass when calling function to create new account https://web3js.readthedocs.io/en/1.0/web3-eth-personal.html#newaccount

View answer
ZepplinOS: Where to set owner of the contract?
Accepted answer
2 votes

I think it'd better to explicit the owner via input param like below, instead of using msg.sender since msg.sender might be not what we intend to set because zos use contract proxy to make it ...

View answer
Error: Failed account unlock attempt, is this an attack?
2 votes

Sure, this is brute-force attack trying to unlock an account and send out a transaction. Never never never open up rpc port in public.

View answer