Author Topic: Test Net for Advanced Users  (Read 89991 times)

0 Members and 1 Guest are viewing this topic.

Offline fav

  • Administrator
  • Hero Member
  • *****
  • Posts: 4275
  • No Pain, No Gain
    • View Profile
    • Follow Me!
  • BitShares: fav
Re: Test Net for Advanced Users
« Reply #1155 on: September 23, 2015, 05:16:21 pm »
I cannot register a new account in the GUI, it's always hanging at this screen after entering username+password:

I deleted all cookie and local storage before..

What to do? Is something crashed?

http://imgur.com/HtDO4bA

Also the webserver seems kind of slow, looks overloaded to me..

lagging for me too at the moment

Offline boombastic

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • AngelShares Explorer
Re: Test Net for Advanced Users
« Reply #1156 on: September 23, 2015, 05:40:16 pm »
Double Signing attack test

Since I can't find more information about how double signing will harm the network and what defensive mechanism network will have against double signing, I am going to perform a 30 minutes double signing attack on test net.  Double signing could happen due to honest witness mis-configuring node, witness server compromised by evil third party or corrupted witness.

I have 3 witness accounts voted in that I can coordinate, I am going to try double signing from 1, 2, 3 witnesses using 2 separate servers (US, Asia).

Here is the plan:

The attack will last for 30 minutes, 3 phases, each will last for 10 minutes.

phase I (0-10min): 1 double signing witness (boombastic)
phase II (10-20min): 2 double signing witness (boombastic and mr.agsexplorer)
phase III (20-30min): 3 double signing witness (boombastic and mr.agsexplorer and mrs.agsexplorer)
end (30min): stop double signing

Double signing will cause fork, I want to see after all this mess, if network can recover, and I will do some transactions during the attack and see how it's gonna affect normal user operations.  If you are here, you can perform normal operation and report back after the attack is finished.

bytemaster, if you see this, please do not vote out these double signing witness just yet.  In real world, if some witness starts double signing, voters might not react that quickly, network should survive on its own for at least 30 minutes.

The attack will start at today  2015-09-23 18:00 (UTC), which is 20 mintues from now
« Last Edit: September 23, 2015, 05:48:19 pm by boombastic »
http://bitshares.dacplay.org/r/boombastic
Support My Witness: mr.agsexplorer
BTC: 1Bb6V1UStz45QMAamjaX8rDjsnQnBpHvE8

Offline bytemaster

Re: Test Net for Advanced Users
« Reply #1157 on: September 23, 2015, 05:48:12 pm »
delegate-1.lafona  what happened to your node?
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline bytemaster

Re: Test Net for Advanced Users
« Reply #1158 on: September 23, 2015, 05:59:30 pm »
Double Signing attack test

Since I can't find more information about how double signing will harm the network and what defensive mechanism network will have against double signing, I am going to perform a 30 minutes double signing attack on test net.  Double signing could happen due to honest witness mis-configuring node, witness server compromised by evil third party or corrupted witness.

I have 3 witness accounts voted in that I can coordinate, I am going to try double signing from 1, 2, 3 witnesses using 2 separate servers (US, Asia).

Here is the plan:

The attack will last for 30 minutes, 3 phases, each will last for 10 minutes.

phase I (0-10min): 1 double signing witness (boombastic)
phase II (10-20min): 2 double signing witness (boombastic and mr.agsexplorer)
phase III (20-30min): 3 double signing witness (boombastic and mr.agsexplorer and mrs.agsexplorer)
end (30min): stop double signing

Double signing will cause fork, I want to see after all this mess, if network can recover, and I will do some transactions during the attack and see how it's gonna affect normal user operations.  If you are here, you can perform normal operation and report back after the attack is finished.

bytemaster, if you see this, please do not vote out these double signing witness just yet.  In real world, if some witness starts double signing, voters might not react that quickly, network should survive on its own for at least 30 minutes.

The attack will start at today  2015-09-23 18:00 (UTC), which is 20 mintues from now

