Bitcoin Forum
May 09, 2024, 11:45:38 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 [8]
141  Bitcoin / Development & Technical Discussion / Network protocol overview doc on: August 13, 2010, 11:48:26 PM

I needed this for some work I was doing, so I figured I would make it public:

http://yyz.us/bitcoin/network.html

This doc lists each type of network message, gives it a rough description, and lists typical inputs and outputs.  Very rough, but better than the other docs out there ('version' message is highly documented! Smiley).
142  Bitcoin / Development & Technical Discussion / Compile error in SVN r127 on: August 11, 2010, 01:20:42 AM
Building r127 here, we see some missing casts, apparently:

Code:
rpc.cpp: In function ‘json_spirit::Value gethashespersec(const json_spirit::Array&, bool)’:
rpc.cpp:340: error: conversion from ‘int64’ to ‘json_spirit::Value’ is ambiguous
json/json_spirit_value.h:283: note: candidates are: json_spirit::Value_impl<Config>::Value_impl(double) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:275: note:                 json_spirit::Value_impl<Config>::Value_impl(uint64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:267: note:                 json_spirit::Value_impl<Config>::Value_impl(int64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:259: note:                 json_spirit::Value_impl<Config>::Value_impl(int) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:251: note:                 json_spirit::Value_impl<Config>::Value_impl(bool) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:219: note:                 json_spirit::Value_impl<Config>::Value_impl(typename Config::String_type::const_pointer) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
rpc.cpp:341: error: conversion from ‘int64’ to ‘json_spirit::Value’ is ambiguous
json/json_spirit_value.h:283: note: candidates are: json_spirit::Value_impl<Config>::Value_impl(double) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:275: note:                 json_spirit::Value_impl<Config>::Value_impl(uint64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:267: note:                 json_spirit::Value_impl<Config>::Value_impl(int64_t) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:259: note:                 json_spirit::Value_impl<Config>::Value_impl(int) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:251: note:                 json_spirit::Value_impl<Config>::Value_impl(bool) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]
json/json_spirit_value.h:219: note:                 json_spirit::Value_impl<Config>::Value_impl(typename Config::String_type::const_pointer) [with Config = json_spirit::Config_vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >] <near match>




The following patch seems to solve the problem:
Code:
--- a/rpc.cpp
+++ b/rpc.cpp
@@ -337,8 +337,8 @@ Value gethashespersec(const Array& params, bool fHelp)
             "Returns a recent hashes per second performance measurement while g
 
     if (GetTimeMillis() - nHPSTimerStart > 8000)
-        return (int64)0;
-    return (int64)dHashesPerSec;
+        return (int64_t)0;
+    return (int64_t)dHashesPerSec;
 }
 
143  Bitcoin / Development & Technical Discussion / [RFC] bitcoin electronic check standard on: August 06, 2010, 10:41:57 PM
I have developed a sample electronic check for bitcoin.  This should work for printed checks, as well as for mobile devices.  Maybe we could develop this as a standard for http://bcspec.org/.  Note that this scheme requires a payment processor as intermediary, to store the checks until they are paid.

Sample check, suitable for emailing, scanning or mobile phone photograph: http://gtf.org/garzik/bitcoin/check.pdf

Sample output from barcode scanner program zbarimg:
Code:
$ zbarimg check.pdf
QR-Code:BITCOIN_CHECKv1 u:my_user n:1231-abcd-1231-defa v:100.00

Key:
"BITCOIN_CHECKV1": specification identifier
"u":  user identifier at payment processor.  Note: unreliable information (rely on 'n').
"n":  unique check id number at payment processor.
"v":  value.  Note: unreliable information (rely on 'n').

Perl source code (requires qrencode program): http://gtf.org/garzik/bitcoin/gen-check.pl.example

QRcode is a nice, barcode-friendly, photo-friendly method of passing information.  It's very flexible.

However, the concept of electronic checks themselves have a few notable details:
* May work with merchants
* May work with mobile phones
* Like checks, a simple photograph can enable theft.  A normal US check includes bank account info, from which a thief may use to steal your money.  With bitcoin checks, the thief may only steal money for the amount of the check.
* At the option of the payment processor, a password may be required in order to use the check.
* Payment processor may provide option to stop payment on a check.

144  Economy / Marketplace / WANTED: html/css/js consultant to enhance tiny website on: August 06, 2010, 08:02:14 PM
Job pay:   1200 BTC, for entire task.

Job requirements:
- Knowledge of HTML, CSS, JavaScript.
- Ability to make an ugly website look good, or at least, less ugly.  (read: graphic design experience)
- Must have some example of your work available over the Web for inspection (read: a portfolio or references)

Job description:
I have a website that is full of tabular data.  A single page of tabular data, a tiny website.  Being a programmer, I can easily spit out numbers.  But, wanting to save time and stimulate the bitcoin economy, I'm looking for someone to "pretty up" the website.  Give it colors, turn the ugly HTML <table>s into pretty CSS/JS tables.

Contact info:
If interested, send me a PM on this forum, or email jgarzik@gmail.com with samples of your work.
145  Bitcoin / Development & Technical Discussion / [PATCH] getblockbycount, getblockbyhash RPCs on: August 06, 2010, 07:34:52 AM
Gavin's bitcointools are nice for dumping blocks, but they require you to shutdown bitcoind, because bitcoin sets DB_PRIVATE flag, preventing outside users from using the multi-user database Smiley

See "getblockbycount" branch of git repository https://github.com/jgarzik/bitcoin

Here is sample command usage and output for block at height 71995:
Code:
$ /spare/repo/bitcoin.hacks/bitcoind -datadir=/garz/bitcoin/data getblock 71995
{
    "hash" : "00000000002d1a4380793affbc610885aa2e0b224eeedd64ffe108044ec7d434",
    "ver" : 1,
    "prev_block" : "000000000103fcffbd8020ff7459f3635eb41102ee3b22fa466a7fdfc05bad58",
    "mrkl_root" : "9d436c694968454ea0d17f4aece3b829930027c3cb918e5107a1605aa2eeae33",
    "time" : 1280823515,
    "bits" : 469830746,
    "nonce" : 2918845955,
    "n_tx" : 4,
    "tx" : [
        {
            "hash" : "f85e77e4379694c8d2c1232d6fddfc7792073fb8484bdac37a9ba5ed1d245c57",
            "ver" : 1,
            "vin_sz" : 1,
            "vout_sz" : 1,
            "lock_time" : 0,
            "in" : [
                {
                    "prev_out" : {
                        "hash" : "0000000000000000000000000000000000000000000000000000000000000000",
                        "n" : 4294967295
                    },
                    "coinbase" : "045a0c011c0143"
                }
            ],
            "out" : [
                {
                    "value" : 50.00000000000000,
                    "scriptPubKey" : "0xAD2D2527C630A3CF951703C4F44BB70F8C7524823F7095253D9412A1E9CAD1782B6B83228083A02485C20BC1870FB1A06C09DB768A5D27326A3E2FD859E7799204 OP_CHECKSIG"
                }
            ]
        },
        {
            "hash" : "38431f2f029a37a74a5b5bf0327f41a67b83aef8ad60a2efe918a8f1f0e7df1b",
            "ver" : 1,
            "vin_sz" : 1,
            "vout_sz" : 1,
            "lock_time" : 0,
            "in" : [
                {
                    "prev_out" : {
                        "hash" : "d9b308ca3484b7be6599c5050fec2cd2d31e654a0d2560989ffd28590bef6e6a",
                        "n" : 0
                    },
                    "scriptSig" : "0x01D82CD24A2C12E108087B9D9F81C49EF550F24D12668381D1D333D383B8EEB717200209F92E3246912CE4965E728963DF65FA63D9CCA10513CEF35C9BDCDC8018695F20024430"
                }
            ],
            "out" : [
                {
                    "value" : 50.00000000000000,
                    "scriptPubKey" : "OP_DUP OP_HASH160 0x403FC36C7A1B5A9390F29343F4317F148A3ACB18 OP_EQUALVERIFY OP_CHECKSIG"
                }
            ]
        },
        {
            "hash" : "c61a96af68cce7329a450c18e3ac359d3052bda9187515a42fa7d262405213bd",
            "ver" : 1,
            "vin_sz" : 1,
            "vout_sz" : 2,
            "lock_time" : 0,
            "in" : [
                {
                    "prev_out" : {
                        "hash" : "1ff50ec1208497b333972da7dfdb2ba92c18da901df997d630b32981a013b783",
                        "n" : 0
                    },
                    "scriptSig" : "0x0132831D85F7395034FD537CADFB5BC3DF134347E73BD76352D31314686785B17320024351730466BEC02AD0A9D1F2BFBF4F246AFA8EE4B1BEE3FA8B83801B8301AF5820024430 0x51342C8A6D8C38C33413C63BE8CA93AD060BEA212D961EA63F4C76013E81978A06934604515C7941A729450A508CF556AD6B5061ADABF74C8F881C44B2405CDA04"
                }
            ],
            "out" : [
                {
                    "value" : 0.05000000000000000,
                    "scriptPubKey" : "OP_DUP OP_HASH160 0xE183BC5BB9CEF757C51BCD8B864A8F2210114373 OP_EQUALVERIFY OP_CHECKSIG"
                },
                {
                    "value" : 0.4300000000000000,
                    "scriptPubKey" : "OP_DUP OP_HASH160 0x209F7B58DC860A2B0D2547FE659D78DFFC68FA77 OP_EQUALVERIFY OP_CHECKSIG"
                }
            ]
        },
        {
            "hash" : "d561a3594fcf97dd1a1abe7a1eda15c8e335aaaecf97f959de0595298d87c6d5",
            "ver" : 1,
            "vin_sz" : 1,
            "vout_sz" : 2,
            "lock_time" : 0,
            "in" : [
                {
                    "prev_out" : {
                        "hash" : "c61a96af68cce7329a450c18e3ac359d3052bda9187515a42fa7d262405213bd",
                        "n" : 1
                    },
                    "scriptSig" : "0x01DCDA3BAD3620FE246F2D973D6128123FC5F054121624852D98CEA4A3333128D00021025FFA265DA89861FC609792AD193204FCF0B2C1823B2D23052BCBD468274367BA0021024630 0x53B6705A0E13FD31A87C4F5F43ABDA77995B7CDA87B521043488254B16A122AFE99EA0BAE780CA19C6DCB733ECA9F42404B1F77951703B4057362704C126BD2304"
                }
            ],
            "out" : [
                {
                    "value" : 0.05000000000000000,
                    "scriptPubKey" : "OP_DUP OP_HASH160 0x388E046D522A5EFDBFD272EAE11E9718F8C10FA0 OP_EQUALVERIFY OP_CHECKSIG"
                },
                {
                    "value" : 0.3800000000000000,
                    "scriptPubKey" : "OP_DUP OP_HASH160 0x1FC4B63556EB262B048F4A908875A62E338F7364 OP_EQUALVERIFY OP_CHECKSIG"
                }
            ]
        }
    ],
    "mrkl_tree" : [
        "f85e77e4379694c8d2c1232d6fddfc7792073fb8484bdac37a9ba5ed1d245c57",
        "38431f2f029a37a74a5b5bf0327f41a67b83aef8ad60a2efe918a8f1f0e7df1b",
        "c61a96af68cce7329a450c18e3ac359d3052bda9187515a42fa7d262405213bd",
        "d561a3594fcf97dd1a1abe7a1eda15c8e335aaaecf97f959de0595298d87c6d5",
        "b626f3cd7c1fd229bffbec34fab2700bc31659dbf2a74f7916701a18490125b4",
        "dd74eea07e9bf2744655a9bab3a8cdbc5fe9a0c86ad18f42a2c259d40a83decb",
        "9d436c694968454ea0d17f4aece3b829930027c3cb918e5107a1605aa2eeae33"
    ]
}
146  Bitcoin / Development & Technical Discussion / HOWTO: create git mirror of SVN repo on: July 31, 2010, 11:01:19 PM
It seems like a lot of people out there are using git to follow the bitcoin SVN repo, and some are having trouble with line endings.

Here is the method of creating a local git repository, containing nothing but satoshi's upstream SVN commits:
Code:
$ git svn clone --stdlayout https://bitcoin.svn.sourceforge.net/svnroot/bitcoin

When satoshi updates his SVN, here is the method for updating your local repository:
Code:
$ git svn fetch && git pull . refs/remotes/trunk

It is advisable to maintain a vanilla repository or branch, and do your work in a separate repo, such as
Code:
$ git clone bitcoin bitcoin.jg-hacks

or create a side branch,
Code:
$ cd bitcoin
$ git checkout -b jg-hacks master
147  Bitcoin / Development & Technical Discussion / Official git mirror of bitcoin SVN? on: July 30, 2010, 04:16:54 PM

Has anyone yet created a 100% vanilla mirror of bitcoin SVN, using git?

Looking for one that does not have any mods from vanilla bitcoin, and will never have any mods deviating from vanilla bitcoin.

Thanks.
148  Bitcoin / Development & Technical Discussion / [PATCH] RPC: display existing extended-help descriptions on: July 30, 2010, 06:24:12 AM

Several RPC commands have multi-line help descriptions, but they do not appear to be shown anywhere.  The following patch implements a
Code:
help [command]
parameter that provides access to these extended descriptions.

Patch: http://pastebin.ca/1911586
Raw: http://pastebin.ca/raw/1911586

Here is example output for the new "help listreceivedbyaddress" sub-command:
Code:
[jgarzik@bd ~]$ /garz/repo/bitcoin/bitcoind -datadir=/garz/bitcoin/data help listreceivedbyaddress

listreceivedbyaddress [minconf=1] [includeempty=false]
[minconf] is the minimum number of confirmations before payments are included.
[includeempty] whether to include addresses that haven't received any payments.
Returns an array of objects containing:
  "address" : receiving address
  "label" : the label of the receiving address
  "amount" : total amount received by the address
  "confirmations" : number of confirmations of the most recent transaction included
149  Bitcoin / Development & Technical Discussion / [PATCH] implement 'xlisttransactions' on: July 29, 2010, 12:34:53 AM
Here is a patch against SVN 117, implementing 'xlisttransactions' RPC: http://pastebin.ca/1910553   At present, the options are ignored, and it dumps all transactions it finds.

Raw patch: http://pastebin.ca/raw/1910553

Edit: Patch's current home is http://yyz.us/bitcoin/patch.bitcoin-listtransactions

Edit2: RPC command has been renamed to 'xlisttransactions'

150  Bitcoin / Development & Technical Discussion / [PATCH] obtain khash/s speed via RPC "getinfo" on: July 28, 2010, 10:19:32 PM

Here is a simple patch that updates "getinfo" to display khash/s speed information: http://pastebin.ca/1910464

Raw patch download here:  http://pastebin.ca/raw/1910464

151  Bitcoin / Development & Technical Discussion / listtransactions support on: July 28, 2010, 05:05:08 AM

Here is my attempt to implement basic listtransactions support:

         http://pastebin.ca/1909858  (patch to rpc.cpp against SVN)

As I have not yet gotten a native build going yet, could I trouble someone to take a look at this?  I am -not- a C++ expert by any means, so there might be some obvious bugs.

listtransactions is IMO an important addition, because there is AFAICT no other way to list each individual transaction.  All the other list* and get* functions have a tally of some sort.  Automated use really implies a need for fine-grained transaction lists.
152  Economy / Economics / [US] Taxes and gold coins on: July 21, 2010, 08:49:37 PM
Something eventually relevant to bitcoin and Pecunix?

http://abcnews.go.com/Business/gold-coin-dealers-decry-tax-law/story?id=11211611

Starting Jan. 1, 2012, Form 1099s will become a means of reporting to the Internal Revenue Service the purchases of all goods and services by small businesses and self-employed people that exceed $600 during a calendar year. Precious metals such as coins and bullion fall into this category and coin dealers have been among those most rankled by the change.

This provision, intended to mine what the IRS deems a vast reservoir of uncollected income tax, was included in the health care legislation ostensibly as a way to pay for it. The tax code tweak is expected to raise $17 billion over the next 10 years, according to the Joint Committee on Taxation.
Pages: « 1 2 3 4 5 6 7 [8]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!