Obtaining and Running Graphene
Graphene is Open Source software available on GitHub. The root repository may be found at the Cryptonomex site. There are three projects to be cloned: graphene, graphene-ui, and fc. OCI’s GitHub page includes forks of graphene and graphene-ui, which serve as our research base repository. You may clone OCI’s copy of graphene by visiting
https://github.com/objectcomputing/graphene and
https://github.com/objectcomputing/graphene-ui Comprehensive build and deploy instructions for both kits are included in their respective Readme.md file.
Graphene ships with three executables: the witness_node, cli_wallet, and genesis_util. Once built, you can try running a witness node. Note this example shows how to run the witness node with command line options.
dhcp19:graphene phil$ cd programs/witness_node
dhcp19:witness_node phil$ ./witness_node --rpc-endpoint 127.0.0.1:8090 --enable-stale-production -w '"1.6.0"'
2560491ms th_a main.cpp:126 main ] Writing new config file at /tao_builds/phil/projects/blockchain/phil/graphene/programs/witness_node/witness_node_data_dir/config.ini
2560511ms th_a witness.cpp:89 plugin_initialize ] witness plugin: plugin_initialize() begin
2560511ms th_a witness.cpp:99 plugin_initialize ] key_id_to_wif_pair: ["GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]
2560511ms th_a witness.cpp:117 plugin_initialize ] witness plugin: plugin_initialize() end
2560512ms th_a application.cpp:357 startup ] Replaying blockchain due to version upgrade
2560512ms th_a application.cpp:254 operator() ] Initializing database...
2560518ms th_a db_management.cpp:51 reindex ] reindexing blockchain
2560518ms th_a db_management.cpp:104 wipe ] Wiping database
2560549ms th_a object_database.cpp:87 wipe ] Wiping object database...
2560549ms th_a object_database.cpp:89 wipe ] Done wiping object databse.
2560549ms th_a object_database.cpp:94 open ] Opening object database from /tao_builds/phil/projects/blockchain/phil/graphene/programs/witness_node/witness_node_data_dir/blockchain ...
2560549ms th_a object_database.cpp:100 open ] Done opening object database.
2560560ms th_a db_debug.cpp:85 debug_dump ] total_balances[asset_id_type()].value: 0 core_asset_data.current_supply.value: 1000000000000000
2560560ms th_a db_management.cpp:58 reindex ] !no last block
2560560ms th_a db_management.cpp:59 reindex ] last_block:
2560562ms th_a thread.cpp:95 thread ] name:ntp tid:123145365336064
2560562ms th_a thread.cpp:95 thread ] name:p2p tid:123145366409216
2560566ms th_a application.cpp:143 reset_p2p_node ] Configured p2p node to listen on 0.0.0.0:64207
2560568ms th_a application.cpp:195 reset_websocket_serv ] Configured websocket rpc to listen on 127.0.0.1:8090
2560568ms th_a witness.cpp:122 plugin_startup ] witness plugin: plugin_startup() begin
2560568ms th_a witness.cpp:129 plugin_startup ] Launching block production for 1 witnesses.
********************************
* *
* ------- NEW CHAIN ------ *
* - Welcome to Graphene! - *
* ------------------------ *
* *
********************************
Your genesis seems to have an old timestamp
Please consider using the --genesis-timestamp option to give your genesis a recent timestamp
2560568ms th_a witness.cpp:140 plugin_startup ] witness plugin: plugin_startup() end
2560568ms th_a main.cpp:179 main ] Started witness node on a chain with 0 blocks.
2560568ms th_a main.cpp:180 main ] Chain ID is 0e435e3d20d8efa4e47fae56707a460e35c034aa2b0848e760e51beb13b3db04
After you get the node running, you can connect to the node using the cli_wallet. In a second terminal window, run the command line wallet application.
dhcp19:graphene phil$ cd program/cli_wallet
dhcp19:cli_wallet phil$ ./cli_wallet
Logging RPC to file: logs/rpc/rpc.log
2838642ms th_a main.cpp:120 main ] key_to_wif( committee_private_key ): 5KCBDTcyDqzsqehcb52tW5nU6pXife6V2rX9Yf7c3saYSzbDZ5W
2838649ms th_a main.cpp:124 main ] nathan_pub_key: GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
2838650ms th_a main.cpp:125 main ] key_to_wif( nathan_private_key ): 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3
Starting a new wallet with chain ID 0e435e3d20d8efa4e47fae56707a460e35c034aa2b0848e760e51beb13b3db04 (from egenesis)
2838655ms th_a main.cpp:172 main ] wdata.ws_server: ws://localhost:8090
2838726ms th_a main.cpp:177 main ] wdata.ws_user: wdata.ws_password:
Please use the set_password method to initialize a new wallet before continuing
2838792ms th_a thread.cpp:95 thread ] name:getline tid:123145506545664
new >>>
At this point, you can use the help command to explore how to use the wallet interface.
Bitshares was the first Coin to do Tokens, and the Bitshares Tokens are called User Issued Assets (UIAs). The OpenLedger Platform is a Decentralized Exchange Platform, where Nodes are held open by people who are Voted for. So no single person or Company really operates it, it exists on a Blockchain.
![](https://ip.bitcointalk.org/?u=http%3A%2F%2Finsidebitcoins.com%2Fwp-content%2Fuploads%2F2015%2F07%2Fshutterstock_267360542.jpg&t=665&c=FwBQGrmZ2BOqIw)
Here is OpenLedger
https://openledger.info/Here is the Cryptofresh Blockchain Explorer, which keeps track of the Transactions on OpenLedger.
http://cryptofresh.com/All of that is on the Blockchain.
Here is the OpenLedger Github Repo
https://github.com/bitshares/bitshares-coreBitshares UI
https://github.com/bitshares/bitshares-uiSo, that is the Smart Contracts and the Exchange.
Now, more recently Steemit was made. Which is like OpenLedger, but Social. And it is like Reddit, where you can Vote.
https://steemit.com/Here is an example of a Steemit Fork
https://github.com/Someguy123/understeemSteemit Copied Synero
Synero
https://bitcointalk.org/index.php?topic=827782.0https://bitcointalk.org/index.php?topic=2413752.0http://www.synereo.com/https://themerkle.com/synereo-bringing-crypto-and-social-media-on-a-revolutionary-platform/Synereo Git Repo
https://github.com/synereo/synereoHere is the Graphene Blockchain
https://github.com/cryptonomex/grapheneHere is how to use it
https://objectcomputing.com/resources/publications/sett/march-2017-graphene-an-open-source-blockchain/And we are just trying to create any kind of Social Media Platform on the Blockchain.
Here are some examples
Social/Social Media Blockchains
https://bitcointalk.org/index.php?topic=2657895.0https://bitcointalk.org/index.php?topic=2291309.0https://bitcointalk.org/index.php?topic=2677363.0https://bitcointalk.org/index.php?topic=2461878.0https://bitcointalk.org/index.php?topic=2027214.0https://bitcointalk.org/index.php?topic=2648330.0https://bitcointalk.org/index.php?topic=2407336.0https://bitcointalk.org/index.php?topic=2426759.0https://bitcointalk.org/index.php?topic=2519264.0https://bitcointalk.org/index.php?topic=2567795.0https://bitcointalk.org/index.php?topic=2437581.0https://bitcointalk.org/index.php?topic=2348476.0https://bitcointalk.org/index.php?topic=2644550.0https://bitcointalk.org/index.php?topic=2432816.0https://bitcointalk.org/index.php?topic=2401248.0https://bitcointalk.org/index.php?topic=2398117.0https://bitcointalk.org/index.php?topic=2447583.0https://bitcointalk.org/index.php?topic=2158960.0https://bitcointalk.org/index.php?topic=2234738.0https://bitcointalk.org/index.php?topic=2570851.0https://bitcointalk.org/index.php?topic=2191554.0https://bitcointalk.org/index.php?topic=2372042.0https://bitcointalk.org/index.php?topic=2402330.0https://bitcointalk.org/index.php?topic=2344257.0https://bitcointalk.org/index.php?topic=2046801.0https://bitcointalk.org/index.php?topic=2187641.0https://bitcointalk.org/index.php?topic=2206682.0https://bitcointalk.org/index.php?topic=2367256.0https://bitcointalk.org/index.php?topic=2313303.0https://bitcointalk.org/index.php?topic=2313303.0https://bitcointalk.org/index.php?topic=2209559.0https://bitcointalk.org/index.php?topic=2110925.0https://bitcointalk.org/index.php?topic=2291332.0Graphene Bots
https://steemit.com/bots/@personz/a-new-voter-bot-newer-smarter-freerhttps://steemit.com/cryptocurrency/@steemitprime/steemit-bot-2017-increase-upvote-and-follower-100-workinghttps://steemit.com/steemit/@cerebralace/how-to-use-the-steemit-voting-botshttps://steemit.com/steemit/@hoschitrooper/bots-bots-and-botshttps://steemit.com/steem/@heimindanger/don-t-use-vote-selling-bots-use-promoted-instead-a-bot-that-upvotes-you-when-you-burn-moneyhttps://steemit.com/guide/@bitcoinparadise/do-you-want-to-run-you-own-voting-botreating a new Genesis File
http://docs.bitshares.org/testnet/private-testnet.htmlCustomizing the Genesis file
http://docs.bitshares.org/testnet/private-testnet.html#customization-of-the-genesis-fileThe Bottom 2 Sections here explain creating a New Graphene Blockchain with a new Genesis Block
https://objectcomputing.com/resources/publications/sett/march-2017-graphene-an-open-source-blockchain/Steemit is a Reddit Clone, and is limited in that fact. Of all the Social Media Websites on the Internet, Reddit is not really the best example. Reddit is almost secondary. Everyone is either on Facebook, Twitter or Instagram, or all of them. But Reddit is Secondary, like YouTube.
Steemit would do much better as a YouTube platform, where videos are uploaded and earn money, instead of Blogs. We will be launching a YouTube Graphene Clone eventually if someone else doesn’t.
That explains Steemit on a superficial level. I am not saying that Steemit is a failure, I am saying that it would be better if there were a YouTube version.
So secondly, Steemit is a platoform connected to a Coin. There is a backend to Steemit, called Steemd, and you can look at Steemd, just google it. And there are other things, like Blocktrades, which actually connects Steemit and Bitshares. The coin called STEEM, is a DPoWS, which stands for Delegated Proof of Work and Stake.
So let me explain what Delegated Proof of Work and Stake means:
Proof of Work is like Bitcoin and Litecoin and Dogecoin, where everyone Mines with Mining Machines.
Proof of Stake is like Temple Coin or PeerCoin or various other Coins. The way Proof of Stake Works in Steemit, is that anyone that has Coins, has Coins that gain value. And they gain value at a very very high rate the first year or something, then they don’t gain as much after that. And you get coins via Proof of Work, or via Delegated Votes on your Steemit posts, which awards you STEEM from the Blockchain.
Delegated means that the Proof of Work is Voted on, this is done through the “Witness” system. And any Computer or Server or Laptop or anything can be a Node and be a Witness. And Witnesses have the Obligation to Hold Open Nodes, and Mine Coins, which processes transactions and keeps the Blockchain moving. And they get a lot of Coins out of that. Delegated also applies to the Voting on Posts. On Steemit, you get paid when you get Votes, you get paid for Voting (more for posts that end up being popular and you voted early), and you can get votes on your Comments on Steemit. So the Delegated part is important to Steemit.
Here is the Witness page on Steemit
https://steemit.com/~witnessesWitnesses are secretly very important to Steemit, and anyone can become one by being voted for, but they don’t advertise that because they don’t want to get taken over.
So that is the basics of how Steemit works.
Once you have Bitshares and Bitshares UI donwloaded, here is what you are supposed to do
dhcp19:graphene phil$ cd programs/witness_node
dhcp19:witness_node phil$ ./witness_node --rpc-endpoint 127.0.0.1:8090 --enable-stale-production -w '"1.6.0"'
2560491ms th_a main.cpp:126 main ] Writing new config file at /tao_builds/phil/projects/blockchain/phil/graphene/programs/witness_node/witness_node_data_dir/config.ini
2560511ms th_a witness.cpp:89 plugin_initialize ] witness plugin: plugin_initialize() begin
2560511ms th_a witness.cpp:99 plugin_initialize ] key_id_to_wif_pair: ["GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]
2560511ms th_a witness.cpp:117 plugin_initialize ] witness plugin: plugin_initialize() end
2560512ms th_a application.cpp:357 startup ] Replaying blockchain due to version upgrade
2560512ms th_a application.cpp:254 operator() ] Initializing database...
2560518ms th_a db_management.cpp:51 reindex ] reindexing blockchain
2560518ms th_a db_management.cpp:104 wipe ] Wiping database
2560549ms th_a object_database.cpp:87 wipe ] Wiping object database...
2560549ms th_a object_database.cpp:89 wipe ] Done wiping object databse.
2560549ms th_a object_database.cpp:94 open ] Opening object database from /tao_builds/phil/projects/blockchain/phil/graphene/programs/witness_node/witness_node_data_dir/blockchain ...
2560549ms th_a object_database.cpp:100 open ] Done opening object database.
2560560ms th_a db_debug.cpp:85 debug_dump ] total_balances[asset_id_type()].value: 0 core_asset_data.current_supply.value: 1000000000000000
2560560ms th_a db_management.cpp:58 reindex ] !no last block
2560560ms th_a db_management.cpp:59 reindex ] last_block:
2560562ms th_a thread.cpp:95 thread ] name:ntp tid:123145365336064
2560562ms th_a thread.cpp:95 thread ] name:p2p tid:123145366409216
2560566ms th_a application.cpp:143 reset_p2p_node ] Configured p2p node to listen on 0.0.0.0:64207
2560568ms th_a application.cpp:195 reset_websocket_serv ] Configured websocket rpc to listen on 127.0.0.1:8090
2560568ms th_a witness.cpp:122 plugin_startup ] witness plugin: plugin_startup() begin
2560568ms th_a witness.cpp:129 plugin_startup ] Launching block production for 1 witnesses.
********************************
* *
* ------- NEW CHAIN ------ *
* - Welcome to Graphene! - *
* ------------------------ *
* *
********************************
Your genesis seems to have an old timestamp
Please consider using the --genesis-timestamp option to give your genesis a recent timestamp
2560568ms th_a witness.cpp:140 plugin_startup ] witness plugin: plugin_startup() end
2560568ms th_a main.cpp:179 main ] Started witness node on a chain with 0 blocks.
2560568ms th_a main.cpp:180 main ] Chain ID is 0e435e3d20d8efa4e47fae56707a460e35c034aa2b0848e760e51beb13b3db04
dhcp19:graphene phil$ cd program/cli_wallet
dhcp19:cli_wallet phil$ ./cli_wallet
Logging RPC to file: logs/rpc/rpc.log
2838642ms th_a main.cpp:120 main ] key_to_wif( committee_private_key ): 5KCBDTcyDqzsqehcb52tW5nU6pXife6V2rX9Yf7c3saYSzbDZ5W
2838649ms th_a main.cpp:124 main ] nathan_pub_key: GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
2838650ms th_a main.cpp:125 main ] key_to_wif( nathan_private_key ): 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3
Starting a new wallet with chain ID 0e435e3d20d8efa4e47fae56707a460e35c034aa2b0848e760e51beb13b3db04 (from egenesis)
2838655ms th_a main.cpp:172 main ] wdata.ws_server: ws://localhost:8090
2838726ms th_a main.cpp:177 main ] wdata.ws_user: wdata.ws_password:
Please use the set_password method to initialize a new wallet before continuing
2838792ms th_a thread.cpp:95 thread ] name:getline tid:123145506545664
new >>>
At this point, you can use the help command to explore how to use the wallet interface.
Programming with Graphene
The basic API for Graphene is based on remote procedure calls. The specific functions available depend on the terms of the contracts, defined by a particular blockchain instance. A common authentication module is accessed first through the login API. After authenticating, the client application is able to gather other remote object references and make calls to them.
The FC library is used to manage the transport details, allowing the nodes to accept a variety of transport protocols. As currently delivered, the witness_node application is configured to accept HTTP formatted requests. From a C++ application, the Graphene apps library and FC library work together to provide a simple programming model for such access.
Here is an example, taken from the cli_wallet application, showing how to connect to the node server, log in, and make additional calls.
fc::http::websocket_client client;
idump((wdata.ws_server));
auto con = client.connect( wdata.ws_server );
auto apic = std::make_shared<fc::rpc::websocket_api_connection>(*con);
auto remote_api = apic->get_remote_api< login_api >(1);
edump((wdata.ws_user)(wdata.ws_password) );
// TODO: Error message here
FC_ASSERT( remote_api->login( wdata.ws_user, wdata.ws_password ) );
auto wapiptr = std::make_shared<wallet_api>( wdata, remote_api );
wapiptr->set_wallet_filename( wallet_file.generic_string() );
wapiptr->load_wallet_file();
fc::api<wallet_api> wapi(wapiptr);
auto wallet_cli = std::make_shared<fc::rpc::cli>();
for( auto& name_formatter : wapiptr->get_result_formatters() )
wallet_cli->format_result( name_formatter.first, name_formatter.second );
Without getting too deep, what is shown here is that wdata is some collection of initialization information collected from the command line, config files, etc. This is then used to create a client connection, log in (asserting that it was successful), creating an instance of the wallet API that communicates through the authenticated reference to make further calls.
Building Graphene on Ubuntu
https://github.com/bitshares/bitshares-core/wiki/BUILD_UBUNTUBuilding Graphene on Windows
https://github.com/bitshares/bitshares-core/wiki/BUILD_WIN32Nodes
https://github.com/bitshares/bitshares-core/wiki/Wallet_Full-Nodes_Witness_NodesAPI
https://github.com/bitshares/bitshares-core/wiki/APIWebsocket Subscriptions
https://github.com/bitshares/bitshares-core/wiki/Websocket-SubscriptionsWallet Cookbook
https://github.com/bitshares/bitshares-core/wiki/CLI-Wallet-CookbookHow to set up Witness for Testnet
https://github.com/bitshares/bitshares-core/wiki/How-to-setup-your-witness-for-test-net-%28Ubuntu-14.04%29If you are getting Error Messages while trying to do this, then read here, and if your problem is not solved here, you can post your problem and see if someone else can answer it.
https://github.com/bitshares/bitshares-core/issuesBitsharestalk threads with helpful info
https://bitsharestalk.org/index.php?topic=22659.0https://bitsharestalk.org/index.php/topic,18614.0.htmlhttps://bitsharestalk.org/index.php?topic=17962.525https://bitsharestalk.org/index.php?topic=18635.0https://bitsharestalk.org/index.php?topic=21532.0https://bitsharestalk.org/index.php?topic=23627.0https://bitsharestalk.org/index.php?topic=22125.0https://bitsharestalk.org/index.php?topic=15138.285https://bitsharestalk.org/index.php/topic,19507.0.htmlhttps://bitsharestalk.org/index.php/topic,18751.0.htmlhttps://bitsharestalk.org/index.php/topic,22576.0.htmlAbstract information about Graphene on Bitsharestalk
https://bitsharestalk.org/index.php?topic=21990.0https://bitsharestalk.org/index.php?topic=25187.0https://bitsharestalk.org/index.php?topic=18401.0https://bitsharestalk.org/index.php/topic,21079.0.htmlhttps://bitsharestalk.org/index.php?topic=23716.0https://bitsharestalk.org/index.php?topic=23478.0https://bitsharestalk.org/index.php?topic=23848.0https://bitsharestalk.org/index.php?topic=18434.0[/quote]