Git Product home page Git Product logo

graphene's People

Contributors

abitmore avatar bytemaster avatar chronoscrypto avatar clayop avatar emfrias avatar erkan-yilmaz avatar maqifrnswa avatar matzfan avatar nathanielhourt avatar pmconrad avatar ryanrfox avatar svk31 avatar theoreticalbts avatar troglodactyl avatar vikramrajkumar avatar vor0220 avatar wackou avatar xeroc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graphene's Issues

Transfer Whitelist / Reputation to a new account name.

A user should be able to transfer their white list permissions to a new account name without consulting with all of the individual white list authorities. This is slightly more work for the authorities because they will have to scan the database and update their records when they see this transfer operation.

Only transfer and not copy. Some Web of Trust implementations may imply uniqueness.

How does this impact voting applications?

FC's safe multiplication...isn't.

Class fc::safe has following specification:

*  This type is designed to provide automatic checks for
*  integer overflow and default initialization. It will
*  throw an exception on overflow conditions.

And then defines this multiplication operator:

safe& operator *= ( safe v ) { value *= v.value; return *this; }

I'm pretty sure this operator implementation is not compliant with the class spec.

Vesting vs Non-Vesting Fees

Only fees above a certain threshold defined by consensus must vest. This means that in practice only the following fees require vesting:

  1. Premium Name Registration
  2. Lifetime and Annual Memberships
  3. Large Data Transactions
  4. Symbol Name Registration

Other fees (transfers, market orders, etc) will be below the threshold and thus vest immediately.

Cleanup and finish advanced UIA features

current code somewhat matches original bitshares advanced uia attempt and can be improved

e.g. whitelist handling can be streamlined more

also explicitly handle that there are at least 3 different asset types in the system: core, uia, and mia

Also need to figure out UIA retraction

Define Default Special Accounts

  1. Genesis Account ( no owner authority, active authority set to weighted approval voting of stakeholders) - this account has the special ability to propose changes to blockchain parameters with 2 week delay
  2. Witness Account - no owner, active set to currently elected witnesses
  3. Delegate Account - no owner, active set to currently elected delegates, no delay on actions, but no special permissions
  4. Temp Account - no owner, no active, balance must be 0 after every transaction. This can be used as the fee payer in certain circumstances.
  5. Burn Account (no owner or active keys, funds sent here can never be moved)

is_valid_name() is not RFC 1035 compliant

RFC 1035 specifies the following format for domain names:

<domain> ::= <subdomain> | " "
<subdomain> ::= <label> | <subdomain> "." <label>
<label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]
<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
<let-dig-hyp> ::= <let-dig> | "-"
<let-dig> ::= <letter> | <digit>

This is much different from the algorithm implemented in is_valid_name().

We need:

  • A unit test for only this specific function, verifying it produces the correct result for many examples of valid and invalid names.
  • An unambiguous specification in the form of BNF rule(s), state machine diagram(s) and/or regular expression(s).

market subscription results differ from get_short_orders/get_limit_orders

The results from a market subscription return a very different object for the same order type compared to the get_short_orders and get_limit_orders calls, there might be a reason for this but would it be possible to harmonise them to use the same structures?

get_limit_orders 1.4.1 1.4.0 1:
[{
    "id": "1.8.3",
    "expiration": "2015-06-13T19:24:54",
    "seller": "1.3.11",
    "for_sale": 9791100,
    "sell_price": {
      "base": {
        "amount": 9900000,
        "asset_id": "1.4.0"
      },
      "quote": {
        "amount": 10000,
        "asset_id": "1.4.1"
      }
    }
  }]

market sub result:

[[1, {
   "amount_to_sell": {
      "amount": 5, 
      "asset_id": "1.4.0"
   },
   "expiration": "2020-01-01T00:00:00",
   "fee": {
      "amount": 0, 
      "asset_id": "1.4.0"
   },
   "fill_or_kill": false,
   "min_to_receive": {
      "amount": 800, 
      "asset_id": "1.4.1"
   },
   "seller": "1.3.11"
}]
,[1,"1.8.1"]]

Where should we put specifications?

In particular, I have written this file: https://gitlab.bitshares.org/dlarimer/graphene/blob/64fdf24e4526d0c5f84e2397ec40ee7eaf6d9145/doc/witness-rng.md

This is a normative specification of how the witness scheduler's RNG works. Anyone should be able to independently implement the RNG based on this document.

It does not seem to belong in a doc comment on the witness scheduler class, as the doc comment is deeply tied to the names of methods and other implementation details. The spec is at a higher level of abstraction than our particular implementation.

