Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - theoretical

Pages: 1 ... 23 24 25 26 27 28 29 [30] 31 32 33 34
436
General Discussion / Re: Dry Run 16 - Armageddon ($5000 Bounty inside)
« on: August 19, 2014, 10:43:31 pm »
Here is what I am seeing:

Code: [Select]
default (unlocked) >>> blockchain_market_order_book USD XTS
                  BIDS (* Short Order)                                       |                                   ASKS                                 
TOTAL                     QUANTITY                                     PRICE | PRICE                                        QUANTITY                     TOTAL   COLLATERAL
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
27.6359 USD                                                     MARKET PRICE | 0.011363636364 USD                   88,000.00000 XTS              999.9999 USD
9,798.9999 USD            881,910.00000 XTS               0.011111111111 USD*| 0.100000000000 USD                  100,000.00000 XTS           10,000.0000 USD
9,999.9999 USD            1,200,000.00000 XTS             0.008333333333 USD*|
10,000.0000 USD           2,000,000.00000 XTS             0.005000000000 USD*|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                             |                                   MARGIN                                 
                                                                             | CALL PRICE                                   QUANTITY                     TOTAL   COLLATERAL
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                             | 0.008571428476 USD                1,050,000.00000 XTS            8,999.9999 USD   1,400,000.00000 XTS
                                                                             | 0.008571428476 USD                1,050,000.00000 XTS            8,999.9999 USD   1,400,000.00000 XTS
                                                                             | 0.008426966292 USD                1,335,000.00000 XTS            9,999.9999 USD   1,780,000.00000 XTS
                                                                             | 0.008426966292 USD                   13,349.99998 XTS               99.9999 USD   17,799.99998 XTS
                                                                             | 0.008426966292 USD                   13,350.00000 XTS               99.9999 USD   17,800.00000 XTS
                                                                             | 0.008389261745 USD                  134,100.00000 XTS              999.9999 USD   178,800.00000 XTS
                                                                             | 0.008333333333 USD                      135.00000 XTS                0.9999 USD   180.00000 XTS
                                                                             | 0.008333333333 USD                   27,135.00000 XTS              200.9997 USD   36,180.00000 XTS
                                                                             | 0.008241758242 USD                   13,650.00000 XTS               99.9999 USD   18,200.00000 XTS
                                                                             | 0.003787863636 USD                   13,200.00000 XTS               49.9998 USD   17,600.00000 XTS
Average Price in Recent Trades: 0.01109056481093343 USD / XTS     Maximum Short Price: 0.01478741974791124 USD / XTS     Minimum Cover Price: 0.00739370987395562 USD / XTS
Bid Depth: 4,081,910.00000 XTS     Ask Depth: 5,054,559.99999 XTS     Min Depth: 2,000,000.00000 XTS

Here are my questions:

- What is the 27.6359 USD in the top left?
- What is "minimum cover price"?

I'm checking the accounting.  I see that:

Code: [Select]
881910 + 1200000 + 2000000 = 4,081,910
1400000 + 1400000 + 1780000 + 17799.99998 + 17800 + 178800 + 180 + 36180 + 18200 + 17600 + 88000 + 100000 = 5,054,559.99999

So the Bid Depth is the sum of XTS Bid Quantity, and Ask Depth is sum of the total XTS Quantity of Ask orders plus total Collateral for Margin Call orders.  This fact should probably be documented somewhere.

437

Over the next two weeks, I'd like to work on documenting the blockchain format.  In particular, going from a block as a sequence of bytes; to fields with particular data types (uint32, hash); to semantic information about entities like accounts, balances, delegates, orders, and votes.  To keep the scope manageable, I'd like to limit my contribution to focusing on parsing the serialized blockchain.

I'll include information on the following:

