Author Topic: BSIP-18: How to easily revive a BitAsset after Black Swan - read for comment  (Read 9601 times)

0 Members and 1 Guest are viewing this topic.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12915
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: BSIP-18: How to easily revive a BitAsset after Black Swan - read for comment
« Reply #30 on: September 26, 2017, 07:25:39 pm »
Any update in regards to the new software on testnet?  Is there any criteria in place to verify before scheduling a fork on the production network?

A very good questions. Yesterday I have asked the witnesses about the progress with their testing, but have yet to receive an answer.
Of course anyone is welcome to test on testnet, but the responsibility really lies with the witnesses, IMO.

Perhaps this is something the BitShares foundation can accomplish.  How do we hold witnesses to a higher standard?  Have a web page dedicated to witness feedback on items requiring testing?
thats exactly what the mailing lists there are supposed to do .. they need to grow in their traffic anyways, but i really cannot do everything in my own
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
Re: BSIP-18: How to easily revive a BitAsset after Black Swan - read for comment
« Reply #31 on: September 28, 2017, 03:20:22 pm »
In order to make testing easier for everyone, here are a few example CLI commands for creating a bitasset and generating a black swan. Also see http://docs.bitshares.eu/api/wallet-api.html#asset-calls .

Issuer "crn" creates an asset with symbol "CLOSED.USD", 4 decimals and the given asset options (all permissions, override_authority flag, core exchange rate of .1 CLOSED.USD / 1 TEST) and bitasset options (1 hour pricefeed lifetime, 1 hour settlement delay, 50% maximum settlement ratio):
Code: [Select]
create_asset crn CLOSED.USD 4 {"issuer_permissions":511,"flags":4,"core_exchange_rate":{"base":{"amount":1000,"asset_id":"1.3.1"},"quote":{"amount":100000,"asset_id":"1.3.0"}}} {"feed_lifetime_sec":3600,"force_settlement_delay_sec":3600,"maximum_force_settlement_volume":5000} true

Show the new asset (note its ID, it is required for publishing feeds):
Code: [Select]
get_asset CLOSED.USD

Set the list of feed producers to the issuer account only (alternatively, set the witness_fed_asset or the committee_fed_asset flag):
Code: [Select]
update_asset_feed_producers CLOSED.USD ["crn"] true

Publish a feed price of .1 CLOSED.USD / .00001 TEST and a core exchange rate of .0001 CLOSED.USD / .01 TEST (you have to substitute the ID of your own asset in two places!). Warning: with these settings someone can cheaply borrow CLOSED.USD and use them to empty the fee pool!
Code: [Select]
publish_asset_feed crn CLOSED.USD {"settlement_price":{"base":{"asset_id":"1.3.341","amount":1000},"quote":{"asset_id":"1.3.0","amount":1}},"maintenance_collateral_ratio":1750,"core_exchange_rate":{"base":{"amount":1,"asset_id":"1.3.341"},"quote":{"amount":1000,"asset_id":"1.3.0"}}} true

Account "crn" borrows 1000 CLOSED.USD from the blockchain, providing 0.2 TEST as collateral:
Code: [Select]
borrow_asset crn 1000 CLOSED.USD 0.2 true

Account "crn" settles 10 CLOSED.USD:
Code: [Select]
settle_asset crn 10 CLOSED.USD true
You have to wait for the settlement delay, i. e. 1 hour in the example, provided that there is a valid pricefeed at that time. If executed after a black swan, settlement happens immediately.

Account "crn" places a sell order of 10 CLOSED.USD for .01 TEST (no expiration, no fill-or-kill flag) on the market. The subsequent price feed update triggers the black swan (again, you have to substitute your asset ID twice):
Code: [Select]
sell_asset crn 10 CLOSED.USD .01 TEST 0 false true

publish_asset_feed crn CLOSED.USD {"settlement_price":{"base":{"asset_id":"1.3.341","amount":1000},"quote":{"asset_id":"1.3.0","amount":10}},"maintenance_collateral_ratio":1750,"core_exchange_rate":{"base":{"amount":1,"asset_id":"1.3.341"},"quote":{"amount":100,"asset_id":"1.3.0"}}} true

For the black swan it is required that the short position is margin called AND a sell order exists AND the short has insufficient collateral to cover the debt at the best sell price.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline Fox

Re: BSIP-18: How to easily revive a BitAsset after Black Swan - read for comment
« Reply #32 on: September 29, 2017, 02:34:41 pm »
Thank you [member=94]pc[/member] for providing the CLI commands.

I was able to utilize these for testing FOXUSD (1.3.366) on the TESTNET. I am confident with the functionality of the code implemented therein.

Please note my APPROVAL of the code for release to MAINNET.
Witness: fox

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 1895
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
seem I need to go through my witness votes and kick out some of those that aren't as active as they are supposed to be for the amount of money they get.
By reducing the number of active witnesses we also reduce the operational costs of the blockchain ... let's see when people start complaining real hard ..

reducing the number of active witnesses is not a good idea, and this do not reduce the costs of the blockchain as block generating speed is not reduced.

one question, if testing is part of the BSIP18 work, should the testers be paid from the fund of the worker proposal?

iHashFury

  • Guest
Great work [member=94]pc[/member]

I was able to:
  • reset SETTLE on the test-net
  • blackswan SETTLE again
  • then reset SETTLE using "bid_collateral" cli command
I look forward to seeing this code forked into bitshares-core
 8)

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
one question, if testing is part of the BSIP18 work, should the testers be paid from the fund of the worker proposal?