It does not seem to belong in its current home in the doc/ subdirectory of this repo, because things were moved away from there in the past (see e.g. 32c8f8ca9e7933cc3197d5172c96fcb8e1ceb561).

It does not seem to belong in https://github.com/graphene as that repo seems to be dedicated to stuff at the "marketing layer," like blog posts. This file is quite clearly highly specific technical documentation.

I am not aware of any other places we are currently putting documentation. So please figure out where this file belongs and put it there. In addition, please include a URL of the new location in the commit message or this ticket.

market history

As far as I can tell there's no api call to get the market history for a given market. We'll need this to construct price history charts in the GUI and to display the order history.

Update Blackswan Handling

After short orders were removed, this needs to be updated:

  1. All margin positions are force closed at the swan price
  2. Collateral received goes into a force-settlement fund
  3. No new margin positions can be created for this asset
  4. No more price feed updates
  5. Force settlement happens without delay at the swan price, deducting from force-settlement fund
  6. No more asset updates may be issued.

Add receiver name to transfer operation

This name would allow users to "send to a name" without having to fear being cheated by a light wallet server doing a bad name->id resolution. This validation could be skipped by everyone but witness nodes and could be performed as a pre-check (only on propagation of the transaction) because the name/id mapping cannot be changed.

The only "con" with this approach is it would increase the size of a transfer operation.

This fits in with the philosophy of including any assumed or implied state in the transaction.

This same technique could be used for any operation where it is assumed an asset is changing owners:

account_transfer
transfer
others??

fork_database errors after running testnet

After running a one-node testnet for a couple days, I see a console filled with errors like this:

1350002ms th_a       witness.cpp:171               block_production_loo ] slot: 12135 scheduled_witness: 1.7.5 scheduled_time: 2015-06-11T14:22:30 now: 2015-06-11T14:22:30 
1350002ms th_a       witness.cpp:174               block_production_loo ] Witness 1.7.5 production slot has arrived; generating a block now...
1350004ms th_a       db_block.cpp:95               push_block           ] new_block.id(): 000047f68cc2fcfb8a73c61159c2ad5c2e30b578 new_block.previous: 000047f50b1a4d42b7628765c71ffefaf00b6b6d 
1350004ms th_a       witness.cpp:193               block_production_loo ] Got exception while generating block:
10 assert_exception: Assert Exception
itr != _index.get<block_id>().end(): 
    {}
    th_a  fork_database.cpp:51 push_block

    {"new_block":{"previous":"000047f50b1a4d42b7628765c71ffefaf00b6b6d","timestamp":"2015-06-11T14:22:30","witness":"1.7.5","next_secret_hash":"36bf2d457e392647d4ac0eae019759b085ac7108ac81aa9323150bbe","previous_secret":"c030935fe20354343fce9032499e8b2d9cb646235a9d2588c557e26c","transaction_merkle_root":"0000000000000000000000000000000000000000","extensions":[],"delegate_signature":"2060cf93a8e14a07e911989ffd09bbc06bd40a6c2d9c2a4a6207ee11054482db621166b8774c17b6e0178fe11e503a611717913a41f7c54d95ff4f8633115abf11","transactions":[]}}
    th_a  db_block.cpp:180 push_block

    {"witness_id":"1.7.5"}
    th_a  db_block.cpp:287 generate_block

I have witness_node_data_dir for this if it might contain useful info. (No logs, unfortunately.)

API call to get all accounts whitelisted by a particular account

Currently white lists are tracked on the account that is being whitelisted rather than the accounts that re doing the whitelisting. We need to maintain a reverse index to facilitate a user interface that enables exchanges to enumerate their white list.

For now the exchange user interface can simply have a form that allows them to check to see if an account is white listed and either add/remove them.

create vesting balance objects with various policies

Currently the manually created VBO operation doesn't allow the user to specify a policy. This should be changed to allow the policy to be specified.

Add a VBO policy that has an absolute time at which it becomes 100% vested and otherwise 0% vested.

These objects can be useful for companies wishing to IPO on a blockchain but where they don't want investors to have instant liquidity that competes against other attempts to sell IPO funds.

Complete Genesis Initialization

Define a JSON format for the complete genesis state, sufficient to launch as a smooth upgrade from BitShares. Implement loading of this genesis state into the object graph, and test building a chain off of that initialization complete with transactions which claim genesis stakes, transfer assets, etc.

Need to make sure that account withdrawals work for imported PTS and BTC addresses in addition to BTS addresses.

database_fixture is ripe for refactoring

