Bitcoin Forum
May 21, 2024, 07:25:53 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [ANN] mastercoin-tools  (Read 3492 times)
grazcoin (OP)
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
September 10, 2013, 07:32:03 PM
 #1

Package of mastercoin related tools.

available on https://github.com/grazcoin/mastercoin-tools

The intention is to help finalizing the mastercoins spec, and enable easy further coding.
It is based on https://github.com/spesmilo/sx with minor fixes on https://github.com/grazcoin/sx

For finalizing the spec, a list of address and mastercoins was generated.

To get all mastercoins sells during exodus bootstrap in csv format:
Code:
python msc_bootstrap.py > outputs/bootstrap.log

To get total amount of mastercoins for each address: python bootstrap_msc_per_address.py > outputs/msc_per_address.csv
Code:
python bootstrap_msc_per_address.py > outputs/msc_per_address.csv

To get the whole bootstrap story (for fun and debug), check:
Code:
python msc_bootstrap.py story > outputs/bootstrap_story.log

The outputs of those scripts are available under https://github.com/grazcoin/mastercoin-tools/tree/master/outputs

Once this list is agreed on the community, it would be possible to sign it with 1EXoDus address and take it as appendix for the spec (best would be as part of the github repository of the ascii spec). Also future protocol stack implementations could use it.

Aim of this package:
  • Live update - direct interaction with the bitcoin network (using sx monitor).
  • Run without a database.
  • Be an alternative code base.
Anyone should be able to run at home without the need for a database setup.

Next steps:
  • Parse mastercoin tx for all tx coming from sx-monitor tool listening on 1EXoDus address creating a mastercoin tx log (dropping the syntax invalid tx).
  • Accounting validator - checks that enough funds are available for each tx. Insufficient funds would mean invalid tx.

enjoy!

BTC/Mastercoins Tips Jar: 182osbPxCo88oaSX4ReJwUr9uAcchmJVaL

dacoinminster
Legendary
*
Offline Offline

Activity: 1260
Merit: 1031


Rational Exuberance


View Profile WWW
September 10, 2013, 08:18:53 PM
 #2

I approve this thread Smiley

Here's a copy of my question from the MasterCoin project thread:
Quote
I'm trying to understand your suggestion about a package with a live update. Are you suggesting that MasterCoin clients should decouple from the block chain completely and rely on a vetted record of transactions? If so, that would seem to lose our decentralization. If not, what are you suggesting?

Thanks!

grazcoin (OP)
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
September 10, 2013, 08:47:58 PM
 #3

I approve this thread Smiley

Here's a copy of my question from the MasterCoin project thread:
Quote
I'm trying to understand your suggestion about a package with a live update. Are you suggesting that MasterCoin clients should decouple from the block chain completely and rely on a vetted record of transactions? If so, that would seem to lose our decentralization. If not, what are you suggesting?

Thanks!

repearting the answer in https://bitcointalk.org/index.php?topic=265488.msg3124663#msg3124663