- Byte-by-byte documentation of the serialized block format
- Constraints between various fields (e.g. the value in each block's parent block hash field must be equal to the value obtained by computing the hash of the serialization of the parent block).
- Reasons for design decisions
- Genesis-block parameters that can easily be tweaked
- Highlight major BitShares Toolkit features that either mimic features of other cryptocoins, or are different from other cryptocoins
- Describe in detail the implementation of high-level semantic nouns and verbs (e.g.:  What is a short position and how do you cover it?  How do we make TITAN transactions invisible?)

I'll post here with the Github URL when I start.

Also, since the bounty was posted before snapshot was taken, I'd like to ask if the bounty will include the BTSX spawned by the 500 PTS?

Hopefully this post satisfies the "scope and requirements" laid out in the opening post, and we can change from pending to active.

438
General Discussion / The mystery of the missing USD
« on: August 11, 2014, 12:35:50 am »
Just to see what would happen, I sent 15 USD to cover a short with only 10 USD of value.  The extra 5 USD seems to have disappeared!  What happened to it?  (Log attached, I edited it to only show relevant parts.)

EDIT:  This is on dry run 12 testnet.

I always thought:

- A short would be implemented by allowing an address to carry a negative USD balance, in which case (some portion of) the positive XTS balance representing the collateral would be locked to that address.
- Covering a short can be done by sending USD to the short address, if the wallet controls another address that has a positive USD balance.
- Covering a short can also be done by issuing a market order to buy USD for XTS, the order is allowed to use XTS from the collateral in proportion to the negative balance that would be erased.

I have some USD from a successful ask order, so I thought the wallet_market_cover command would simply send USD from one address's positive balance to erase another address's negative balance.  This is apparently not what happened, since my balance declined by 15 USD.

The USD disappearing makes no sense!

Code: [Select]
default (unlocked) >>> wallet_market_order_list USD XTS
TYPE        QUANTITY            PRICE                         BALANCE             COST                COLLATERAL          ID
================================================================================================================================
short_order 11,271.64557 XTS    0.0079 USD / XTS              11,271.64557 XTS    89.0460 USD         N/A                 XTS2886bmzNNa4ajh3o6eVvVYo9mc2Ca2RZF
cover_order 224.55088 XTS       0.00445288836098081 USD / XTS 0.9999 USD          0.9998 USD          299.40118 XTS       XTSFnFEATWvtgcpVoncesBWygRJ317EkgPEH
cover_order 22,455.08982 XTS    0.00445332888007125 USD / XTS 99.9999 USD         99.9998 USD         29,940.11976 XTS    XTSArZdx8nJayA8z4WrCQjE21mf5v5r7Y5ng
cover_order 189.87340 XTS       0.00526614049150644 USD / XTS 0.9999 USD          0.9998 USD          253.16454 XTS       XTS2886bmzNNa4ajh3o6eVvVYo9mc2Ca2RZF
cover_order 1,890.00000 XTS     0.00526666666666666 USD / XTS 9.9540 USD          9.9539 USD          2,520.00000 XTS     XTS2886bmzNNa4ajh3o6eVvVYo9mc2Ca2RZF
default (locked) >>> wallet_market_cover drltc 1 USD XTSFnFEATWvtgcpVoncesBWygRJ317EkgPEH
default (unlocked) >>> wallet_market_order_list USD XTS
TYPE        QUANTITY            PRICE                         BALANCE             COST                COLLATERAL          ID
================================================================================================================================
short_order 11,271.64557 XTS    0.0079 USD / XTS              11,271.64557 XTS    89.0460 USD         N/A                 XTS2886bmzNNa4ajh3o6eVvVYo9mc2Ca2RZF
cover_order 22,455.08982 XTS    0.00445332888007125 USD / XTS 99.9999 USD         99.9998 USD         29,940.11976 XTS    XTSArZdx8nJayA8z4WrCQjE21mf5v5r7Y5ng
cover_order 189.87340 XTS       0.00526614049150644 USD / XTS 0.9999 USD          0.9998 USD          253.16454 XTS       XTS2886bmzNNa4ajh3o6eVvVYo9mc2Ca2RZF
cover_order 1,890.00000 XTS     0.00526666666666666 USD / XTS 9.9540 USD          9.9539 USD          2,520.00000 XTS     XTS2886bmzNNa4ajh3o6eVvVYo9mc2Ca2RZF
default (unlocked) >>> wallet_market_cover drltc 15 USD XTS2886bmzNNa4ajh3o6eVvVYo9mc2Ca2RZF
default (unlocked) >>> wallet_account_transaction_history drltc USD 2 17000
 RECEIVED            BLOCK     FROM                TO                  AMOUNT                  MEMO                                        BALANCE                 FEE                 ID
================================================================================================================================================================================================
|2014-08-10T23:48:32 17286     drltc               COVER-FnFEATWv      1.0000 USD              payoff COVER-FnFEATWv                       0.0000 USD              0.00000 XTS         ae2f47b1|
|                              COVER-FnFEATWv      drltc               299.30118 XTS           cover proceeds                              299.30118 XTS                                       |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|2014-08-10T23:55:36 17327     drltc               COVER-2886bmzN      15.0000 USD             payoff COVER-2886bmzN                       0.0000 USD              0.00000 XTS         bb116fb6|
|                              COVER-2886bmzN      drltc               2,519.90000 XTS         cover proceeds                              2,819.20118 XTS                                     |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
default (unlocked) >>> wallet_market_order_list USD XTS
TYPE        QUANTITY            PRICE                         BALANCE             COST                COLLATERAL          ID
================================================================================================================================
short_order 11,271.64557 XTS    0.0079 USD / XTS              11,271.64557 XTS    89.0460 USD         N/A                 XTS2886bmzNNa4ajh3o6eVvVYo9mc2Ca2RZF
cover_order 22,455.08982 XTS    0.00445332888007125 USD / XTS 99.9999 USD         99.9998 USD         29,940.11976 XTS    XTSArZdx8nJayA8z4WrCQjE21mf5v5r7Y5ng
cover_order 189.87340 XTS       0.00526614049150644 USD / XTS 0.9999 USD          0.9998 USD          253.16454 XTS       XTS2886bmzNNa4ajh3o6eVvVYo9mc2Ca2RZF

439

RFC 3986 specifies reserved delimiters:

Code: [Select]
      gen-delims  = ":" / "/" / "?" / "#" / "[" / "]" / "@"

      sub-delims  = "!" / "$" / "&" / "'" / "(" / ")"
                  / "*" / "+" / "," / ";" / "="

I guess the idea is to include a reserved delimiter from this list, to have our domain names that deliberately violate RFC 3986 (and hence, will hopefully never exist in legacy DNS).

We need to select a character not used by popular applications.  Off the top of my head:

Code: [Select]
: is used by git, scp, and in proto:// syntax
/ is used in HTTP to indicate paths
? is used in HTTP to indicate query string
# is used to indicate an anchor in web browsers
@ is used by ssh and email

So here are the remaining possible delimiters:

Code: [Select]
[]!$&'()*+,;=

We probably want to stay away from things that might make quoting problematic, and grouping symbols probably won't look right.  Which leaves:

Code: [Select]
!$&*+

Maybe + or * is a better candidate than ! since + and * already have short words ("plus" or "star"), and visually delimit words.

440

How about inventing or re-purposing a new one-syllable word for the ! used in this context?  Here are some ideas I had:

- Swoosh
- Swish
- Nim
- Bit
- Rex
- Zen

441

A move to decentralized allocation of .com would be most successful if managed via an "airdrop" to current .com holders, if there was wide industry support.   

"Airdrop to current .com holders" is a technical problem.  I think I have a solution.

For this, I'll refer to "domains," "legacy domains" or "legacy DNS" as the mainstream technology most internet users currently use,
and "cryptomains" as the domains of some DNS replacement cryptocoin technology that attempts to airdrop to legacy
DNS domain owners.

So the goal is to give all (or almost all) legacy domain holders an airdrop of the corresponding cryptomain.  You need two things:
(1) An "inherited set" consisting of some big set of legacy domains, so they can't be registered unless you prove you own the legacy domain.
(2) Some way for current domain holders to prove their ownership and ("claiming your inheritance.")

To seed the inherited set before the genesis block:

- Obtain a list of domain names.  Common crawl [1] seems to be not under NDA, although it's hosted by a proprietary vendor (AWS).
Will probably need prefunding (in USD) to pay for AWS nodes to walk the data and extract domain names.
- Common crawl data is ~100TB, but most of that is content.  Verisign official .com database appears to be about ~2 GB [2].  So the per-node storage requirements for an airdrop to all existing .com domains would be reasonable.
- The base list is called the "crawl set."  This covers domains everybody knows about.  So google, yahoo, facebook, reddit, etc. will surely be included.
  No humans make decisions about what does or doesn't make the cut, and nobody at those companies has to be convinced to do anything special.  Most organizations
  that people actually care about will be included.

After the genesis block, the inherited set can be grown as follows:

- Any registered TITAN account can submit, for free, up to ~8 domains every ~24 hours, which will considered by the network for inclusion.  This makes up the "ping set."
- ~20 randomly selected delegates will ping each domain in the ping-set over ~60-day period by doing a DNS lookup (in legacy DNS) and seeing if it resolves.  We check the signature on the ping,
  and check that the delegate was the one randomly selected by the random process.  But the DNS lookup itself is not audited, because we don't want to DDOS anybody!  We just take the delegate's
  word for whether the domain worked or not.
- If >50% of the pings agree that the domain appears to exist, the domain is moved from the ping set to the launch set.
- Pings are initiated by ordinary users to make sure domains aren't inadvertently excluded.
- We may have a browser extension or DNS proxy, to aid in gathering domain names.
- ~8 months after launch, new pings can no longer be submitted.
- ~10 months after launch, the last pings are resolved and the inherited set is now fixed for eternity.

If you register a cryptomain, the process goes like follows:

- If the cryptomain is not in the inherited set, great!  You got your shiny new cryptomain.
- If you register a cryptomain in the inherited set, the registration will be ineffective until you prove ownership of the legacy domain.
- If your previously registered cryptomain gets at least 5 pings, with >50% success rate, at any point in time, the cryptomain will be suspended until either unsuccessful ping(s) bring the rate
  below 50%, or you prove ownership of the legacy domain.

You can prove ownership of the legacy domain by entering (the hash of) your account's public key in a TXT record in legacy DNS, and using that public key to pay a fee to the network.  ~200
randomly selected delegates check that the TXT record exists and contains the correct key over a ~60 day period.  If at least 20 such checks have been performed with greater than 90% success,
then you have successfully proven ownership of the legacy domain.

So basically:

- Holders of domains that were crawlable at the Common Crawl used to initialize the genesis block will have their domain reserved in the inherited set.
- Holders of domains that got / became popular enough that at least one user submitted them during ~8 months post-genesis will have their domain reserved in the inherited set.
- If you register a new cryptomain during the first ~8 months, you need to control the corresponding legacy domain to ensure the cryptomain won't be suspended.

The owners of ".com" would not want to give up their control and influence for nothing so they would have to be allocated a large stake in the new system.  But getting a government to agree to this is like getting the voting dac adopted by governments.

The beauty of an airdrop is that neither the ICANN administrators, nor the domain holders, need to consent ahead of time.  They're simply given a stake in the system that they can claim at anytime.

[1] http://commoncrawl.org/

[2] http://www.leandomainsearch.com/blog/16-how-to-get-access-to-the-official-verisign--com-zone-file

442

I'm using DACs Unlimited (DAC Sun Limited?).  Running on a fairly recent installation of Lubuntu 14.04.1 LTS on AMD64 under a dedicated user account.  The program segfaults every time with the same backtrace.

Things I've tried:

- Build single-threaded (no make -j4)
- Run single-CPU (taskset -c 0)
- Rebuild multiple times with make clean
- Remove "~/Bitshares X" directory
- git fsck on module and all submodules is OK
- Tried with latest mater / 673ff9327c9d0b3b4c7dfd9de7622a8663eee2ff
- Tried with 0.3.1 / 3448f7c8b64dbb578eef8eed5e3a6e32ed03e558

- I'm building with this command:

sh -c 'export PATH=$PATH:$(pwd)/programs/web_wallet/node_modules/.bin ; make clean && cmake -DINCLUDE_QT_WALLET=ON . && make buildweb && make BitSharesX'

Two non-standard things:  Letting the package install lineman locally, the script is in PATH due to above line.  I also symlinked /usr/bin/nodejs to programs/web_wallet/node_modules/.bin/node because the build process has at least one program that has a shebang that tries to execute "node".

This looks like a QT problem, a memory corruption problem, or maybe a compiler problem.  I'm using a stock libraries and compiler from Ubuntu LTS release, and I'm not sure why nobody else is encountering segfaults.

It ran fine in a Virtualbox VM with the exact same Ubuntu release.

GDB backtrace and list of installed qt libraries attached.  I see I have both qt4 and qt5 libraries, I'll check later if it's somehow trying to use both (which could certainly lead to problems).

Code: [Select]
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from programs/qt_wallet/BitSharesX...done.
(gdb) run
Starting program: /home/cc/btsx/src/bitsharesx/programs/qt_wallet/BitSharesX
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe5403700 (LWP 9569)]
Could not start new instance listener. Attempting to remove defunct listener... Success.
Listening for new instances on /tmp/BitShares X
[New Thread 0x7fffdb81e700 (LWP 9571)]
[New Thread 0x7fff9128b700 (LWP 9572)]
[New Thread 0x7fff8bbef700 (LWP 9573)]
[New Thread 0x7fff888ac700 (LWP 9574)]
512227ms th_a       ClientWrapper.cpp:74          initialize           ] config: {
  "rpc": {
    "enable": false,
    "rpc_user": "randomuser",
    "rpc_password": "c070351f5aff5565b8961324e274a8b2711eaf9046f6fbb040b0353b4b24677c",
    "rpc_endpoint": "127.0.0.1:0",
    "httpd_endpoint": "127.0.0.1:0",
    "htdocs": "./htdocs"
  },
  "default_peers": [
    "178.62.50.61:1776",
    "178.62.50.61:1777",
    "178.62.50.61:1778",
    "80.240.133.79:1776",
    "80.240.133.79:1777",
    "5.101.106.138:1777",
    "5.101.106.138:1778",
    "128.199.137.122:1776",
    "128.199.137.122:1777",
    "95.85.33.16:8764",
    "180.153.142.120:1777",
    "84.238.140.192:42577"
  ],
  "ignore_console": false,
  "logging": {
    "includes": [],
    "appenders": [{
        "name": "stderr",
        "type": "console",
        "args": {
          "stream": "std_error",
          "level_colors": [{
              "level": "debug",
              "color": "green"
            },{
              "level": "warn",
              "color": "brown"
            },{
              "level": "error",
              "color": "red"
            }
          ]
        },
        "enabled": true
      },{
        "name": "stdout",
        "type": "console",
        "args": {
          "stream": "std_out",
          "level_colors": [{
              "level": "debug",
              "color": "green"
            },{
              "level": "warn",
              "color": "brown"
            },{
              "level": "error",
              "color": "red"
            }
          ]
        },
        "enabled": true
      }
    ],
    "loggers": [{
        "name": "default",
        "parent": null,
        "level": "debug",
        "enabled": true,
        "additivity": false,
        "appenders": [
          "stderr"
        ]
      }
    ]
  },
  "delegate_server": "0.0.0.0:0",
  "default_delegate_peers": [
    "178.62.50.61:9988"
  ]
}
Loading config from: /home/cc/btsx/BitShares X/config.json
Initializing genesis state from built-in genesis file
Please be patient, this could take a few minutes.
Re-indexing database... [/]
Successfully re-indexed 0 blocks in 0 seconds.
[New Thread 0x7fff83984700 (LWP 9575)]
[New Thread 0x7fff82cc9700 (LWP 9576)]
[New Thread 0x7fff82486700 (LWP 9577)]
[New Thread 0x7fff81c85700 (LWP 9578)]
[New Thread 0x7fff8142d700 (LWP 9579)]
[New Thread 0x7fff80a2b700 (LWP 9580)]
[New Thread 0x7fff67c94700 (LWP 9581)]
[New Thread 0x7fff67493700 (LWP 9582)]
[New Thread 0x7fff66c92700 (LWP 9583)]
[New Thread 0x7fff66491700 (LWP 9584)]
[New Thread 0x7fff6567b700 (LWP 9585)]
[New Thread 0x7fff64e7a700 (LWP 9586)]
[New Thread 0x7fff4bfff700 (LWP 9587)]
[New Thread 0x7fff4945e700 (LWP 9588)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5db14d5 in deleteOwnedPtr<WebCore::QNetworkReplyWrapper> (ptr=0xe000100000000) at ../WTF/wtf/OwnPtrCommon.h:60
60 ../WTF/wtf/OwnPtrCommon.h: No such file or directory.
(gdb) bt
#0  0x00007ffff5db14d5 in deleteOwnedPtr<WebCore::QNetworkReplyWrapper> (ptr=0xe000100000000) at ../WTF/wtf/OwnPtrCommon.h:60
#1  clear (this=0x1e11340) at ../WTF/wtf/OwnPtr.h:119
#2  operator= (this=0x1e11340) at ../WTF/wtf/OwnPtr.h:81
#3  WebCore::QNetworkReplyHandler::finish (this=0x1e11330) at platform/network/qt/QNetworkReplyHandler.cpp:519
#4  0x00007ffff5daf280 in WebCore::QNetworkReplyHandlerCallQueue::flush (this=this@entry=0x1e11368)
    at platform/network/qt/QNetworkReplyHandler.cpp:249
#5  0x00007ffff5dafe91 in flush (this=0x1e11368) at platform/network/qt/QNetworkReplyHandler.cpp:243
#6  WebCore::QNetworkReplyHandlerCallQueue::push (this=0x1e11368,
    method=(void (WebCore::QNetworkReplyHandler::*)(WebCore::QNetworkReplyHandler * const)) 0x7ffff5db1350 <WebCore::QNetworkReplyHandler::finish()>) at platform/network/qt/QNetworkReplyHandler.cpp:215
