Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    qiushui
    @qiushui777
    I am trying to run a local testnet with the instructions here. https://docs.tomochain.com/developers/tutoprivatenet/
    I set up two nodes with the first one as the masternode. And start them with following commands.
    ./tomo  --syncmode "full" --datadir  local/1  --networkid 8080 --port 10303 --keystore keystore/1 --password password.txt --rpc --rpccorsdomain "*" --rpcaddr 0.0.0.0 --rpcport 1545 --rpcvhosts "*" --rpcapi "db,eth,net,web3,personal,debug" --gcmode "archive" --ws --wsaddr 0.0.0.0 --wsport 1546 --wsorigins "*" --unlock "acee47e431fdc623d6729f730942a8d71f67ecf1" --identity "NODE1" --mine --gasprice 2500 --bootnodes "enode://a5effe3cf84c2c1370c4930e2298498e80f1c4633a7a05cd4577533b219d668bff60b10ac6f9e4bdc424b123b1e40ea48f3a461308d5f265a9d5b01930d26732@127.0.0.1:30301" console
    
    
    ./tomo  --syncmode "full" --datadir local/2 --networkid 8080 --port 20303 --keystore keystore/2 --password password.txt --rpc --rpccorsdomain "*" --rpcaddr 0.0.0.0 --rpcport 2545 --rpcvhosts "*" --rpcapi "db,eth,net,web3,personal,debug" --gcmode "archive" --ws --wsaddr 0.0.0.0 --wsport 2546 --wsorigins "*" --unlock "374b313e956cdd34324fa2691870537ce354b81e" --identity "NODE2" --mine --gasprice 2500 --bootnodes "enode://a5effe3cf84c2c1370c4930e2298498e80f1c4633a7a05cd4577533b219d668bff60b10ac6f9e4bdc424b123b1e40ea48f3a461308d5f265a9d5b01930d26732@127.0.0.1:30301" console
    Then the second one gives me this error and exit.
    ERROR[12-31|21:33:15] Can't create new DB error="resource temporarily unavailable"
    \
    I don't know why because I used two different dir to store the chain data.
    qiushui
    @qiushui777
    For further information, my node 2 crashed with this stack info

    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xc3cbc6]

    goroutine 47 [running]:
    github.com/tomochain/tomochain/tomox.(*BatchDatabase).NewBatch(0x0, 0xaafbbe5c, 0x1eee8a0)

    Nguyen Sy Thanh Son
    @thanhson1085
    Can you try with v1.5.6.
    Run at least 3 nodes
    qiushui
    @qiushui777
    Thanks for your reply. Yeah, my version is
     ./tomo version
    Tomo
    Version: 2.0.2-beta
    Git Commit: 3f78f9ffef209ebb0fa21ffc307586fae48149e3
    Architecture: amd64
    Protocol Versions: [63 62]
    Network Id: 88
    Go Version: go1.13.3
    Operating System: linux
    GOPATH=/home/sam/go
    GOROOT=/usr/local/go
    And to make my problem more clear. I ran 3 nodes , and set 1 as master node with puppeth.
    And I ran node1 (master node ) with commands like following
    ./tomo  --syncmode "full" --datadir  ~/work/blockchain/tomochain/build/bin/local/1  --networkid 88 --port 10303 --keystore keystore/1 --password password/password1.txt --rpc --rpccorsdomain "*" --rpcaddr 0.0.0.0 --rpcport 1545 --rpcvhosts "*" --rpcapi "db,eth,net,web3,personal,debug" --gcmode "archive" --ws --wsaddr 0.0.0.0 --wsport 1546 --wsorigins "*" --unlock "261ed497f94be3f43c2a820af706c4276618bbc5" --identity "NODE1" --mine --gasprice 2500 --bootnodes "enode://a5effe3cf84c2c1370c4930e2298498e80f1c4633a7a05cd4577533b219d668bff60b10ac6f9e4bdc424b123b1e40ea48f3a461308d5f265a9d5b01930d26732@127.0.0.1:30301" console

    And then node1 gives me this console

    INFO [12-31|22:43:31] Etherbase automatically configured       address=0x261eD497f94be3F43c2a820Af706C4276618bbc5
    Welcome to the Tomo JavaScript console!
    
    instance: tomo/NODE1/v2.0.2-beta-3f78f9ff/linux-amd64/go1.13.3
    coinbase: 0x261ed497f94be3f43c2a820af706c4276618bbc5
    at block: 0 (Tue, 31 Dec 2019 22:13:41 PST)
     datadir: /home/sam/work/blockchain/tomochain/build/bin/local/1
     modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 posv:1.0 rpc:1.0 tomox:1.0 txpool:1.0 web3:1.0
    
    >

    this one looks great

    Then I ran node2 with commands
    ./tomo  --syncmode "full" --datadir ~/work/blockchain/tomochain/build/bin/local/2 --networkid 88 --port 20303 --keystore keystore/2 --password password/password2.txt --rpc --rpccorsdomain "*" --rpcaddr 0.0.0.0 --rpcport 2545 --rpcvhosts "*" --rpcapi "db,eth,net,web3,personal,debug" --gcmode "archive" --ws --wsaddr 0.0.0.0 --wsport 2546 --wsorigins "*" --unlock "152ae8aac5009276f2be8aa82bf66e67b4adf55c" --identity "NODE2" --mine --gasprice 2500 --bootnodes "enode://a5effe3cf84c2c1370c4930e2298498e80f1c4633a7a05cd4577533b219d668bff60b10ac6f9e4bdc424b123b1e40ea48f3a461308d5f265a9d5b01930d26732@127.0.0.1:30301" console

    It gives me this error

    ERROR[12-31|22:43:50] Can't create new DB                      error="resource temporarily unavailable"

    And crashed with

    INFO [12-31|22:43:52] Successfully sealed new block            number=1 hash=362fbc…ec2403
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xc3cbc6]
    
    goroutine 56 [running]:
    github.com/tomochain/tomochain/tomox.(*BatchDatabase).NewBatch(0x0, 0xac8952da, 0x1eee8a0)
        /home/sam/work/blockchain/tomochain/tomox/batchdb.go:112 +0x26
    github.com/tomochain/tomochain/trie.(*Database).Commit(0xc000164090, 0xa655cc1b171fe856, 0x6ef8c092e64583ff, 0xc0ad6c991be0485b, 0x21b463e3b52f6201, 0x0, 0x0, 0x0)
        /home/sam/work/blockchain/tomochain/trie/database.go:251 +0xa0
    github.com/tomochain/tomochain/core.(*BlockChain).WriteBlockWithState(0xc00018f000, 0xc000161290, 0x0, 0x0, 0x0, 0xc00014af00, 0xc0008eac00, 0x732e676f6c202000, 0x0, 0x0)
        /home/sam/work/blockchain/tomochain/core/blockchain.go:1103 +0x2988
    github.com/tomochain/tomochain/miner.(*worker
    qiushui
    @qiushui777

    Then I also ran node3 with commands

    ./tomo  --syncmode "full" --datadir ~/work/blockchain/tomochain/build/bin/local/3 --networkid 88 --port 30303 --keystore keystore/3 --password password/password3.txt --rpc --rpccorsdomain "*" --rpcaddr 0.0.0.0 --rpcport 3545 --rpcvhosts "*" --rpcapi "db,eth,net,web3,personal,debug" --gcmode "archive" --ws --wsaddr 0.0.0.0 --wsport 3546 --wsorigins "*" --unlock "d152f8312dd678c50b8f3b0090cf924d743cc97e" --identity "NODE3" --mine --gasprice 2500 --bootnodes "enode://a5effe3cf84c2c1370c4930e2298498e80f1c4633a7a05cd4577533b219d668bff60b10ac6f9e4bdc424b123b1e40ea48f3a461308d5f265a9d5b01930d26732@127.0.0.1:30301" console

    This one gives the same

    Can't create new DB                      error="resource temporarily unavailable"

    But it didn't crash just continue showing the messages

    > INFO [12-31|22:44:14] Not my turn to commit block. Waiting... 
    INFO [12-31|22:44:24] Not my turn to commit block. Waiting... 
    INFO [12-31|22:44:34] Not my turn to commit block. Waiting... 
    INFO [12-31|22:44:44] Not my turn to commit block. Waiting... 
    INFO [12-31|22:44:54] Not my turn to commit block. Waiting... 
    INFO [12-31|22:45:04] Not my turn to commit block. Waiting... 
    INFO [12-31|22:45:14] Not my turn to commit block. Waiting... 
    INFO [12-31|22:45:24] Not my turn to commit block. Waiting... 
    INFO [12-31|22:45:34] Not my turn to commit block. Waiting... 
    INFO [12-31|22:45:44] Not my turn to commit block. Waiting... 
    INFO [12-31|22:45:54] Not my turn to commit block. Waiting... 
    INFO [12-31|22:46:04] Not my turn to commi
    I actually followed your instructions but failed. Can figure out why. I really appreciate if you can help me with this problem.
    I am going to try v1.5.6 and will came back if there is any problem
    Nguyen Sy Thanh Son
    @thanhson1085
    No, you have to run at least 3 Masternodes, required by POSV consensus
    qiushui
    @qiushui777
    Thanks. I tried v1.5.6. This time node2 and node3 is producing blocks. What do you mean by 3 masternodes? I specify the node1 to own the first masternode with puppeth. But for node2 and node3, how to specify them as masternode?
    1.png
    qiushui
    @qiushui777
    Ok, succeed with configuring 3 nodes to seal the block. So v1.5.6 is good.
    qiushui
    @qiushui777
    @thanhson1085 Hi, v.1.5.6 doesn't contain the tomox directory which the master branch contains. So with v1.5.6 we are not able have those orders related features? There is no tutorial on setting a local DEX with the local private net.
    Nguyen Sy Thanh Son
    @thanhson1085
    not released that tutorial yet
    But you can run DEX to join testnet
    qiushui
    @qiushui777
    Ok, cool. Looking forward to the tutorial.
    qiushui
    @qiushui777
    BTW, currently, it won't charge any fee if we cancel our order on the testnet? Because I read the source code and found out that it will charge us some fee if we cancel an order. However, I tried on the testnet DEX, and it didn't charge me any fee when I canceled my order.
    Nguyen Sy Thanh Son
    @thanhson1085
    Yep, will charge the fee in v2.1
    qiushui
    @qiushui777
    Well, by the way, May I ask TomoZ and TomoP is both finished in the lastest codes now?
    Nguyen Sy Thanh Son
    @thanhson1085
    tomoz is finished
    tomop not yet, will add in the repo soon
    qiushui
    @qiushui777
    Ok, tomop is cool. Not seeing public chains having this kind of anonymous.
    Nguyen Sy Thanh Son
    @thanhson1085
    Almost tomop code is in the repo: https://github.com/tomochain/tomop
    but we will create a PR to tomochain repo soon
    qiushui
    @qiushui777
    Thanks. Quickly checked the repo, looks like you added the bulletproof in the vm. Going to try the new feature. But hopefully you can have some tutorials on how to use it .
    Nguyen Sy Thanh Son
    @thanhson1085
    Will share you the docs when it is available
    Benjamin Cordes
    @benjyz
    is there an ICO contract for tomo implemented?
    this one I assume
    Nguyen Sy Thanh Son
    @thanhson1085
    It is trc21 token contract
    Benjamin Cordes
    @benjyz
    right, the token itself. any public implementation of an ICO contract i.e. the funding
    Nguyen Sy Thanh Son
    @thanhson1085
    currently no
    qiushui
    @qiushui777
    The program on hackerone is closed? Are you going to launch it on any other platforms?
    Nguyen Sy Thanh Son
    @thanhson1085
    Yes, We will public the program on Whitehub then share you the link soon
    hisarkopite
    @hisarkopite_twitter
    @thanhson1085 , @khaihkd , i set up a tomochain private network , according to the docs , what is the difference between the owner of the masternodes and the signers ?
    In the document , all 3 nodes are considered as masternodes , but the reward is only being given to one of the masternode's coinbase.