Skip to content

Commit

Permalink
Merge pull request #163 from cardano-foundation/ls_update
Browse files Browse the repository at this point in the history
chore: add docker folder and update migration files
  • Loading branch information
Sotatek-HuyLe3a authored Apr 12, 2024
2 parents 1d4a7d0 + 2429230 commit f5f48f1
Show file tree
Hide file tree
Showing 10 changed files with 387 additions and 347 deletions.
5 changes: 4 additions & 1 deletion aggregation-app/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ spring:
jdbc:
batch_size: 100
order_inserts: true

batch:
job:
enabled: false
apiPrefix: /api/v1

logging:
Expand All @@ -43,6 +45,7 @@ store:
write-thread-default-batch-size: 1000
jooq-write-batch-size: 3000
write-thread-count: 5
address-cache-enabled: true
executor:
enable-parallel-processing: true
block-processing-threads: 15
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,39 +111,61 @@ CREATE TABLE IF NOT EXISTS epoch

CREATE TABLE IF NOT EXISTS epoch_param
(
id bigint NOT NULL,
coins_per_utxo_size numeric(20, 0),
collateral_percent integer,
decentralisation double precision NOT NULL,
epoch_no integer NOT NULL,
extra_entropy character varying(64),
influence double precision NOT NULL,
key_deposit numeric(20, 0) NOT NULL,
max_bh_size integer NOT NULL,
max_block_ex_mem numeric(20, 0),
max_block_ex_steps numeric(20, 0),
max_block_size integer NOT NULL,
max_collateral_inputs integer,
max_epoch integer NOT NULL,
max_tx_ex_mem numeric(20, 0),
max_tx_ex_steps numeric(20, 0),
max_tx_size integer NOT NULL,
max_val_size numeric(20, 0),
min_fee_a integer NOT NULL,
min_fee_b integer NOT NULL,
min_pool_cost numeric(20, 0) NOT NULL,
min_utxo_value numeric(20, 0),
monetary_expand_rate double precision NOT NULL,
nonce character varying(64),
optimal_pool_count integer NOT NULL,
pool_deposit numeric(20, 0) NOT NULL,
price_mem double precision,
price_step double precision,
protocol_major integer NOT NULL,
protocol_minor integer NOT NULL,
treasury_growth_rate double precision NOT NULL,
block_id bigint NOT NULL,
cost_model_id bigint
id bigint NOT NULL,
coins_per_utxo_size numeric(20, 0),
collateral_percent integer,
decentralisation double precision NOT NULL,
epoch_no integer NOT NULL,
extra_entropy character varying(64),
influence double precision NOT NULL,
key_deposit numeric(20, 0) NOT NULL,
max_bh_size integer NOT NULL,
max_block_ex_mem numeric(20, 0),
max_block_ex_steps numeric(20, 0),
max_block_size integer NOT NULL,
max_collateral_inputs integer,
max_epoch integer NOT NULL,
max_tx_ex_mem numeric(20, 0),
max_tx_ex_steps numeric(20, 0),
max_tx_size integer NOT NULL,
max_val_size numeric(20, 0),
min_fee_a integer NOT NULL,
min_fee_b integer NOT NULL,
min_pool_cost numeric(20, 0) NOT NULL,
min_utxo_value numeric(20, 0),
monetary_expand_rate double precision NOT NULL,
nonce character varying(64),
optimal_pool_count integer NOT NULL,
pool_deposit numeric(20, 0) NOT NULL,
price_mem double precision,
price_step double precision,
protocol_major integer NOT NULL,
protocol_minor integer NOT NULL,
treasury_growth_rate double precision NOT NULL,
block_id bigint NOT NULL,
cost_model_id bigint,
pvt_motion_no_confidence double precision,
pvt_commit_normal double precision,
pvt_committee_no_confidence double precision,
pvt_hard_fork_initiation double precision,
pvt_p_p_security_group double precision,
pvt_p_p_technical_group double precision,
pvt_p_p_gov_group double precision,
pvt_treasury_withdrawal double precision,
dvt_motion_no_confidence double precision,
dvt_commitee_normal double precision,
dvt_committee_no_confidence double precision,
dvt_update_to_constitution double precision,
dvt_hard_fork_initiation double precision,
dvt_p_p_network_group double precision,
dvt_p_p_economic_group double precision,
committee_min_size numeric(20, 0),
committee_max_term_length numeric(20, 0),
gov_action_lifetime numeric(20, 0),
gov_action_deposit numeric(20, 0),
drep_deposit numeric(20, 0),
drep_activity numeric(20, 0),
min_fee_ref_script_cost_per_byte numeric(20, 0)
);

--
Expand Down Expand Up @@ -251,9 +273,7 @@ CREATE TABLE IF NOT EXISTS multi_asset
name bytea NOT NULL,
policy character varying(56) NOT NULL,
supply numeric(23, 0),
tx_count bigint,
"time" timestamp without time zone,
total_volume numeric(40),
name_view varchar(64)
);

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