In the spirt of the scientific method I will submit the hypothesis on what should happen:

Phase 1:
   The next witness will receive one of your blocks first and then save (but not switch to the other block)
   The next witness will pick one of the blocks to build off of
   All of the other nodes will switch as soon as the next witness produces a block and everything will be in sync.

Phase 2:
   WIll be identical to Phase 1 except in the case that both witnesses are scheduled back to back.  If they are scheduled back to back then it may take two blocks to resolve any forks.

« Last Edit: September 23, 2015, 06:01:27 pm by bytemaster »
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline clayop

  • Hero Member
  • *****
  • Posts: 2033
    • View Profile
    • Bitshares Korea
  • BitShares: clayop
Re: Test Net for Advanced Users
« Reply #1159 on: September 23, 2015, 06:18:16 pm »
I found no difference with my node during the double signing attack :)
Bitshares Korea - http://www.bitshares.kr
Vote for me and see Korean Bitshares community grows
delegate-clayop

Offline bytemaster

Re: Test Net for Advanced Users
« Reply #1160 on: September 23, 2015, 06:20:22 pm »
I found no difference with my node during the double signing attack :)
100% participation during the attack :)
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline boombastic

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • AngelShares Explorer
Re: Test Net for Advanced Users
« Reply #1161 on: September 23, 2015, 06:34:03 pm »
All right, I stopped the double signing attack just now.  First of all, I did do that.  :)  But it feels that didn't happen.  I sent various transactions to account hoping to see some balance missing, etc, but in vain.  The network seems totally immune to double signing.

Is that safe to say that 'evil' double signing in BTS1 era now goes into witness's toolbox.  We can use two machines as redundancy to prevent accident server shutdown?
http://bitshares.dacplay.org/r/boombastic
Support My Witness: mr.agsexplorer
BTC: 1Bb6V1UStz45QMAamjaX8rDjsnQnBpHvE8

Offline bytemaster

Re: Test Net for Advanced Users
« Reply #1162 on: September 23, 2015, 06:50:39 pm »
All right, I stopped the double signing attack just now.  First of all, I did do that.  :)  But it feels that didn't happen.  I sent various transactions to account hoping to see some balance missing, etc, but in vain.  The network seems totally immune to double signing.

Is that safe to say that 'evil' double signing in BTS1 era now goes into witness's toolbox.  We can use two machines as redundancy to prevent accident server shutdown?

Please don't do that.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline lakerta06

Re: Test Net for Advanced Users
« Reply #1163 on: September 23, 2015, 06:54:51 pm »
All right, I stopped the double signing attack just now.  First of all, I did do that.  :)  But it feels that didn't happen.  I sent various transactions to account hoping to see some balance missing, etc, but in vain.  The network seems totally immune to double signing.

Is that safe to say that 'evil' double signing in BTS1 era now goes into witness's toolbox.  We can use two machines as redundancy to prevent accident server shutdown?
If each witness double signs, fork never gets resolved i guess?

Offline puppies

  • Hero Member
  • *****
  • Posts: 1659
    • View Profile
  • BitShares: puppies
Re: Test Net for Advanced Users
« Reply #1164 on: September 23, 2015, 07:02:28 pm »
For redundancy I think I will run multiple nodes with different signing keys.  I will then set up a single node to switch signing keys when my witness misses a block. 
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline lafona

  • Sr. Member
  • ****
  • Posts: 231
    • View Profile
  • BitShares: lafona
Re: Test Net for Advanced Users
« Reply #1165 on: September 23, 2015, 07:03:01 pm »
delegate-1.lafona  what happened to your node?