Here are the problems with database_fixture:

  • Reliance on macros makes single stepping through tests difficult with GDB.
  • "trx" object being modified by macros makes it effectively a global variable. Functions / macros use trx for both input and output.
  • Many methods in .hpp could be moved to .cpp file, speed compiling, iterative development of new database_fixture method doesn't need to recompile every test .cpp file (as long as signature in header doesn't change)
  • Poor naming conventions in some places (e.g. genesis_account should be genesis_account_id)

Split configurable account options into a struct

The account object needs to have a struct of user-changeable options (like assets do) and account_update_operation should contain this struct.

The objective here is to split the configurable fields on account object into a separate struct, which can be validated on its own and updated wholesale. This means that the account_create_operation and account_update_operation formats will change, making it a hard fork. In return for this, we get code simplicity and efficiency, as more validity checks can be performed statically in validate() without needing chain state, and updating the account is a simple copy of a struct rather than a long series of convoluted invariant checks based on which optionals may or may not be set, and then updating fields based on the optionals.

The struct definition and changes to the operations MUST be finished by launch, at which point this issue is no longer hard-forking but merely a refactor. Storing the options separately in the account object can be deferred as it is not a hard-forking change, but we should aim to have it done by launch anyways.

Rework init_genesis

  • Allow creation of allocation targets with name and key explicitly specified
  • Include initial chain parameters in genesis
  • Initial set of committee members/delegates

Compilation error

Running make after cmake brings up this error in Ubuntu 14.04 LTS

