Skip to content

Commit f5f48f1

Browse files
Merge pull request #163 from cardano-foundation/ls_update
chore: add docker folder and update migration files
2 parents 1d4a7d0 + 2429230 commit f5f48f1

10 files changed

+387
-347
lines changed

aggregation-app/src/main/resources/application.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ spring:
1919
jdbc:
2020
batch_size: 100
2121
order_inserts: true
22-
22+
batch:
23+
job:
24+
enabled: false
2325
apiPrefix: /api/v1
2426

2527
logging:
@@ -43,6 +45,7 @@ store:
4345
write-thread-default-batch-size: 1000
4446
jooq-write-batch-size: 3000
4547
write-thread-count: 5
48+
address-cache-enabled: true
4649
executor:
4750
enable-parallel-processing: true
4851
block-processing-threads: 15

application/src/main/resources/db/migration/ledgersync/V1_1_1__init-schema.sql

Lines changed: 110 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -111,39 +111,61 @@ CREATE TABLE IF NOT EXISTS epoch
111111

112112
CREATE TABLE IF NOT EXISTS epoch_param
113113
(
114-
id bigint NOT NULL,
115-
coins_per_utxo_size numeric(20, 0),
116-
collateral_percent integer,
117-
decentralisation double precision NOT NULL,
118-
epoch_no integer NOT NULL,
119-
extra_entropy character varying(64),
120-
influence double precision NOT NULL,
121-
key_deposit numeric(20, 0) NOT NULL,
122-
max_bh_size integer NOT NULL,
123-
max_block_ex_mem numeric(20, 0),
124-
max_block_ex_steps numeric(20, 0),
125-
max_block_size integer NOT NULL,
126-
max_collateral_inputs integer,
127-
max_epoch integer NOT NULL,
128-
max_tx_ex_mem numeric(20, 0),
129-
max_tx_ex_steps numeric(20, 0),
130-
max_tx_size integer NOT NULL,
131-
max_val_size numeric(20, 0),
132-
min_fee_a integer NOT NULL,
133-
min_fee_b integer NOT NULL,
134-
min_pool_cost numeric(20, 0) NOT NULL,
135-
min_utxo_value numeric(20, 0),
136-
monetary_expand_rate double precision NOT NULL,
137-
nonce character varying(64),
138-
optimal_pool_count integer NOT NULL,
139-
pool_deposit numeric(20, 0) NOT NULL,
140-
price_mem double precision,
141-
price_step double precision,
142-
protocol_major integer NOT NULL,
143-
protocol_minor integer NOT NULL,
144-
treasury_growth_rate double precision NOT NULL,
145-
block_id bigint NOT NULL,
146-
cost_model_id bigint
114+
id bigint NOT NULL,
115+
coins_per_utxo_size numeric(20, 0),
116+
collateral_percent integer,
117+
decentralisation double precision NOT NULL,
118+
epoch_no integer NOT NULL,
119+
extra_entropy character varying(64),
120+
influence double precision NOT NULL,
121+
key_deposit numeric(20, 0) NOT NULL,
122+
max_bh_size integer NOT NULL,
123+
max_block_ex_mem numeric(20, 0),
124+
max_block_ex_steps numeric(20, 0),
125+
max_block_size integer NOT NULL,
126+
max_collateral_inputs integer,
127+
max_epoch integer NOT NULL,
128+
max_tx_ex_mem numeric(20, 0),
129+
max_tx_ex_steps numeric(20, 0),
130+
max_tx_size integer NOT NULL,
131+
max_val_size numeric(20, 0),
132+
min_fee_a integer NOT NULL,
133+
min_fee_b integer NOT NULL,
134+
min_pool_cost numeric(20, 0) NOT NULL,
135+
min_utxo_value numeric(20, 0),
136+
monetary_expand_rate double precision NOT NULL,
137+
nonce character varying(64),
138+
optimal_pool_count integer NOT NULL,
139+
pool_deposit numeric(20, 0) NOT NULL,
140+
price_mem double precision,
141+
price_step double precision,
142+
protocol_major integer NOT NULL,
143+
protocol_minor integer NOT NULL,
144+
treasury_growth_rate double precision NOT NULL,
145+
block_id bigint NOT NULL,
146+
cost_model_id bigint,
147+
pvt_motion_no_confidence double precision,
148+
pvt_commit_normal double precision,
149+
pvt_committee_no_confidence double precision,
150+
pvt_hard_fork_initiation double precision,
151+
pvt_p_p_security_group double precision,
152+
pvt_p_p_technical_group double precision,
153+
pvt_p_p_gov_group double precision,
154+
pvt_treasury_withdrawal double precision,
155+
dvt_motion_no_confidence double precision,
156+
dvt_commitee_normal double precision,
157+
dvt_committee_no_confidence double precision,
158+
dvt_update_to_constitution double precision,
159+
dvt_hard_fork_initiation double precision,
160+
dvt_p_p_network_group double precision,
161+
dvt_p_p_economic_group double precision,
162+
committee_min_size numeric(20, 0),
163+
committee_max_term_length numeric(20, 0),
164+
gov_action_lifetime numeric(20, 0),
165+
gov_action_deposit numeric(20, 0),
166+
drep_deposit numeric(20, 0),
167+
drep_activity numeric(20, 0),
168+
min_fee_ref_script_cost_per_byte numeric(20, 0)
147169
);
148170