#7  0x00007ffff5db079b in WebCore::QNetworkReplyWrapper::didReceiveFinished (this=0x1e11f30) at platform/network/qt/QNetworkReplyHandler.cpp:408
#8  0x00007ffff3f212a6 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007ffff4a025e4 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#10 0x00007ffff4a7ef59 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#11 0x00007ffff3f2222e in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007ffff76ebc8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff76f0e56 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff3ef9c2d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007ffff3efbe07 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007ffff3f46cd3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007ffff219de04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ffff219e048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ffff219e0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff3f4698c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ffff3ef896b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007ffff3eff0e1 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x000000000059fddb in main (argc=1, argv=<optimized out>) at /home/cc/btsx/src/bitsharesx/programs/qt_wallet/main.cpp:230
(gdb) quit
A debugging session is active.

Inferior 1 [process 9562] will be killed.

Quit anyway? (y or n)

Code: [Select]
# output of dpkg -l | grep libqt

ii  libqt4-declarative:amd64                    4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 Declarative module
ii  libqt4-network:amd64                        4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 network module
ii  libqt4-opengl:amd64                         4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 OpenGL module
ii  libqt4-script:amd64                         4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 script module
ii  libqt4-sql:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 SQL module
ii  libqt4-sql-mysql:amd64                      4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 MySQL database driver
ii  libqt4-sql-sqlite:amd64                     4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 SQLite 3 database driver
ii  libqt4-xml:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 XML module
ii  libqt4-xmlpatterns:amd64                    4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 XML patterns module
ii  libqt53d5:amd64                             5.0~git20130731-0ubuntu5               amd64        Qt 3D module
ii  libqt5clucene5:amd64                        5.2.1-8build1                          amd64        Qt 5 CLucene module
ii  libqt5concurrent5:amd64                     5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 concurrent module
ii  libqt5core5a:amd64                          5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 core module
ii  libqt5dbus5:amd64                           5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 D-Bus module
ii  libqt5designer5:amd64                       5.2.1-8build1                          amd64        Qt 5 designer module
ii  libqt5designercomponents5:amd64             5.2.1-8build1                          amd64        Qt 5 Designer components module
ii  libqt5gui5:amd64                            5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 GUI module
ii  libqt5help5:amd64                           5.2.1-8build1                          amd64        Qt 5 help module
ii  libqt5location5:amd64                       5.2.1-1ubuntu2                         amd64        Qt Location module
ii  libqt5location5-plugins:amd64               5.2.1-1ubuntu2                         amd64        Qt Location module - geolocation plugins
ii  libqt5network5:amd64                        5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 network module
ii  libqt5opengl5:amd64                         5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 OpenGL module
ii  libqt5opengl5-dev:amd64                     5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 OpenGL library development files
ii  libqt5positioning5:amd64                    5.2.1-1ubuntu2                         amd64        Qt Positioning module
ii  libqt5positioning5-plugins:amd64            5.2.1-1ubuntu2                         amd64        Qt Positioning module - position plugins
ii  libqt5printsupport5:amd64                   5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 print support module
ii  libqt5qml5:amd64                            5.2.1-3ubuntu15.1                      amd64        Qt 5 QML module
ii  libqt5quick5:amd64                          5.2.1-3ubuntu15.1                      amd64        Qt 5 Quick library
ii  libqt5quickparticles5:amd64                 5.2.1-3ubuntu15.1                      amd64        Qt 5 Quick particules module
ii  libqt5quicktest5:amd64                      5.2.1-3ubuntu15.1                      amd64        Qt 5 Quick Test library
ii  libqt5sensors5:amd64                        5.2.1+dfsg-2ubuntu2                    amd64        Qt Sensors module
ii  libqt5sensors5-dev                          5.2.1+dfsg-2ubuntu2                    amd64        Qt 5 Sensors development files
ii  libqt5sql5:amd64                            5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 SQL module
ii  libqt5sql5-sqlite:amd64                     5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 SQLite 3 database driver
ii  libqt5test5:amd64                           5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 test module
ii  libqt5webkit5:amd64                         5.1.1-1ubuntu8                         amd64        Web content engine library for Qt
ii  libqt5webkit5-dbg:amd64                     5.1.1-1ubuntu8                         amd64        Web content engine library for Qt - debugging symbols
ii  libqt5webkit5-dev                           5.1.1-1ubuntu8                         amd64        Web content engine library for Qt - development files
ii  libqt5widgets5:amd64                        5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 widgets module
ii  libqt5xml5:amd64                            5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 XML module
ii  libqtcore4:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 core module
ii  libqtdbus4:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 D-Bus module library
ii  libqtgui4:amd64                             4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 GUI module