It looks like I am on a fork.
Code: [Select]
2813283ms th_a       fork_database.cpp:57          push_block           ] Pushing block to fork database that failed to link: 00020081f8a1dd2c575919181724f39ca247d8a1, 131201
2813283ms th_a       fork_database.cpp:58          push_block           ] Head: 131108, 00020024713817f57183d045cdecaf3303acbf0d
2813283ms th_a       application.cpp:415           handle_block         ] Error when pushing block:
3080000 unlinkable_block_exception: unlinkable block
block does not link to known chain
    {}
    th_a  fork_database.cpp:79 _push_block

    {"new_block":{"previous":"00020080759ee5c5fc93983b99af426e9d3fcf36","timestamp":"2015-09-23T15:02:12","witness":"1.6.7","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"witness_signature":"1f65d50fe53a1c376657599d29910bf650086d48a4642b43f5b654d083ef6052a30997ecdac3dab252a2e0e83f9294363a9faacccec6f2852e94643ce22143a689","transactions":[]}}
    th_a  db_block.cpp:195 _push_block


I won't have much time to go through the logs until tonight, but if it helps I will send you a link to the log files.
BTS Witnesses: delegate-1.lafona     Witness Thread: https://bitsharestalk.org/index.php/topic,21569.msg280911/topicseen.html#msg280911
MUSE Witness: lafona

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4212
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: Test Net for Advanced Users
« Reply #1166 on: September 23, 2015, 07:08:59 pm »
For those brave witnesses, I made a patch based on xeroc's price feed script. Enjoy it!

https://github.com/abitmore/python-graphenelib
https://github.com/abitmore/python-graphenelib/blob/master/scripts/pricefeeds.py
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline jtme

Re: Test Net for Advanced Users
« Reply #1167 on: September 23, 2015, 07:16:14 pm »
jtml - what kind of difficulties are you having at the moment, you have missed quite a few blocks recently.

witness crashed

Code: [Select]
witness_node: /mon/g/graphene/libraries/fc/src/thread/thread_d.hpp:370: bool fc::thread_d::start_next_fiber(bool): Assertion `std::current_exception() == std::exception_ptr()' failed.

auto start did not work , there was an error when replaying blockchain

Code: [Select]
Unable to create directories object_database/0
    {"path":"object_database/0","inner":"Dynamic exception type: boost::filesystem::filesystem_error\nstd::exception::what: boost::filesystem::create_directories: Permission denied: \"object_database\"\n"}

After some investigation, I've realized that the problem was in using an absolute path
for --data-dir.  All is written under the given absolute path except object_database, which
is written relative to the current dir (and the proccess did not have write access to that dir)
And it seems that the object_database is not needed and writen during the initial sync,
so the witness was running fine without the need to write to object_database for a while.

Not sure if this could cause the initial crash

The witness is now up and running again.

Offline wackou

Re: Test Net for Advanced Users
« Reply #1168 on: September 23, 2015, 08:02:44 pm »
For redundancy I think I will run multiple nodes with different signing keys.  I will then set up a single node to switch signing keys when my witness misses a block.

I feel like that's the way to go in order to have a backup node ready to pop up in case the main witness goes down for some reason. I will do the same, and encourage other witnesses to get familiarized with this way of doing it.
Please vote for witness wackou! More info at http://digitalgaia.io

Offline wackou

Re: Test Net for Advanced Users
« Reply #1169 on: September 23, 2015, 08:04:09 pm »
What is the best practice for not missing any block during an update?

The update_witness command in CLI wallet allows you to change your witness's block signing key.  This architecture allows several different downtime-free update procedures according to your specific hosting situation:
...

Thanks theoretical! Great work!

 +5% indeed, very useful and sounds like a fool-proof way to do it with no risk of signing double blocks.

One question: how long does it take for the signing key to be updated after you call the update_witness command? As soon as the transaction is processed by the network? After the next maintenance interval? Sth else?

I seem to recall that in BitShares 0.9.x changing the signing key did take a bit of time to go into effect, so that set_block_production true/false was the preferred way. If in graphene the call to changing the signing key takes effect immediately, then that's really nice as it's a much better way of doing it.

bump question @theoretical @bytemaster
Please vote for witness wackou! More info at http://digitalgaia.io