149171
--
@@ -251,9 +273,7 @@ CREATE TABLE IF NOT EXISTS multi_asset
251273
name bytea NOT NULL,
252274
policy character varying(56) NOT NULL,
253275
supply numeric(23, 0),
254-
tx_count bigint,
255276
"time" timestamp without time zone,
256-
total_volume numeric(40),
257277
name_view varchar(64)
258278
);
259279

@@ -263,39 +283,61 @@ CREATE TABLE IF NOT EXISTS multi_asset
263283

264284
CREATE TABLE IF NOT EXISTS param_proposal
265285
(
266-
id bigint NOT NULL,
267-
coins_per_utxo_size numeric(19, 2),
268-
collateral_percent integer,
269-
decentralisation double precision,
270-
entropy character varying(64),
271-
epoch_no integer NOT NULL,
272-
influence double precision,
273-
key character varying(56) NOT NULL,
274-
key_deposit numeric(19, 2),
275-
max_bh_size numeric(20, 0),
276-
max_block_ex_mem numeric(20, 0),
277-
max_block_ex_steps numeric(20, 0),
278-
max_block_size numeric(20, 0),
279-
max_collateral_inputs integer,
280-
max_epoch numeric(20, 0),
281-
max_tx_ex_mem numeric(20, 0),
282-
max_tx_ex_steps numeric(20, 0),
283-
max_tx_size numeric(20, 0),
284-
max_val_size numeric(20, 0),
285-
min_fee_a numeric(20, 0),
286-
min_fee_b numeric(20, 0),
287-
min_pool_cost numeric(20, 0),
288-
min_utxo_value numeric(20, 0),
289-
monetary_expand_rate double precision,
290-
optimal_pool_count numeric(20, 0),
291-
pool_deposit numeric(20, 0),
292-
price_mem double precision,
293-
price_step double precision,
294-
protocol_major integer,
295-
protocol_minor integer,
296-
treasury_growth_rate double precision,
297-
cost_model_id bigint,
298-
registered_tx_id bigint NOT NULL
286+
id bigint NOT NULL,
287+
coins_per_utxo_size numeric(19, 2),
288+
collateral_percent integer,
289+
decentralisation double precision,
290+
entropy character varying(64),
291+
epoch_no integer NOT NULL,
292+
influence double precision,
293+
key character varying(56) NOT NULL,
294+
key_deposit numeric(19, 2),
295+
max_bh_size numeric(20, 0),
296+
max_block_ex_mem numeric(20, 0),
297+
max_block_ex_steps numeric(20, 0),
298+
max_block_size numeric(20, 0),
299+
max_collateral_inputs integer,
300+
max_epoch numeric(20, 0),
301+
max_tx_ex_mem numeric(20, 0),
302+
max_tx_ex_steps numeric(20, 0),
303+
max_tx_size numeric(20, 0),
304+
max_val_size numeric(20, 0),
305+
min_fee_a numeric(20, 0),
306+
min_fee_b numeric(20, 0),
307+
min_pool_cost numeric(20, 0),
308+
min_utxo_value numeric(20, 0),
309+
monetary_expand_rate double precision,
310+
optimal_pool_count numeric(20, 0),
311+
pool_deposit numeric(20, 0),
312+
price_mem double precision,
313+
price_step double precision,
314+
protocol_major integer,
315+
protocol_minor integer,
316+
treasury_growth_rate double precision,
317+
cost_model_id bigint,
318+
registered_tx_id bigint NOT NULL,
319+
pvt_motion_no_confidence double precision,
320+
pvt_commit_normal double precision,
321+
pvt_committee_no_confidence double precision,
322+
pvt_hard_fork_initiation double precision,
323+
pvt_p_p_security_group double precision,
324+
pvt_p_p_technical_group double precision,
325+
pvt_p_p_gov_group double precision,
326+
pvt_treasury_withdrawal double precision,
327+
dvt_motion_no_confidence double precision,
328+
dvt_commitee_normal double precision,
329+
dvt_committee_no_confidence double precision,
330+
dvt_update_to_constitution double precision,
331+
dvt_hard_fork_initiation double precision,
332+
dvt_p_p_network_group double precision,
333+
dvt_p_p_economic_group double precision,
334+
committee_min_size numeric(20, 0),
335+
committee_max_term_length numeric(20, 0),
336+
gov_action_lifetime numeric(20, 0),
337+
gov_action_deposit numeric(20, 0),
338+
drep_deposit numeric(20, 0),
339+
drep_activity numeric(20, 0),
340+
min_fee_ref_script_cost_per_byte numeric(20, 0)
299341
);
300342