443
General Discussion / Re: Repo location
« on: April 07, 2014, 10:12:40 pm »

What's up with invictusinnovations/bitshares then?  There are people committing to that one too.  It seems to have a bunch of junk related to email, chat and Keyhotee ID (about which I filed an issue [1] but it was ignored).

[1] https://github.com/InvictusInnovations/BitShares/issues/66

444
General Discussion / Re: drltc's Trustee Technical Discussion Thread
« on: April 04, 2014, 11:29:44 pm »

reordering .... this particular issue is not possible, because orders are sorted/matched deterministically...

My picture of the market is as follows:

0. Create a list called the "book," initially empty.  Create another list called the "input", fill it with all the orders in the block.  Create a third list called "output", initially empty.

1. Insert the next order from the input into the book.  If no input is available, stop.

2. If the best bid and best ask in the book overlap, go to step 3.  Otherwise, go to step 1.

3. Match a bid order and an ask order in the book.

4. Put the resulting trade in the output list.

5. Subtract the filled quantity from the quantity field of both orders.

6. Remove any order with zero quantity from the book.

7. Go to step 2.

In this picture, it seems the word "determinstic" must mean "the specification prescribes a particular way to choose which bid and ask order to match in step 3," since that is the only ambiguous step in the algorithm.  It is not exactly clear what is "sorted."  In particular, the word "sorted" may refer to the fact that a data structure that maintains sorted order, such as a red-black tree, is a convenient way to implement the book.

