Skip to content

Commit a94ad4b

Browse files
author
Peter Pratscher
committed
Update schema for new testnet
Proper formatting of coinbase value in block view Fix CI/CD
1 parent 5e063bf commit a94ad4b

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM golang:alpine AS build-env
2-
RUN apk --no-cache add build-base git bzr mercurial gcc npm
2+
RUN apk --no-cache add build-base git mercurial gcc npm
33
ADD . /src
44
RUN cd /src && make -B all
55

schema.sql

+25-25
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ drop table statistics;
2525

2626
create table if not exists blocks
2727
(
28-
statehash varchar(200) not null,
28+
statehash varchar(400) not null,
2929
canonical bool not null,
30-
previousstatehash varchar(200) not null,
31-
snarkedledgerhash varchar(200) not null,
32-
stagedledgerhash varchar(200) not null,
33-
coinbase int not null,
30+
previousstatehash varchar(400) not null,
31+
snarkedledgerhash varchar(400) not null,
32+
stagedledgerhash varchar(400) not null,
33+
coinbase numeric not null,
3434
creator varchar(200) not null,
3535
slot int not null,
3636
height int not null,
3737
epoch int not null,
3838
ts timestamp not null,
39-
totalcurrency int not null,
39+
totalcurrency numeric not null,
4040
usercommandscount int not null,
4141
snarkjobscount int not null,
4242
feetransfercount int not null,
@@ -48,7 +48,7 @@ create index idx_blocks_height on blocks (height);
4848

4949
create table if not exists snarkjobs
5050
(
51-
blockstatehash varchar(200) not null,
51+
blockstatehash varchar(400) not null,
5252
canonical bool not null,
5353
index int not null,
5454
jobids int[] not null,
@@ -60,7 +60,7 @@ create index idx_snarkjobs_prover on snarkjobs (prover);
6060

6161
create table if not exists feetransfers
6262
(
63-
blockstatehash varchar(200) not null,
63+
blockstatehash varchar(400) not null,
6464
canonical bool not null,
6565
index int not null,
6666
recipient varchar(200) not null,
@@ -71,27 +71,27 @@ create index idx_feetransfers_recipient on feetransfers (recipient);
7171

7272
create table if not exists userjobs
7373
(
74-
blockstatehash varchar(200) not null,
75-
canonical bool not null,
76-
index int not null,
77-
id varchar(1000) not null,
78-
sender varchar(200) not null,
79-
recipient varchar(200) not null,
80-
memo varchar(200) not null,
81-
fee int not null,
82-
amount int not null,
83-
nonce varchar(200) not null,
84-
delegation bool not null,
74+
blockstatehash varchar(400) not null,
75+
canonical bool not null,
76+
index int not null,
77+
id text not null,
78+
sender varchar(200) not null,
79+
recipient varchar(200) not null,
80+
memo varchar(200) not null,
81+
fee numeric not null,
82+
amount numeric not null,
83+
nonce varchar(200) not null,
84+
delegation bool not null,
8585
primary key (blockstatehash, index)
8686
);
8787
create index idx_userjobs_id on userjobs (id);
8888

8989
create table if not exists accounts
9090
(
9191
publickey varchar(200) not null primary key,
92-
balance int not null,
92+
balance numeric not null,
9393
nonce int not null,
94-
receiptchainhash varchar(200) not null,
94+
receiptchainhash varchar(400) not null,
9595
delegate varchar(200) not null,
9696
votingfor varchar(200) not null,
9797
txsent int not null,
@@ -113,9 +113,9 @@ create index idx_accounts_snarkjobs on accounts (snarkjobs);
113113
create table if not exists accounttransactions
114114
(
115115
publickey varchar(200) not null,
116-
blockstatehash varchar(200) not null,
116+
blockstatehash varchar(400) not null,
117117
canonical bool not null,
118-
id varchar(1000) not null,
118+
id text not null,
119119
ts timestamp not null,
120120
primary key (publickey, ts, blockstatehash, id)
121121
);
@@ -131,11 +131,11 @@ create table if not exists daemonstatus
131131
slotsperepoch int not null,
132132
consensusmechanism varchar(200) not null,
133133
highestblocklengthreceived int not null,
134-
ledgermerkleroot varchar(200) not null,
134+
ledgermerkleroot varchar(400) not null,
135135
numaccounts int not null,
136136
peers text[] not null,
137137
peerscount int not null,
138-
statehash varchar(200) not null,
138+
statehash varchar(400) not null,
139139
syncstatus varchar(200) not null,
140140
uptime int not null
141141
);

templates/block.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ <h4 class="alert-heading"><i class="fas fa-exclamation-triangle mr-1"></i>Block
104104
</div>
105105
<div class="row border-bottom p-3">
106106
<div class="col-md-2">Coinbase:</div>
107-
<div class="col-md-10">{{.Coinbase}}</div>
107+
<div class="col-md-10">{{.Coinbase | intcomma}}</div>
108108
</div>
109109
<div class="row border-bottom p-3">
110110
<div class="col-md-2">Coda Supply:</div>

0 commit comments

Comments
 (0)