truffle truffle-hdwallet-provider Error: Error: the tx doesn't have the correct nonce. account has nonce of: 3 tx has nonce of: 2

What this Error? Example: transaction A get nonce 1 transaction B get nonce 2 transaction C get nonce 3 But blockchain package B、C first, then package A. If happen this step, get error. With truffle? Because Normal const wallet = new HDWalletProvider(mnemonic, url, id); const AContract = new TruffleContract(Json_contract); AContract.setProvider(wallet); wallet.addresses[] AContract. use contract api Sometime you call contract “set/write” api two times. Example: Create contract first. Write data into contract second. This two step are in one function. This mean is you call two time “new HDWalletProvide”. Usually you think “New“ two time is ok, get “new” instance. But ...

2019-05-21 · 1 min · 134 words · Me

geth add peers static-nodes.json

https://medium.com/taipei-ethereum-meetup/%E4%BB%A5%E5%A4%AA%E5%9D%8A%E7%A7%81%E7%B6%B2%E5%BB%BA%E7%AB%8B-%E4%B8%80-43f8677fc9f8 如果要組成一個私人網路,同樣按照上面的流程建立其他節點。如果沒有下–nodiscover參數的話,最後節點應該會找到彼此。如果有下的話就必須用手動的方式加入其他節點,加入的方式有三種: 一是在geth指令加入–bootnodes參數; 二是進到console裡使用 admin.addPeer(); 三是存成static-nodes.json檔,讓geth自動連線。 不管是使用哪一種,我們都要先知道要連到 static-nodes.json 裡面使用domain,可能會有問題,要自行更換ip Example: geth --data ~/data cp static-nodes.json ~/data/geth/static-nodes.json static-nodes.json like this [ "enode://53999cc519079c5190798b1114bd16a05a8d5190796cc51907988a4e80ebda7b6c519079e56b0b161da3475c4dc62f6b51907967a6e327e46aa56329c519079f@192.168.0.10:30303" ]

2019-04-24 · 1 min · 22 words · Me

geth 新版 豪秒產生無法匯入

geth新版的geth.log 會產生豪秒 舊 INFO [04-22|16:29:56] 新 INFO [03-28|13:43:35.004] 差別在.004 看log會發現只有logstash的warning,經同事正確解釋是: >>因為logstash轉換出來的日期格式2019-03-28 13:43:35.004,Elasticsearch不認得,所以對logstash來說是Warning,但對Elasticsearch是Error,造成Log寫不進去~ 所以在logstash.conf上必須在解析date上,補上 “YYYY-MM-dd HH:mm:ss,SSS”, “YYYY-MM-dd HH:mm:ss.SSS” date { match => \[ "gethdate" , "YYYY-MM-dd HH:mm:ss", "YYYY-MM-dd HH:mm:ss,SSS", "YYYY-MM-dd HH:mm:ss.SSS"\] target => "gethdate" timezone => "Asia/Taipei" } 這樣就可以正常匯入geth.log了

2019-04-23 · 1 min · 38 words · Me

ganache-cli geth test developer ethereum

ethereum ganache-cli https://github.com/trufflesuite/ganache-cli

2019-04-18 · 1 min · 3 words · Me

ethereum-etl to csv to filebeat to kafka to mysql

filbeat to kafka https://www.elastic.co/guide/en/beats/filebeat/current/kafka-output.html sink-connector to mysql https://docs.confluent.io/current/connect/kafka-connect-jdbc/sink-connector/index.html

2019-02-12 · 1 min · 8 words · Me