My point was that a new step should be added between steps 0 and 1 which sorts the input.  Otherwise, manipulation may be possible.

Also, I'd like to point out that reordering is an example of the general concept of "malleability," which means "a method of transforming a transaction or block that preserves its validity but changes its semantics."  Of course the infamous Bitcoin transaction malleability would be another example.  Malleability in general is bad; protocol designers should strive to avoid malleability.

445
General Discussion / Re: drltc's Trustee Technical Discussion Thread
« on: April 04, 2014, 11:06:31 pm »
Lets address the issues here:

1) front running ... this particular issue does not apply given my matching algorithm.  The person placing the order will get the same price regardless of what any other party does.   In fact, one could argue that the blockchain earns revenue by intentional front-running and that the shareholders are the ones to benefit from it.   

Suppose every buyer wants to maximize the probability that their order is filled, subject to the constraint that the price is less than HPBWP (Highest Price Buyer Is Willing To Pay).  Obviously, a buyer can achieve these goals by setting a bid price equal to HPBWP.

However, the person who assembles the block might have a better option which achieves the same goals.  Since they know all other transactions in the block, they can compute exactly where in the order their transaction will be.  They can then compute the best Ask price at that point in the sequence, and set their order to that price (Best Ask At Time Of Execution or BAATOE).

