Rosalind M. Stflorant
4 years ago
committed by
Brooke L. Rediker
17 changed files with 227 additions and 32 deletions
-
69bin/signtx.pl
-
30config.yml
-
25curltest.sh
-
2genesis.yml
-
2lib
-
7notes.md
-
2salts/Genesis.yml
-
BINsecrets/coinbase.yml
-
BINsecrets/keys.yml
-
8t/blockaddr.t
-
13t/eckeys.t
-
17t/genesis.t
-
24t/khash.t
-
20t/mbase.t
-
15t/merkleroot.t
-
14txpool/Ztxrms5c5oKqb9Zof3xeC5Q2ZQjSaWv7FU4rAxe2s3sP.yml
-
11txpool/txcoin.yml
@ -0,0 +1,30 @@ |
|||
--- # toychain's config |
|||
version: 1.06 |
|||
chain: toychain |
|||
apiver: '0.0' |
|||
ipfsgw: 8390 |
|||
port: 8089 |
|||
|
|||
# p2p network = api+1 |
|||
apis: |
|||
- 127.0.0.1:8091 |
|||
- 127.0.0.2:8093 |
|||
- 127.0.0.3:8095 |
|||
- 127.0.0.4:8097 |
|||
- 127.0.0.5:8099 |
|||
|
|||
# block parameters : |
|||
bkver: 0 |
|||
bkreward: 100 |
|||
genhash: Z9BEepHz9jLWzNebDEZTrEKusuU9zomFoaaPxngCQ5D39 |
|||
nullhash: Z9BEeWD4Mww7yrXyPRXrfM2y6FxsQGfaNPzC8DxWq4ATq |
|||
txgen: Ztxrms5c5oKqb9Zof3xeC5Q2ZQjSaWv7FU4rAxe2s3sP |
|||
txcoin: ZCBuCkQFRBeiGnANEwb65TZptSTUpm62WYS4Xj9gkMLU |
|||
txcoin: ZCBtx9SS9n57R2cx3AAuRDKJ4b9WsWA5MoTVEtxGQAdV |
|||
|
|||
|
|||
# Proof of Work option |
|||
difficulty: 5 |
|||
maxdiff: 7 |
|||
# CAstore options |
|||
trackmode: 1 |
@ -1 +1 @@ |
|||
Subproject commit 108a4b5442111374e51ecdc66992520aad233724 |
|||
Subproject commit 8a8f4a627abf429965d7d9db4ff519e83f57945c |
@ -1 +1 @@ |
|||
salt: 8163726776410142252 |
|||
salt: 8163726776976957032 |
@ -0,0 +1,24 @@ |
|||
#!/usr/bin/perl |
|||
|
|||
BEGIN { if (-e $ENV{SITE}.'/lib') { use lib $ENV{SITE}.'/lib'; } } |
|||
use misc qw(khash); |
|||
use encode qw(mbase58 mbase36 mbase16); |
|||
|
|||
my $hash; |
|||
|
|||
$hash = &khash('MD5',undef); |
|||
printf "md5: %s\n",mbase16($hash); |
|||
$hash = &khash('SHA1',undef); |
|||
printf "sha1: %s\n",mbase16($hash); |
|||
$hash = &khash('SHA256',undef); |
|||
printf "sha2: %s\n",mbase16($hash); |
|||
|
|||
$hash = &khash('SHA256','Hello World!'); |
|||
printf "kh58: %s\n",mbase58($hash); |
|||
|
|||
$hash = &khash('SHA3_224','Hello World!'); |
|||
printf "kh36: %s\n",mbase36($hash); |
|||
|
|||
exit $?; |
|||
1; |
|||
|
@ -0,0 +1,20 @@ |
|||
#!/usr/bin/perl |
|||
|
|||
BEGIN { if (-e $ENV{SITE}.'/lib') { use lib $ENV{SITE}.'/lib'; } } |
|||
|
|||
use seed qw(rand64); |
|||
use encode qw(mbase58 mbase36 mbase16); |
|||
|
|||
my $seed = &seed::setseed('testing mbase* subroutines'); |
|||
my $r = rand64(); |
|||
my $q = pack'Q',$r; |
|||
printf "seed: %s\n",$seed; |
|||
printf "r: %s\n",$r; |
|||
printf "q: 0x%s\n",unpack'H*',$q; |
|||
printf "r58: %s\n",&mbase58($q); |
|||
printf "r36: %s\n",&mbase36($q); |
|||
printf "r16: %s\n",&mbase16($q); |
|||
|
|||
exit $?; |
|||
|
|||
1; |
@ -0,0 +1,15 @@ |
|||
#!/usr/bin/perl |
|||
|
|||
BEGIN { if (-e $ENV{SITE}.'/lib') { use lib $ENV{SITE}.'/lib'; } } |
|||
|
|||
use TXPOOL qw(computeMerkleRoot mbase16); |
|||
|
|||
my $a = [qw(a b c d e f g)]; |
|||
|
|||
my $mr = &computeMerkleRoot($a); |
|||
|
|||
printf "mr: %s\n",mbase16($mr); |
|||
|
|||
exit $?; |
|||
|
|||
1; |
@ -0,0 +1,14 @@ |
|||
--- |
|||
inputs: |
|||
- |
|||
coinbase: 50 |
|||
nonce: '3976914969180171529' |
|||
outputs: |
|||
- |
|||
Z21GdiEggiGa7TPNaqGY8coBy97LoRNpPVu9fxig75nstq: 50 |
|||
payload: This is a coinbase transaction of 50 coins for the genesis block |
|||
pow: '3976914969180650994' |
|||
signatures: |
|||
- |
|||
coinbase: Zan1RjVTw7GPVyd7aygjWSrGCtX3M8CVRu3NAyqLC8MToNPE93ju4RrFFjunnbeTYnudR2gSKCamK82xjEfWEtGzGvTRDw25MG |
|||
timestamp: '1623683269225552702' |
@ -0,0 +1,11 @@ |
|||
--- |
|||
timestamp: '1625385951347499858' |
|||
inputs: |
|||
- coinbase: 100 |
|||
nonce: '3976914969180171529' |
|||
outputs: |
|||
- Z21GdiEggiGa7TPNaqGY8coBy97LoRNpPVu9fxig75nstq: 100 |
|||
message: This is a coinbase transaction of 100 coins to be distributed to Z21GdiEggiGa7TPNaqGY8coBy97LoRNpPVu9fxig75nstq |
|||
pow: '3976914969180292365' |
|||
signatures: |
|||
- coinbase: ~ |
Write
Preview
Loading…
Cancel
Save
Reference in new issue