Scanning dependencies of target leveldb
[ 0%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/version_set.cc.o
[ 0%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/log_reader.cc.o
[ 1%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/table_cache.cc.o
[ 1%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/memtable.cc.o
In file included from /home/vor0220/graphene/libraries/leveldb/util/arena.h:9:0,
from /home/vor0220/graphene/libraries/leveldb/db/skiplist.h:33,
from /home/vor0220/graphene/libraries/leveldb/db/memtable.h:11,
from /home/vor0220/graphene/libraries/leveldb/db/memtable.cc:5:
/home/vor0220/graphene/libraries/leveldb/db/memtable.cc: In member function ‘void leveldb::MemTable::Add(leveldb::SequenceNumber, leveldb::ValueType, const leveldb::Slice&, const leveldb::Slice&)’:
/home/vor0220/graphene/libraries/leveldb/db/memtable.cc:104:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
assert((p + val_size) - buf == encoded_len);
^
[ 2%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/filename.cc.o
[ 2%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/db_impl.cc.o
[ 2%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/log_writer.cc.o
[ 3%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/c.cc.o
[ 3%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/builder.cc.o
[ 4%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/dbformat.cc.o
[ 4%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/repair.cc.o
[ 4%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/db_iter.cc.o
[ 5%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/dumpfile.cc.o
[ 5%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/write_batch.cc.o
[ 6%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/db/version_edit.cc.o
[ 6%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/helpers/memenv/memenv.cc.o
[ 6%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/table/two_level_iterator.cc.o
[ 7%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/table/format.cc.o
[ 7%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/table/block.cc.o
[ 8%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/table/block_builder.cc.o
[ 8%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/table/merger.cc.o
[ 8%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/table/table_builder.cc.o
[ 9%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/table/table.cc.o
[ 9%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/table/filter_block.cc.o
[ 10%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/table/iterator.cc.o
[ 10%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/testharness.cc.o
[ 10%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/coding.cc.o
[ 11%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/arena.cc.o
[ 11%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/env_win.cc.o
[ 12%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/env_posix.cc.o
[ 12%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/status.cc.o
[ 12%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/comparator.cc.o
[ 13%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/cache.cc.o
[ 13%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/hash.cc.o
[ 14%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/options.cc.o
[ 14%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/env.cc.o
[ 14%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/filter_policy.cc.o
[ 15%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/bloom.cc.o
/home/vor0220/graphene/libraries/leveldb/util/bloom.cc: In member function ‘virtual void leveldb::{anonymous}::BloomFilterPolicy::CreateFilter(const leveldb::Slice_, int, std::string_) const’:
/home/vor0220/graphene/libraries/leveldb/util/bloom.cc:50:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < n; i++) {
^
[ 15%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/logging.cc.o
/home/vor0220/graphene/libraries/leveldb/util/logging.cc: In function ‘bool leveldb::ConsumeDecimalNumber(leveldb::Slice_, uint64_t_)’:
/home/vor0220/graphene/libraries/leveldb/util/logging.cc:58:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare](v == kMaxUint64/10 && delta > kMaxUint64%10)) {
^
[ 16%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/histogram.cc.o
[ 16%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/testutil.cc.o
[ 16%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/util/crc32c.cc.o
[ 17%] Building CXX object CMakeFiles/leveldb.dir/libraries/leveldb/port/port_posix.cc.o
Linking CXX static library libleveldb.a
[ 17%] Built target leveldb
Scanning dependencies of target udt
[ 18%] Building CXX object libraries/fc/vendor/udt4/CMakeFiles/udt.dir/src/api.cpp.o
[ 18%] Building CXX object libraries/fc/vendor/udt4/CMakeFiles/udt.dir/src/buffer.cpp.o
[ 18%] Building CXX object libraries/fc/vendor/udt4/CMakeFiles/udt.dir/src/cache.cpp.o
[ 19%] Building CXX object libraries/fc/vendor/udt4/CMakeFiles/udt.dir/src/ccc.cpp.o
[ 19%] Building CXX object libraries/fc/vendor/udt4/CMakeFiles/udt.dir/src/channel.cpp.o
[ 20%] Building CXX object libraries/fc/vendor/udt4/CMakeFiles/udt.dir/src/common.cpp.o
[ 20%] Building CXX object libraries/fc/vendor/udt4/CMakeFiles/udt.dir/src/core.cpp.o
[ 20%] Building CXX object libraries/fc/vendor/udt4/CMakeFiles/udt.dir/src/epoll.cpp.o
[ 21%] Building CXX object libraries/fc/vendor/udt4/CMakeFiles/udt.dir/src/list.cpp.o
[ 21%] Building CXX object libraries/fc/vendor/udt4/CMakeFiles/udt.dir/src/md5.cpp.o
[ 22%] Building CXX object libraries/fc/vendor/udt4/CMakeFiles/udt.dir/src/packet.cpp.o
[ 22%] Building CXX object libraries/fc/vendor/udt4/CMakeFiles/udt.dir/src/queue.cpp.o
[ 22%] Building CXX object libraries/fc/vendor/udt4/CMakeFiles/udt.dir/src/window.cpp.o
Linking CXX static library libudt_debug.a
[ 22%] Built target udt
Scanning dependencies of target easylzma_static
[ 22%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/pavlov/BraIA64.c.o
[ 23%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/pavlov/Bcj2.c.o
[ 23%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/pavlov/Bra.c.o
/home/vor0220/graphene/libraries/fc/vendor/easylzma/src/pavlov/Bra.c: In function ‘SPARC_Convert’:
/home/vor0220/graphene/libraries/fc/vendor/easylzma/src/pavlov/Bra.c:107:25: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
if (data[i] == 0x40 && (data[i + 1] & 0xC0) == 0x00 ||
^
[ 23%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/pavlov/Bra86.c.o
[ 24%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/pavlov/LzmaEnc.c.o
/home/vor0220/graphene/libraries/fc/vendor/easylzma/src/pavlov/LzmaEnc.c: In function ‘LzmaEnc_Alloc’:
/home/vor0220/graphene/libraries/fc/vendor/easylzma/src/pavlov/LzmaEnc.c:1916:8: warning: variable ‘btMode’ set but not used [-Wunused-but-set-variable]
Bool btMode;
^
[ 24%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/pavlov/7zStream.c.o
[ 25%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/pavlov/LzmaLib.c.o
[ 25%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/pavlov/7zBuf.c.o
[ 25%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/pavlov/7zFile.c.o
[ 26%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/pavlov/7zBuf2.c.o
[ 26%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/pavlov/Alloc.c.o
[ 27%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/pavlov/LzmaDec.c.o
[ 27%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/pavlov/7zCrc.c.o
[ 27%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/pavlov/LzFind.c.o
[ 28%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/lzma_header.c.o
[ 28%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/lzip_header.c.o
[ 29%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/compress.c.o
[ 29%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/decompress.c.o
[ 29%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/lzma_c.c.o
[ 30%] Building C object libraries/fc/vendor/easylzma/src/CMakeFiles/easylzma_static.dir/common_internal.c.o
Linking C static library libeasylzma_static_debug.a
[ 30%] Built target easylzma_static
Scanning dependencies of target fc
[ 31%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/rpc/state.cpp.o
[ 31%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/uint128.cpp.o
[ 31%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/real128.cpp.o
[ 32%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/variant.cpp.o
[ 32%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/exception.cpp.o
[ 33%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/variant_object.cpp.o
[ 33%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/thread/thread.cpp.o
[ 33%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/thread/thread_specific.cpp.o
[ 34%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/thread/future.cpp.o
[ 34%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/thread/task.cpp.o
[ 35%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/thread/spin_lock.cpp.o
[ 35%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/thread/spin_yield_lock.cpp.o
[ 35%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/thread/mutex.cpp.o
/home/vor0220/graphene/libraries/fc/src/thread/mutex.cpp: In destructor ‘fc::mutex::~mutex()’:
/home/vor0220/graphene/libraries/fc/src/thread/mutex.cpp:18:16: warning: unused variable ‘c’ [-Wunused-variable]
context* c = m_blist;
^
[ 36%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/thread/non_preemptable_scope_check.cpp.o
[ 36%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/asio.cpp.o
[ 37%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/string.cpp.o
[ 37%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/shared_ptr.cpp.o
[ 37%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/time.cpp.o
[ 38%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/utf8.cpp.o
[ 38%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/io/iostream.cpp.o
[ 39%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/io/datastream.cpp.o
[ 39%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/io/buffered_iostream.cpp.o
[ 39%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/io/fstream.cpp.o
[ 40%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/io/sstream.cpp.o
[ 40%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/io/json.cpp.o
[ 41%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/io/varint.cpp.o
[ 41%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/io/console.cpp.o
[ 41%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/filesystem.cpp.o
[ 42%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/interprocess/process.cpp.o
[ 42%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/interprocess/signals.cpp.o
[ 43%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/interprocess/file_mapping.cpp.o
[ 43%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/interprocess/mmap_struct.cpp.o
[ 43%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/rpc/json_connection.cpp.o
[ 44%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/rpc/cli.cpp.o
[ 44%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/log/log_message.cpp.o
[ 45%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/log/logger.cpp.o
[ 45%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/log/appender.cpp.o
[ 45%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/log/console_appender.cpp.o
[ 46%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/log/file_appender.cpp.o
[ 46%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/log/gelf_appender.cpp.o
[ 47%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/log/logger_config.cpp.o
[ 47%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/openssl.cpp.o
[ 47%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/aes.cpp.o
/home/vor0220/graphene/libraries/fc/src/crypto/aes.cpp: In constructor ‘fc::aes_encoder::aes_encoder()’:
/home/vor0220/graphene/libraries/fc/src/crypto/aes.cpp:32:14: warning: unused variable ‘init’ [-Wunused-variable]
static int init = init_openssl();
^
In file included from /home/vor0220/graphene/libraries/fc/include/fc/safe.hpp:2:0,
from /home/vor0220/graphene/libraries/fc/include/fc/io/raw_fwd.hpp:6,
from /home/vor0220/graphene/libraries/fc/include/fc/crypto/sha256.hpp:5,
from /home/vor0220/graphene/libraries/fc/include/fc/crypto/aes.hpp:3,
from /home/vor0220/graphene/libraries/fc/src/crypto/aes.cpp:1:
/home/vor0220/graphene/libraries/fc/src/crypto/aes.cpp: In member function ‘uint32_t fc::aes_encoder::encode(const char_, uint32_t, char_)’:
/home/vor0220/graphene/libraries/fc/src/crypto/aes.cpp:73:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
FC_ASSERT( ciphertext_len == plaintext_len, "", ("ciphertext_len",ciphertext_len)("plaintext_len",plaintext_len) );
^
/home/vor0220/graphene/libraries/fc/include/fc/exception/exception.hpp:308:30: note: in definition of macro ‘FC_EXPAND_MACRO’
#define FC_EXPAND_MACRO( x ) x
^
/home/vor0220/graphene/libraries/fc/include/fc/exception/exception.hpp:315:11: note: in expansion of macro ‘UNLIKELY’
if( UNLIKELY(!(TEST)) )
^
/home/vor0220/graphene/libraries/fc/src/crypto/aes.cpp:73:5: note: in expansion of macro ‘FC_ASSERT’
FC_ASSERT( ciphertext_len == plaintext_len, "", ("ciphertext_len",ciphertext_len)("plaintext_len",plaintext_len) );
^
/home/vor0220/graphene/libraries/fc/src/crypto/aes.cpp: In constructor ‘fc::aes_decoder::aes_decoder()’:
/home/vor0220/graphene/libraries/fc/src/crypto/aes.cpp:100:14: warning: unused variable ‘init’ [-Wunused-variable]
static int init = init_openssl();
^
In file included from /home/vor0220/graphene/libraries/fc/include/fc/safe.hpp:2:0,
from /home/vor0220/graphene/libraries/fc/include/fc/io/raw_fwd.hpp:6,
from /home/vor0220/graphene/libraries/fc/include/fc/crypto/sha256.hpp:5,
from /home/vor0220/graphene/libraries/fc/include/fc/crypto/aes.hpp:3,
from /home/vor0220/graphene/libraries/fc/src/crypto/aes.cpp:1:
/home/vor0220/graphene/libraries/fc/src/crypto/aes.cpp: In member function ‘uint32_t fc::aes_decoder::decode(const char_, uint32_t, char_)’:
/home/vor0220/graphene/libraries/fc/src/crypto/aes.cpp:140:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
FC_ASSERT( ciphertxt_len == plaintext_len, "", ("ciphertxt_len",ciphertxt_len)("plaintext_len",plaintext_len) );
^
/home/vor0220/graphene/libraries/fc/include/fc/exception/exception.hpp:308:30: note: in definition of macro ‘FC_EXPAND_MACRO’
#define FC_EXPAND_MACRO( x ) x
^
/home/vor0220/graphene/libraries/fc/include/fc/exception/exception.hpp:315:11: note: in expansion of macro ‘UNLIKELY’
if( UNLIKELY(!(TEST)) )
^
/home/vor0220/graphene/libraries/fc/src/crypto/aes.cpp:140:5: note: in expansion of macro ‘FC_ASSERT’
FC_ASSERT( ciphertxt_len == plaintext_len, "", ("ciphertxt_len",ciphertxt_len)("plaintext_len",plaintext_len) );
^
[ 48%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/crc.cpp.o
[ 48%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/city.cpp.o
[ 49%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/base32.cpp.o
[ 49%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/base36.cpp.o
[ 49%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/base58.cpp.o
[ 50%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/base64.cpp.o
[ 50%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/bigint.cpp.o
[ 51%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/hex.cpp.o
[ 51%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/sha1.cpp.o
[ 51%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/ripemd160.cpp.o
[ 52%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/sha256.cpp.o
[ 52%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/sha224.cpp.o
[ 53%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/sha512.cpp.o
[ 53%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/dh.cpp.o
[ 53%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/blowfish.cpp.o
[ 54%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/elliptic_common.cpp.o
[ 54%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/elliptic_impl_priv.cpp.o
/home/vor0220/graphene/libraries/fc/src/crypto/elliptic_impl_priv.cpp:3:23: fatal error: secp256k1.h: No such file or directory
#include <secp256k1.h>
^
compilation terminated.
make[2]: *** [libraries/fc/CMakeFiles/fc.dir/src/crypto/elliptic_impl_priv.cpp.o] Error 1
make[1]: *** [libraries/fc/CMakeFiles/fc.dir/all] Error 2
make: *** [all] Error 2

running again and investigating.

get_market and get_markets

Can we have two api calls that return an individual market or a list of all markets with some basic market info, at the very least the current top ask/bid, and maybe some volume data if possible? Similar to how it works in Bitshares 1.0 but with a working "status" field

get_short_orders crashes the witness node

get_short_orders SHILL 1 get_short_orders 1.4.1 5 etc..

From cli_wallet or gui websocket, here's the error:

3350016ms th_a       witness.cpp:166               block_production_loo ] Generated block #11582 with timestamp 2015-06-08T12:55:50 at time 2015-06-08T12:55:50
witness_node: /home/sigve/Dev/graphene/graphene/libraries/chain/include/graphene/chain/asset_object.hpp:192: const graphene::chain::asset_bitasset_data_object& graphene::chain::asset_object::bitasset_data(const DB&) const [with DB = graphene::chain::database]: Assertion `bitasset_data_id' failed.
Aborted (core dumped)

cli_wallet hang after http rpc call

Steps:

  1. cli_wallet -r
  2. curl -v --data '{"jsonrpc": "2.0", "method": "info", "params": [], "id": 1}' http://localhost:8091/rpc

Logs:

  • cli_wallet
locked >>> here...
2585869ms th_a       main.cpp:170                  operator()           ] .
  • curl
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8091 (#0)
> POST /rpc HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:8091
> Accept: */*
> Content-Length: 59
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 59 out of 59 bytes

By the way, if give in a wrong method, curl will receive an error, but the wallet won't die.

Create account transaction is rejecting due to fee paying account...

Do I need to update something in my transaction?

10 assert_exception: Assert Exception\nfee_paying_account->is_lifetime_member()

{"ref_block_num":0,"ref_block_prefix":1434050043,"relative_expiration":0,"operations":[[6,{"fee":{"amount":"0","asset_id":"1.4.0"},"fee_paying_account":"1.3.11","key_data":[1,"GPH88N4QKA8SHTcGzCg9XR9yd9QBubtFvaDFxxg6WGaWiuzQK5BXk"]}],[6,{"fee":{"amount":"0","asset_id":"1.4.0"},"fee_paying_account":"1.3.11","key_data":[1,"GPH8bzbNHyeU57nDkfQ8FSNSwV63HZ87onFg9A2A2dnFqVbx4AJdy"]}],[7,{"fee":{"amount":"0","asset_id":"1.4.0"},"registrar":"1.3.11","referrer":"1.3.0","referrer_percent":0,"name":"account-zfc39","owner":{"weight_threshold":1,"auths":[["0.2.0",1]]},"active":{"weight_threshold":1,"auths":[["0.2.1",1]]},"voting_account":"1.3.0","memo_key":"0.2.1","num_witness":0,"num_committee":0,"vote":[]}]],"signatures":[["1.2.1","205848db789c70159597d6306c3a889fa0443cdd730c807972c2ecb0251aa9ab2b77c33cb090e3945c7cfdc879e583e6423dcd24069f35ba1b1c07be09e61cb845"]]}

Withdraw permission specification is inconsistent

The withdraw_permission_create doc comment in operations.hpp states: "Only one withdrawal may occur per period for a given permission. Any subsequent withdrawals will fail until the next period begins, even if the sum of all withdrawals within a given period does not exceed the withdrawal limit."

The withdraw_permission_object doc comment in withdraw_permission_object.hpp states: "Any number of withdraws may be made so long as the total amount withdrawn is less than the limit for any given period."

These requirements are inconsistent...

compile error on windows

win7x64, vs2013

1>D:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\memory(932): error C2664: 'boost::asio::basic_waitable_timerstd::chrono::steady_clock,boost::asio::wait_traits<Clock,boost::asio::waitable_timer_service<Clock,WaitTraits>>::basic_waitable_timer(const boost::asio::basic_waitable_timer<Clock,WaitTraits,boost::asio::waitable_timer_service<Clock,WaitTraits>> &)' : cannot convert argument 2 from 'boost::chrono::milliseconds' to 'const std::chrono::time_pointstd::chrono::system_clock,std::chrono::system_clock::duration &'
1> with
1> [
1> Clock=std::chrono::steady_clock
1> , WaitTraits=boost::asio::wait_traitsstd::chrono::steady_clock
1> ]
1> Reason: cannot convert from 'boost::chrono::milliseconds' to 'const std::chrono::time_pointstd::chrono::system_clock,std::chrono::system_clock::duration'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1> D:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\memory(1003) : see reference to function template instantiation 'std::_Ref_count_obj<_Ty>::_Ref_count_objstd::reference_wrapper<boost::asio::io_service,boost::chrono::duration<int_least64_t,boost::milli>>(std::reference_wrapperboost::asio::io_service &&,boost::chrono::duration<int_least64_t,boost::milli> &&)' being compiled
1> with
1> [
1> _Ty=boost::asio::steady_timer
1> ]
1> D:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\memory(1003) : see reference to function template instantiation 'std::_Ref_count_obj<_Ty>::_Ref_count_objstd::reference_wrapper<boost::asio::io_service,boost::chrono::duration<int_least64_t,boost::milli>>(std::reference_wrapperboost::asio::io_service &&,boost::chrono::duration<int_least64_t,boost::milli> &&)' being compiled
1> with
1> [
1> _Ty=boost::asio::steady_timer
1> ]
1> d:\code\graphene\graphene\libraries\fc\vendor\websocketpp\websocketpp/transport/asio/connection.hpp(317) : see reference to function template instantiation 'std::shared_ptrboost::asio::steady_timer std::make_sharedboost::asio::steady_timer,std::reference_wrapperboost::asio::io_service,boost::chrono::milliseconds(std::reference_wrapperboost::asio::io_service &&,boost::chrono::milliseconds &&)' being compiled
1> d:\code\graphene\graphene\libraries\fc\vendor\websocketpp\websocketpp/transport/asio/connection.hpp(313) : while compiling class template member function 'websocketpp::transport::asio::connection::timer_ptr websocketpp::transport::asio::connection::set_timer(long,websocketpp::transport::timer_handler)'
1> with
1> [
1> config=fc::http::detail::asio_with_stub_log::transport_config
1> ]
1> d:\code\graphene\graphene\libraries\fc\vendor\websocketpp\websocketpp/transport/asio/endpoint.hpp(833) : see reference to function template instantiation 'websocketpp::transport::asio::connection::timer_ptr websocketpp::transport::asio::connection::set_timer(long,websocketpp::transport::timer_handler)' being compiled
1> with
1> [
1> config=fc::http::detail::asio_with_stub_log::transport_config
1> ]
1> d:\code\graphene\graphene\libraries\fc\vendor\websocketpp\websocketpp/transport/asio/endpoint.hpp(77) : see reference to class template instantiation 'websocketpp::transport::asio::connection' being compiled
1> with
1> [
1> config=fc::http::detail::asio_with_stub_log::transport_config
1> ]
1> d:\code\graphene\graphene\libraries\fc\vendor\websocketpp\websocketpp/endpoint.hpp(42) : see reference to class template instantiation 'websocketpp::transport::asio::endpointfc::http::detail::asio_with_stub_log::transport_config' being compiled
1> d:\code\graphene\graphene\libraries\fc\vendor\websocketpp\websocketpp/roles/server_endpoint.hpp(44) : see reference to class template instantiation 'websocketpp::endpointwebsocketpp::connection<config,config>' being compiled
1> with
1> [
1> config=fc::http::detail::asio_with_stub_log
1> ]
1> d:\code\graphene\graphene\libraries\fc\src\network\http\websocket.cpp(264) : see reference to class template instantiation 'websocketpp::serverfc::http::detail::asio_with_stub_log' being compiled

Market order history API call

We're not going to do this for a while. For now you can subscribe to the market in the wallet and build it up there.

Implement Cycle Detection on Account Update

It will only be able to detect cycles within the recursion depth limit. I think this should be done client side and by certain witness nodes. It can be implemented "after the fact" and thus is low priority.

Genesis initialization of bit commitment secrets needs to be revised

Genesis secrets for init witnesses are currently based on genesis_private_key. This won't be doable for real init witnesses with real private keys.

Since the bit commitment needs to support a "never committed" state to deal with new witnesses who have never produced a block, we should simply set the genesis witnesses to this state.

Underlying transport error

Trying to set up a witness node (not sure if I have permissions to do this, so I figured I'd get it squared away in here), get these results:

vor0220@vor0220-ubuntu:~/graphene$ ./programs/witness_node/witness_node
1123088ms th_a       application.cpp:156           startup              ] Allocating all stake to 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3
1123088ms th_a       db_management.cpp:38          open                 ] Open database in /home/vor0220/graphene/witness_node_data_dir/blockchain
1123088ms th_a       object_database.cpp:101       open                 ] Open object_database in /home/vor0220/graphene/witness_node_data_dir/blockchain
1123211ms th_a       object_database.cpp:117       open                 ] next_ids: ["1.2.2","1.3.12","1.4.1","1.5.0","1.6.10","1.7.10","1.8.0","1.9.0","1.10.0","1.12.0","1.13.0","1.14.0","1.15.0","1.16.0","1.17.0","1.18.0","1.19.0","2.0.1","2.1.1","2.3.1","2.4.0","2.6.2","2.7.12","2.9.0","2.10.1","2.11.0","2.12.1","5.0.2"] 
1123292ms th_a       thread.cpp:95                 thread               ] name:p2p tid:139777624717056
1123379ms th_a       application.cpp:85            reset_p2p_node       ] Configured p2p node to listen on 0.0.0.0:54272
1123380ms th_a       thread.cpp:95                 thread               ] name:ntp tid:139777595348736
1123380ms th_a       witness.cpp:81                plugin_startup       ] No witnesses configured! Please add witness IDs and private keys to configuration.
1123380ms th_a       main.cpp:120                  main                 ] Started witness node on a chain with 0 blocks.
1123380ms ntp        ntp.cpp:77                    request_now          ] resolving... ["pool.ntp.org",123]
1123396ms ntp        ntp.cpp:81                    request_now          ] sending request to 67.18.187.111:123

And then when trying to start up the wallet client, I get this:

vor0220@vor0220-ubuntu:~/graphene$ ./programs/cli_wallet/cli_wallet 
Logging RPC to file: logs/rpc/rpc.log
1155951ms th_a       main.cpp:108                  main                 ] key_to_wif( genesis_private_key ): 5K9KhCCAgNSAJdaoYkZQp8DJaQYjauHUhUB37bbiDi9qMQE3uSY 
1155953ms th_a       main.cpp:111                  main                 ] key_to_wif( nathan_private_key ): 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 
0 exception: unspecified
Underlying Transport Error
    {"message":"Underlying Transport Error"}
    asio  websocket.cpp:421 operator()

    {"uri":"ws://localhost:8090"}
    th_a  websocket.cpp:606 connect

transaction_object should only store tx hash

AFAIK transaction_object is only used for duplicate checking in validation. For this purpose a tx hash is sufficient, and will provide a good deal of space savings, as well as eliminating the dynamic memory allocation overhead for variable-length fields in signed_transaction.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.