There is value in the spread HPBWP - BAATOE.  One goal of BitShares X is to capture this value and return it to shareholders.  If the person who assembles the block has the capability to input their own transaction as the last transaction in the block, they can effectively circumvent the capture mechanism and extract the value for themselves.

My solution is a protocol design which requires all transactions to be signed by several randomly chosen notaries to be included in a block.  Thus a single notary or a small group of colluding notaries cannot perform the above attack.


446
General Discussion / Re: Board of Directors vs Mining Pool Operators
« on: April 03, 2014, 02:26:22 am »
I have a bunch of technical analysis of the new changes, which I've placed in my thread starting at reply #24; here is the link: https://bitsharestalk.org/index.php?topic=3895.msg50062#msg50062

Here's the high-level overview:  I had serious doubts about the voting process, and I made a strong technical case for randomly selecting the representatives.  However, bytemaster's proposal in this thread incorporates enough of my ideas that I think it's basically secure, and I'm willing to support it.  However, there are a few possible abuses I want to keep out of the BitShares X market, in particular:  Transaction censorship, private placement, front-running, and re-ordering.

If you want the full technical details of what I'm proposing, you can read my thread.  But here's an overview:  The board of directors still takes turns in a round-robin manner signing blocks.  You can think of the node whose turn it is to sign blocks as the "president" or "chairman."  If the protocol isn't carefully designed, the chairman would have a lot of power.  Since our blockchain contains an entire market, the chairman has a variety of ways to abuse his position:  He can make a transaction that exactly matches the best bid/ask (front-running), drop (censor) or re-order transactions because they move the price in a way that would be inconvenient for the chairman's own investments, or include a transaction that wasn't publicly broadcast (private placement).  Worse, the chairman might choose to re-sell these valuable capabilities to others in exchange for votes to stay in office.