Testers (other than myself) are not paid through the proposal, see http://www.bitshares.foundation/workers/2017-07-peter-conrad .

Quote
My work includes the following milestones:

* 20% specification (already delivered, see BSIP-0018)
* 30% implementation (mostly finished)
* 10% integration into testnet (*)
* 10% testing (*)
* 10% bugfixes
* 10% integration into mainnet, including release (*)
* 5% supervision of hardfork (*)
* 5% supervision of initial coordinated MPA revival after hardfork (*)

I expect the current witnesses to actively assist in the items marked with (*). It is their responsibility to maintain the operation of the chain, and ultimately it is their decision which version of bitshares-core they use to produce blocks. With the current price of BTS, witness pay should be sufficient reward for their efforts.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
seems you hired another fuck worker task
a core fork development even without code review and test.
you need to hired another fuck test worker and another review worker.
consider hire another fuck requirement worker
maybe a custom service worker.

blockchain fucker
Testers (other than myself) are not paid through the proposal, see http://www.bitshares.foundation/workers/2017-07-peter-conrad .
« Last Edit: October 03, 2017, 12:59:30 am by alt »

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
Please rethink your wording.

Code review is one of the responsibilities of Alfredo, our paid developer. In return, I have reviewed other contributions, and the hardfork includes a lot more than just bsip-18. The bsip-18 code has been reviewed by several other volunteers as well. It's all on github if you really care.
I think the shareholders are getting very good value for this worker.

My opinion about witness responsibilities have been expressed in the proposal from the beginning. The shareholders have approved this. I don't know what you're complaining about.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline Taconator

  • Newbie
  • *
  • Posts: 18
    • View Profile
seems you hired another fuck worker task
a core fork development even without code review and test.
you need to hired another fuck test worker and another review worker.
consider hire another fuck requirement worker
maybe a custom service worker.

blockchain fucker
Testers (other than myself) are not paid through the proposal, see http://www.bitshares.foundation/workers/2017-07-peter-conrad .

You must not have seen the units tests that were prepared by pc for this worker. In particular, see the completely new tests under swan_tests.cpp file, along with updates to existing tests in order to support the black swan revival.

Additionally, I do not think the words "fuck" and "fucker" means what you think it does. In this context it is both offensive and vulgar (and probably physically impossible). Surely, another word would be more appropriate.

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
A couple of days ago, [member=11]dannotestein[/member] alerted us to an issue in the P2P code that may have been causing problems to exchanges. It seems that nodes would get stuck for hours, conveying the impression that the blockchain was dead.
[member=120]xeroc[/member] backported a fix from STEEM into our codebase. The fix is currently being tested in testnet and will become part of the next master release.

The following witnesses (and others) have contributed to testing so far:

Code review (Github)
* [member=18687]abit[/member]
* Alfredo aka [member=43274]oxarbitrage[/member]
* [member=120]xeroc[/member]
* Several others ([member=6601]wackou[/member], [member=21490]Thom[/member], [member=34016]Taconator[/member], …)

Approvals so far
* [member=120]xeroc[/member]
* [member=5333]Fox[/member]
* iPerky aka [member=2186]iHashFury[/member]
* [member=350]Bhuz[/member]
* [member=43537]sahkan[/member]
* [member=43607]roelandp[/member]
* [member=18687]abit[/member]
* [member=6601]wackou[/member]
* [member=21490]Thom[/member] aka verbaltech2
* [member=7312]ElMato[/member]

I'm still hoping for an ACK from [member=21490]Thom[/member] , then I'll prepare the mainnet hardfork.

I'd suggest a hardfork date around end of November, that'd give everyone about 6 weeks to upgrade, which is plenty IMO.

Edit: added approvals from roelandp, abit, wackou, thom and elmato
« Last Edit: October 11, 2017, 06:44:39 pm by pc »
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline roelandp

  • Full Member
  • ***
  • Posts: 114
  • Witness, dad, kitesurfer, event organiser
    • View Profile
    • RoelandP.nl
  • BitShares: roelandp
  • GitHub: roelandp
This is great news. A hardfork around end of November would be timeframe of choice as well. thank you for all this work. Especially the p2p fix is a great last minute fix. Recently a steem network interruption on my node automatically caused to reconnect when network state returned normal. Bitshares behind the same router didn't and had to auto-switch to another failover node. Nonetheless the revival of black-swanned currencies will certainly help the platform further. Thank you, thank you. I approve the hardfork for sure!

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4471
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
I'm OK with the progress and the scheduled HF date range.
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline Brekyrself

  • Hero Member
  • *****
  • Posts: 511
    • View Profile
Thanks for the update PC.  Any know if this information was sent to Bittrex?  Could be why they are going to delist BTS on the 13th?

Offline pc

  • Hero Member
  • *****
  • Posts: 1530
    • View Profile
    • Bitcoin - Perspektive oder Risiko?
  • BitShares: cyrano
Thanks for the approvals, guys.

Any know if this information was sent to Bittrex?  Could be why they are going to delist BTS on the 13th?

According to [member=6]Stan[/member] bittrex has suffered from the problem. I don't know if that's the reason for the delisting though.

Exchanges will have be notified when the mainnet release is available. It might be a good idea to highlight that p2p fix in the release notes.
Bitcoin - Perspektive oder Risiko? ISBN 978-3-8442-6568-2 http://bitcoin.quisquis.de

Offline ElMato

  • Sr. Member
  • ****
  • Posts: 288
    • View Profile
Hi guys, as witness i agree with the changes and hardfork date