The live update is a feature of the command sx-monitor (https://github.com/grazcoin/sx) which listens to the bitcoin network on specific address (1EXoDus address in our case), and in real time outputs new tx. The code will parse them on-the-fly and show the mastercoin tx.
A different mechanism will go over the output (optionally also on-the-fly) and decide if the tx is valid or not according to the mastercoin balance of the address (invalid tx if there are not enough funds).

grazcoin (OP)
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
September 13, 2013, 09:00:05 AM
Last edit: September 13, 2013, 12:25:48 PM by grazcoin
 #4

basic mastercoin tx parser was added to mastercoin-tools.

The parser goes over all 1EXoDus tx, and outputs:
tx_hash,from,to,amount,currency,tx_type
currently only simple send is supported

usage:
python msc_parse.py > outputs/tx_parse.csv

updated result can be fetched:
https://raw.github.com/grazcoin/mastercoin-tools/master/outputs/tx_parse.csv


dacoinminster
Legendary
*
Offline Offline

Activity: 1260
Merit: 1031


Rational Exuberance


View Profile WWW
September 13, 2013, 05:41:34 PM
 #5

basic mastercoin tx parser was added to mastercoin-tools.

The parser goes over all 1EXoDus tx, and outputs:
tx_hash,from,to,amount,currency,tx_type
currently only simple send is supported

usage:
python msc_parse.py > outputs/tx_parse.csv

updated result can be fetched:
https://raw.github.com/grazcoin/mastercoin-tools/master/outputs/tx_parse.csv

Note that in the MasterCoin project thread Tachicoma said he tested this code and verified that it agrees 100% with his own parsing code.

Great job!

grazcoin (OP)
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
October 07, 2013, 07:22:07 AM
 #6

Added
  • send mastercoin transaction (the real thing, not "advisor")
  • implement sending and parsing of "simple multisig"

simple multisig
  • dust limit to 1EXoDus
  • all the change to BIP11 1-of-2
    • pubkey1 is the one of the sender (redeemable)
    • pubkey2 is recipientHex+dataHex+padding

on the blockchain

parsing
Code:
$ python msc_parse.py -t aa64fd6088532156a37670e6cbd175c74bb101f1406517613a1a0ae6bc02fb02
[I] main: {'currency_type_str': 'Mastercoin', 'transaction_type_str': 'Simple send', 'currencyId': '00000001', 'transaction_method_str': 'multisig_simple', 'recipientAddress': '17RVTF3vJzsuaGh7a94DFkg4msJ7FcBYgX', 'padding': '000000', 'amount': '0000000002faf080', 'changeAddress': '182osbPxCo88oaSX4ReJwUr9uAcchmJVaL', 'formatted_amount': '0.50000000', 'baseCoin': '00', 'dataSequenceNum': '45', 'transactionType': '00000000'}
$
$ python msc_parse.py -t 298a6af50089184f7b434c700f83f390d5dfdd5dac10b39b95f99036a5c66df7
[I] main: {'currency_type_str': 'Test Mastercoin', 'transaction_type_str': 'Simple send', 'currencyId': '00000002', 'transaction_method_str': 'multisig_simple', 'recipientAddress': '17RVTF3vJzsuaGh7a94DFkg4msJ7FcBYgX', 'padding': '000000', 'amount': '0000000000000003', 'changeAddress': '182osbPxCo88oaSX4ReJwUr9uAcchmJVaL', 'formatted_amount': '0.00000003', 'baseCoin': '00', 'dataSequenceNum': '45', 'transactionType': '00000000'}
$

outputs results
https://github.com/grazcoin/mastercoin-tools/blob/master/outputs/parse-with-multisig-simple.log

redeem multisig
https://github.com/grazcoin/mastercoin-tools/blob/master/NOTES

help on commands
Code:
$ python msc_send.py -h
Usage: msc_send.py [options]

Options:
    -h, --help            show this help message and exit
    -m TX_METHOD, --transaction-method=TX_METHOD
                          basic or multisig
    -c CURRENCY_ID, --currency-id=CURRENCY_ID
                          1 for Mastercoin, 2 for Test Mastercoin
    -a AMOUNT, --amount=AMOUNT
                          amount of coins
    -x FEE, --fee=FEE     fee for transaction
    -r RECIPIENT_ADDRESS, --recipient=RECIPIENT_ADDRESS
                          recipient address
    -f FROM_ADDRESS, --from=FROM_ADDRESS
                          from address or pubkey
    -p PRIV_KEY, --private-key=PRIV_KEY
                          private key for signing the tx (overrides from
                          address)
    -k, --key-prompt      prompt for hidden private key for signing the tx
                          (overrides from address)
    -s HOST_PORT, --send-tx=HOST_PORT
                          transmit tx to specific bitcoin node HOST:PORT
    -b, --broadcast-tx    broadcast tx to bitcoin network
    -d, --debug           turn debug mode on

Code:
$ python msc_parse.py -h
Usage: msc_parse.py [options]

Options:
  -h, --help            show this help message and exit
  -d, --debug           turn debug mode on
  -t SINGLE_TX, --transaction=SINGLE_TX
                        hash of a specific tx to parse

grazcoin (OP)
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
October 12, 2013, 04:35:01 PM
 #7

Horrey!

Grimentz https://bitcointalk.org/index.php?action=profile;u=153554, a known html5 specialist, has joined the mastercoin-tools team and now we are proud to announce http://masterchain.info
It was hard work, but I think you can see that.

  • Fully distributed architecture - no need for database or webserver.
  • You can use the site offline and update it locally on request.
  • Sync to bitcoin network is done using sx which connects to some public obelisk bitcoin node.
  • Sending a transaction directly using Send supports offline wallets.
  • There is an API section and a Download section for snapshot of parsed data

It is important to note that for "simple send", the "basic" variant is supported as well as "multisig simple" (see MIP1 https://github.com/grazcoin/mastercoin-tools#mastercoin-improvement-proposal-mip1. The previous multisig (with 4 outputs) is not yet implemented. It means currently a fork in parsing.  I would like to re-open the discussion on the "multisig simple" in another thread.


chsados
Hero Member
*****
Offline Offline

Activity: 662
Merit: 545



View Profile
October 14, 2013, 01:18:50 AM
 #8

Is there a youtube video explaining/showing all of this?

Is mastercoin an answer to colored coins?
grazcoin (OP)
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
October 15, 2013, 08:41:12 PM
 #9

Is there a youtube video explaining/showing all of this?

Is mastercoin an answer to colored coins?
I have just implemented the protocol and prepared a set of tools.
If you want more infomation about mastercoin, you should check the main mastercoin thread at https://bitcointalk.org/index.php?topic=265488.0
I see is as an alternative to colored coins which never really took off.

As for the package mastercoin-tools - you can see it working on http://masterchain.info or check the README and code at https://github.com/grazcoin/mastercoin-tools


grazcoin (OP)
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
January 16, 2014, 10:46:45 AM
 #10

Good news:
Tutorial for masterchain.info's cool Hybrid web wallet (TM) that does bitcoin/mastercoin sending as well as Distributed Exchange operations is available on:
https://masterchain.info/downloads/masterchain_tutorial.pdf

What it CAN do:
  • Show balances of MSC/TMSC/BTC for each of your addresses (just add them to the wallet)
  • Initiate a send/sell of each of the funds on the wallet
  • Suggest wallet addresses when clicking ACCEPT on an sell offer
  • Generate a correct PAY transaction after the offer got accepted

What it CANNOT (yet) do:
  • Sync wallet with server is not yet implemented. It means that the wallet is kept only locally in your browser. To re-create it, add the addresses to a new wallet

Few technical details:
  • All view pages are rendered locally on your browser using json data from the server (or from your filesystem). The json files are static (so no problem for 1M users together, since users bring their own CPUs)
  • Wallet is kept in browser storage. No private information is stored. A secure mechanism to keep the wallet data online will be later introduced
  • Wallet operations are done using a POST request from the server to:
    • /wallet/validateaddr/
    • /wallet/send/
    • /wallet/sell/
    • /wallet/accept/
  • At this point, the tx gets the bitcion network using pushtx of blockchain.info (will be later changed)

Testing:        
Not enough testing has been done. There are still sharp edges, and some hick-ups.
Example are available in the tutorial.
There is still enough work to get to consensus on DEx.


Sources:
https://github.com/grazcoin/mastercoin-tools

Note:
the wallet is not a cold wallet, but a cool wallet ;-)

grazcoin (OP)
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
January 17, 2014, 06:31:57 AM
 #11

From main mastercoin thread:

Re: quote from grazcoin above (masterchain.info wallet/DEx)

It looks like you need to create a new wallet first and then search for your mastercoin/bitcoin address.
Once you find the address you can add it to the newly created wallet.

Are there any official instructions for beta-testers for the wallet and DEx, like where to acquire test mastercoins and where to report bugs?

Westphalian, Marv has been putting together the test plan for DEx at https://github.com/marv-engine/QA/blob/master/MastercoinDistributedExchangeTestPlan.md

Regarding bug reports, Grazcoin may have a preferred location, but you can ask the devs for their preference, and to receive TMSC. 

Still finalizing the formal version of the above.

Grazcoin, this is looking exceptional!

No need to create a new wallet. It gets created automatically if it is not there already, e.g.the first time you click "add to wallet" on some address.

No official instructions as the code is still hot directly from the oven. Also being now in the revolutionary & chaotic phase of the development, things may change very fast. Whenever a beta stage comes, I will tag it as beta.
Testing - you are more than welcome. Just follow the tutorial and experiment.

General testing and testcoins - that's not me.
Report bugs to masterchain@bitmessage.ch (please text only).

maxmint
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500



View Profile
January 18, 2014, 02:22:22 PM
 #12

I just tried to create a new sell offer using address 19i7op4JBQWnACZwrHiRX32xpzAHz81uKn
When clicking on "verify" I get this error "no pubkey on blockchain". I'm not exactly sure what this means, does masterchain.info not know about this address yet?

My PGP-Key: 462D02D8
Verify my messages using keybase: https://keybase.io/maxmint
grazcoin (OP)
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
January 19, 2014, 09:44:47 PM
 #13

I just tried to create a new sell offer using address 19i7op4JBQWnACZwrHiRX32xpzAHz81uKn
When clicking on "verify" I get this error "no pubkey on blockchain". I'm not exactly sure what this means, does masterchain.info not know about this address yet?

It means that you have not signed yet with this address inside the blockchain (did not spend anything yet).
In order to create a new bitcoin transaction, the public key is required. If it is cannot be retrieved from the blockchain, you have to supply it.
An easy way to get the public key, is to visit http://brainwallet.org/ and give your private key. Then the public key appears.
Otherwise,


grazcoin (OP)
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
January 19, 2014, 09:48:51 PM
Last edit: January 19, 2014, 10:07:34 PM by grazcoin
 #14

Available new docs on http://masterchain.info/downloads

Testing format suggestion (partially done):
https://masterchain.info/downloads/DEx_test_plan.pdf

screenshot:


and icons list (lexicon):
https://masterchain.info/downloads/masterchain_icons_list.pdf

You are welcome to extend this document, and fill in tests.
Grazcoin

marcelus
Sr. Member
****
Offline Offline

Activity: 297
Merit: 250


View Profile
January 19, 2014, 11:38:10 PM
 #15

subbed
PinkPotatos
Full Member
***
Offline Offline

Activity: 126
Merit: 100

Girls dont crypto?


View Profile WWW
January 19, 2014, 11:42:42 PM
 #16

Subbed, cant wait to see where this goes.

Accepted by, more merchants! - Franko 弗兰克币 - 自由的货币
Earn FRK with your sig
marcelus
Sr. Member
****
Offline Offline

Activity: 297
Merit: 250


View Profile
January 20, 2014, 12:12:23 PM
 #17

Grazcoin, would it not be an idea to hide the characters (much like when one logs into their internet banking) when someone is entering their private key, in case somebody is watching?
prophetx
Legendary
*
Offline Offline

Activity: 1666
Merit: 1010


he who has the gold makes the rules


View Profile WWW
January 21, 2014, 05:14:20 AM
 #18

add this to reddit so hopefully you get a few more testers

http://www.reddit.com/r/mastercoin/comments/1vqmyf/masterchaininfo_download_and_testing_plan/
marcelus
Sr. Member
****
Offline Offline

Activity: 297
Merit: 250


View Profile
January 21, 2014, 02:47:41 PM
 #19

I retrieved my private key from blockchain.info to set up a sell offer but masterchain.info tells me that it is invalid. What may the problem be? Or more to the point what am I doing wrong? Smiley
grazcoin (OP)
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
April 29, 2014, 09:55:28 AM
 #20

masterchain-tools has already few roles and forks now:

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!