The Census Protocol is a blockchain application that's made to send and record the possession of virtual goods. The software itself is planned to be open source - but it's not widely available yet since it's changing a lot still. A small cabal (sorry – I just like that word :) ) are working on it now and breaking each others changes the way that only nerds can – but hopefully it should be pushed to the public repo soon.
To verify the local node is running and mostly works - asking its version is the simplest. This is through /api/v1/version or just using the version call in the library.
__author__ = 'lpreimesberger'
import censusprotocollib
import json
print "Hello world! I'm trying to talk to the blockchain server on this host!"
print json.dumps( censusprotocollib.version("localhost"), sort_keys=True, indent=4, separators=(',', ': '))
print "Tada!"
Running this gives the expected output on my local system:
lpreimesberger@dadbuntu:~/projects/testthelibrary$ python testversion.py
Hello world! I'm trying to talk to the blockchain server on this host!
"{\"result\":\"ok\",\"vendor\":\"census foundation baseline implementation\",\"version\":{\"core\":\"0.01\",\"hard_fork\":1}}"
Tada!
Good start, right? Well, okay - that's pretty useless. You could do that in a web browser after installing the base packages.
Everything in Census is based around the wallets - if a node doesn't think there's a valid wallet existing in the blockchain (or at least its local coinbase) it will reject any item transfer to that address. For local submissions – it's rejected outright. If they are sent from other nodes they remain eternally in the graveyard until the consensus says they are good or the node sees a valid wallet create with a valid signature pass.
Next post will be trying to query the local database (again, baby steps) – and then using the library to generate a new wallet and try to do something useful. Since the wallets contain valid ECDSA and RSA public keys – we can probably make a ghetto PGP application pretty quickly.
Everything in Census is based around the wallets - if a node doesn't think there's a valid wallet existing in the blockchain (or at least its local coinbase) it will reject any item transfer to that address. For local submissions – it's rejected outright. If they are sent from other nodes they remain eternally in the graveyard until the consensus says they are good or the node sees a valid wallet create with a valid signature pass.
Next post will be trying to query the local database (again, baby steps) – and then using the library to generate a new wallet and try to do something useful. Since the wallets contain valid ECDSA and RSA public keys – we can probably make a ghetto PGP application pretty quickly.
No comments:
Post a Comment