301343
--
@@ -561,7 +603,6 @@ CREATE TABLE IF NOT EXISTS stake_address
561603
hash_raw character varying(255) NOT NULL,
562604
script_hash character varying(56),
563605
view character varying(65535) NOT NULL,
564-
balance numeric(39),
565606
available_reward numeric(39)
566607
);
567608

@@ -692,58 +733,6 @@ CREATE TABLE IF NOT EXISTS withdrawal
692733
-- Tag: extended edition; Type: TABLE
693734
--
694735

695-
--
696-
-- Name: address; Type: TABLE;
697-
--
698-
699-
CREATE TABLE IF NOT EXISTS address
700-
(
701-
id bigint NOT NULL,
702-
address varchar(65535) NOT NULL,
703-
address_has_script boolean NOT NULL,
704-
balance numeric(39) NOT NULL,
705-
tx_count bigint,
706-
stake_address_id bigint,
707-
verified_contract boolean,
708-
payment_cred varchar(56)
709-
);
710-
711-
--
712-
-- Name: address_token; Type: TABLE;
713-
--
714-
715-
CREATE TABLE IF NOT EXISTS address_token
716-
(
717-
id bigint NOT NULL,
718-
balance numeric(39) NOT NULL,
719-
ident bigint NOT NULL,
720-
tx_id bigint NOT NULL,
721-
address_id bigint NULL
722-
);
723-
724-
--
725-
-- Name: address_tx_balance; Type: TABLE;
726-
--
727-
728-
CREATE TABLE IF NOT EXISTS address_tx_balance
729-
(
730-
id bigint NOT NULL,
731-
balance numeric(39) NOT NULL,
732-
time timestamp,
733-
tx_id bigint NOT NULL,
734-
address_id bigint NULL,
735-
stake_address_id bigint
736-
);
737-
738-
CREATE TABLE IF NOT EXISTS address_token_balance
739-
(
740-
id bigint NOT NULL,
741-
address_id bigint NULL,
742-
balance numeric(39) NOT NULL,
743-
ident bigint,
744-
stake_address_id bigint
745-
);
746-
747736
--
748737
-- Name: rollback_history; Type: TABLE;
749738
--
@@ -766,21 +755,6 @@ CREATE TABLE IF NOT EXISTS unconsume_tx_in
766755
redeemer_id bigint
767756
);
768757

769-
CREATE TABLE IF NOT EXISTS tx_chart
770-
(
771-
id bigserial NOT NULL
772-
PRIMARY KEY,
773-
day NUMERIC(13) NOT NULL,
774-
hour NUMERIC(13) NOT NULL,
775-
minute NUMERIC(13) NOT NULL,
776-
month NUMERIC(13) NOT NULL,
777-
tx_count bigint NOT NULL,
778-
tx_simple bigint NOT NULL,
779-
tx_with_metadata_without_sc bigint NOT NULL,
780-
tx_with_sc bigint NOT NULL,
781-
year NUMERIC(13) NOT NULL
782-
);
783-
784758
CREATE TABLE IF NOT EXISTS tx_metadata_hash
785759
(
786760
id bigserial NOT NULL

0 commit comments

Comments
 (0)