CREATE TABLE IF NOT EXISTS param_proposal
(
id bigint NOT NULL,
coins_per_utxo_size numeric(19, 2),
collateral_percent integer,
decentralisation double precision,
entropy character varying(64),
epoch_no integer NOT NULL,
influence double precision,
key character varying(56) NOT NULL,
key_deposit numeric(19, 2),
max_bh_size numeric(20, 0),
max_block_ex_mem numeric(20, 0),
max_block_ex_steps numeric(20, 0),
max_block_size numeric(20, 0),
max_collateral_inputs integer,
max_epoch numeric(20, 0),
max_tx_ex_mem numeric(20, 0),
max_tx_ex_steps numeric(20, 0),
max_tx_size numeric(20, 0),
max_val_size numeric(20, 0),
min_fee_a numeric(20, 0),
min_fee_b numeric(20, 0),
min_pool_cost numeric(20, 0),
min_utxo_value numeric(20, 0),
monetary_expand_rate double precision,
optimal_pool_count numeric(20, 0),
pool_deposit numeric(20, 0),
price_mem double precision,
price_step double precision,
protocol_major integer,
protocol_minor integer,
treasury_growth_rate double precision,
cost_model_id bigint,
registered_tx_id bigint NOT NULL
id bigint NOT NULL,
coins_per_utxo_size numeric(19, 2),
collateral_percent integer,
decentralisation double precision,
entropy character varying(64),
epoch_no integer NOT NULL,
influence double precision,
key character varying(56) NOT NULL,
key_deposit numeric(19, 2),
max_bh_size numeric(20, 0),
max_block_ex_mem numeric(20, 0),
max_block_ex_steps numeric(20, 0),
max_block_size numeric(20, 0),
max_collateral_inputs integer,
max_epoch numeric(20, 0),
max_tx_ex_mem numeric(20, 0),
max_tx_ex_steps numeric(20, 0),
max_tx_size numeric(20, 0),
max_val_size numeric(20, 0),
min_fee_a numeric(20, 0),
min_fee_b numeric(20, 0),
min_pool_cost numeric(20, 0),
min_utxo_value numeric(20, 0),
monetary_expand_rate double precision,
optimal_pool_count numeric(20, 0),
pool_deposit numeric(20, 0),
price_mem double precision,
price_step double precision,
protocol_major integer,
protocol_minor integer,
treasury_growth_rate double precision,
cost_model_id bigint,
registered_tx_id bigint NOT NULL,
pvt_motion_no_confidence double precision,
pvt_commit_normal double precision,
pvt_committee_no_confidence double precision,
pvt_hard_fork_initiation double precision,
pvt_p_p_security_group double precision,
pvt_p_p_technical_group double precision,
pvt_p_p_gov_group double precision,
pvt_treasury_withdrawal double precision,
dvt_motion_no_confidence double precision,
dvt_commitee_normal double precision,
dvt_committee_no_confidence double precision,
dvt_update_to_constitution double precision,
dvt_hard_fork_initiation double precision,
dvt_p_p_network_group double precision,
dvt_p_p_economic_group double precision,
committee_min_size numeric(20, 0),
committee_max_term_length numeric(20, 0),
gov_action_lifetime numeric(20, 0),
gov_action_deposit numeric(20, 0),
drep_deposit numeric(20, 0),
drep_activity numeric(20, 0),
min_fee_ref_script_cost_per_byte numeric(20, 0)
);

--
Expand Down Expand Up @@ -561,7 +603,6 @@ CREATE TABLE IF NOT EXISTS stake_address
hash_raw character varying(255) NOT NULL,
script_hash character varying(56),
view character varying(65535) NOT NULL,
balance numeric(39),
available_reward numeric(39)
);

Expand Down Expand Up @@ -692,58 +733,6 @@ CREATE TABLE IF NOT EXISTS withdrawal
-- Tag: extended edition; Type: TABLE
--

--
-- Name: address; Type: TABLE;
--

CREATE TABLE IF NOT EXISTS address
(
id bigint NOT NULL,
address varchar(65535) NOT NULL,
address_has_script boolean NOT NULL,
balance numeric(39) NOT NULL,
tx_count bigint,
stake_address_id bigint,
verified_contract boolean,
payment_cred varchar(56)
);

--
-- Name: address_token; Type: TABLE;
--

CREATE TABLE IF NOT EXISTS address_token
(
id bigint NOT NULL,
balance numeric(39) NOT NULL,
ident bigint NOT NULL,
tx_id bigint NOT NULL,
address_id bigint NULL
);

--
-- Name: address_tx_balance; Type: TABLE;
--

CREATE TABLE IF NOT EXISTS address_tx_balance
(
id bigint NOT NULL,
balance numeric(39) NOT NULL,
time timestamp,
tx_id bigint NOT NULL,
address_id bigint NULL,
stake_address_id bigint
);

CREATE TABLE IF NOT EXISTS address_token_balance
(
id bigint NOT NULL,
address_id bigint NULL,
balance numeric(39) NOT NULL,
ident bigint,
stake_address_id bigint
);

--
-- Name: rollback_history; Type: TABLE;
--
Expand All @@ -766,21 +755,6 @@ CREATE TABLE IF NOT EXISTS unconsume_tx_in
redeemer_id bigint
);

CREATE TABLE IF NOT EXISTS tx_chart
(
id bigserial NOT NULL
PRIMARY KEY,
day NUMERIC(13) NOT NULL,
hour NUMERIC(13) NOT NULL,
minute NUMERIC(13) NOT NULL,
month NUMERIC(13) NOT NULL,
tx_count bigint NOT NULL,
tx_simple bigint NOT NULL,
tx_with_metadata_without_sc bigint NOT NULL,
tx_with_sc bigint NOT NULL,
year NUMERIC(13) NOT NULL
);

CREATE TABLE IF NOT EXISTS tx_metadata_hash
(
id bigserial NOT NULL
Expand Down
Loading

0 comments on commit f5f48f1

Please sign in to comment.