My solution is basically appointing a random subset of the board as a committee, which decides by secret ballot which transactions to include in the next block.  The chairman still publishes the next block, but he can no longer add or remove whatever transactions he wants.  With my modifications, the chairman must accept the committee's product, or resign his position.  It is also hard for the committee to arrange collusion with each other, because they are randomly chosen.  The chairman can't falsely claim there's no quorum when the committee votes against his interests, because he must agree that there is a quorum before the secret ballot is revealed.

447
General Discussion / Re: drltc's Trustee Technical Discussion Thread
« on: April 03, 2014, 01:46:50 am »

Therefore, I am expecting the same kind of behavior from users of BTS X except instead of having to point their hashing power at a pool, they merely change a setting in their wallet.  This setting can even be setup with a chain of command so that users do not have to think much about it.  Instead of only miners voting, everyone can vote.

I wonder if "chain of command" means the concept I've been calling "transitive proxies."  By "transitive proxy" I mean a relationship where you can assign someone to vote on your behalf, and they can assign someone to vote on their behalf, et cetera.  It seems like a good idea because it lets small shareholders delegate their votes to someone they personally know and trust, who has a better grasp of the issues and responsibilities of voting, and perhaps spends more time following the BitShares world.  That person in turn can delegate their votes to someone they know and trust.  So everyone deals with people they know who can explain things, those to whom responsibility is dedicated often have a finite number of persons to please or persuade, and small shareholders can pass off the responsibility to stay informed and be available.

There are two potential problems with transitive proxies:  Cycles and long chains.

For example, say Eve has N small addresses with tiny balances.  If she combines them into a single large chain, she might be able to cause every node to do O(N^2) computation using O(N) transactions.  E.g. maybe she repeatedly creates a new address and tells it to delegate to the first address in her chain.  Then each added address requires walking all the way to the end of the chain to discover where the votes end up.

If try to fix the above problem by adding a field to the data structure to keep track of the ultimate destination where everyone's votes end up, then a chain built in the other direction becomes just as problematic.  So if Eve creates a new chain by always telling the last node to delegate to a different address, then changing the last node's delegation requires the ultimate destination of all prior nodes in the chain to be changed.

Okay, maybe we should just forbid long chains?  In that case, Eve can actually block a level 1 node from becoming a level 2 node by attaching a chain just under the length limit to it.  You might suppose the proper thing to do, then, is to allow the level-1 node to transition to level 2, and just cut off the now-too-long chain where it bumps against the length limit.  But this doesn't work either; if Eve is a level 1 node with followers, she can change from level 1 to level L-k by delegating to a chain of her own addresses, cutting off links between nodes further down the chain.  However, this may not be a problem.  It reduces Eve's vote total, reducing her influence on the network; the mischief she causes by causing the connections to be broken is less than she's costing herself to perform the attack.  In addition, now there's a public record that Eve's the sort of person who jumps levels, and should be obvious if the chain Eve's jumped to is a bunch of sock puppet accounts with tiny balances delegating to each other.

448
General Discussion / Re: drltc's Trustee Technical Discussion Thread
« on: April 03, 2014, 01:15:25 am »

I have spent the past several posts applying my previous thoughts to the political election proposed here:  https://bitsharestalk.org/index.php?topic=3955.0   In this post I will discuss a problem unique to that proposal which has a simple solution.

Lack of quorum situations can arise depending on the wealth distribution.  If 1% of all outstanding XTS is required to be a trustee / notary / representative ("notary" in this post), but there are 200 people with exactly equal balances of 0.5% XTS who all vote for themselves, then nobody is eligible to be a notary.  If the network is designed to require at least one notary to be online in order to operate, this is a problem.

I propose instead fixing the number of notaries NOTARY_COUNT (~32?  64?), then selecting the NOTARY_COUNT eligible candidates with the greatest vote total.  An "eligible candidate" meets the requirements for office:  So far, the only established requirement is publishing a transaction posting a bond.  To this I would add you must not have been an active notary for at least 72 hours (this should prevent oscillating when two candidates with frequently changing vote totals are nearly tied for last place).

449
General Discussion / Re: drltc's Trustee Technical Discussion Thread
« on: April 03, 2014, 12:31:11 am »

This post discusses an algorithm for choosing a proposer set randomly.  I suggest ordering the notaries by sorting with H(H(shiftreg) + H(notary_pubkey)) as
the sort key.  The value shiftreg contains the low bit from the last 128 hashes.  If we used the hash of the previous block instead, then a number of colluding
notaries might fall early in the order by chance.  Then they would be able to front-run the next block and manipulate the next block's hash at will.  They
could then "mine" a block hash that results in a favorable ordering for the *next* block hash, and maintain control for multiple blocks.  This attack would
leave irrefutable statistical evidence after a time.  But shiftreg is a trivial modification that makes it much harder for this attack to maintain control for several blocks:
If the colluders by luck obtain a favorable ordering, they can still front-run the next block and manipulate its hash, but they can only choose from two
possible orderings for the next block; unless the colluding group is very large, there will be a very high probability that neither choice allows them to
maintain control.  I call this attack the "notary ordering selection attack."

The proposer set is just the first TXSET_QUORUM notaries in the ordering; any that fail are replaced by the next ones in the ordering.

450
General Discussion / Re: drltc's Trustee Technical Discussion Thread
« on: April 03, 2014, 12:28:35 am »

Front-running and transaction censorship via selective deafness are problems with both random notary selection and political voting.  The solution I proposed for randomly selected notaries
in this post https://bitsharestalk.org/index.php?topic=3895.msg49007#msg49007 involves generating txsets.  In this post, I will develop a similar alternative protocol to fit better with a
political voting design.  This protocol implements the following restrictions on notaries:
(1) Avoid giving a notary exclusive power to decide which transactions will be included ("transaction censorship"),
(2) Avoid giving a notary the ability to include non-public transactions ("private placement"),
(3) Forbid a notary from inserting a transaction at the last moment ("front-running").

The new protocol is a simple variation of my previously proposed txset protocol.  Rather than have randomly chosen nodes propose txsets, have notaries propose
txsets.  Additionally, since notaries are more reliable than randomly chosen ordinary nodes, use a commitment protocol instead of a simple broadcast, so blind
to the transactions that are included.

The "primary notary" is the notary that is supposed to produce the next block.

First, we choose a set of notaries that participate in choosing the transactions for the next block.  Call this set the "proposer set."  If the members of
the proposer set collude with each other, they will be able to perform transaction censorship, private placement and front-running.  A larger set will
increase security by increasing the amount of collusion necessary for a successful attack, but also has a cost of increased blockchain storage.  I will
discuss how to reduce the size of the proposer set in a future post, but an easy and secure way to choose the proposer set is the maximal choice:  Simply
put every notary except the primary notary in the proposer set.

The size of the proposer set is TXSET_QUORUM for consistency with my previous posts.  Each proposer signs and broadcasts a txset commitment hash, which
is simply the Merkle root hash of a nonce (chosen randomly locally) and the list of hashes of transactions the proposer believes ought to be included
in the block.  However, proposers do not immediately broadcast the transaction list used to create the txset commitment hash!  After receiving the
txset commitment hash, the notary issues a block commitment.  The block commitment is a signed hash of all the txset commitment hashes for the txsets
that will be included in the block.  Once a proposer receives a block commitment from the primary notary, it broadcasts ("reveals") the txset contents
and nonce corresponding to its previous commitment.  The block can be validated when all proposers' block commitments are revealed.  Finally,
the primary notary signs the block one last time, which finalizes it.

I've left out descriptions of the timeouts necessary to deal with offline notaries in the above protocol.  But basically, whenever one or more of the notaries
doesn't respond and appears to be offline, the algorithm should replace the offline node(s) by the next available node(s) and restart from the top.
Timeout implementation considerations are the rationale behind the finalization step.  Finalization is really a barrier to avoid a race condition
where all proposers reveal, but the timeout expires before the reveals reach the primary notary (perhaps one or more of the proposers is slow).  The
protocol restarts with a new proposer set that doesn't include the slow members of the previous proposer set.  All the reveals from the original proposer
set might reach some nodes, which would be able to put together a complete block; meanwhile the notaries have started working on a different block,
and that information might not have gotten very far.  The nodes that have received all the reveals can assemble them into a complete block, but it
won't be able to proceed without the finalization signature.  This is a "fork", but a very limited one:  The wrong branch will never grow beyond
a single block; clients understand that the block is not yet immutable, the transactions therein still pending.

Pages: 1 ... 23 24 25 26 27 28 29 [30] 31 32 33 34