From eebc9a23ced90e4ea0c46af5a6f2b019a1c1f0e1 Mon Sep 17 00:00:00 2001 From: Andrei Navoichyk Date: Thu, 14 Oct 2021 13:33:45 +0300 Subject: [PATCH 1/8] renaming --- ...{frontend.config-cere-stage.js => frontend.config-cere-stg.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename frontend/{frontend.config-cere-stage.js => frontend.config-cere-stg.js} (100%) diff --git a/frontend/frontend.config-cere-stage.js b/frontend/frontend.config-cere-stg.js similarity index 100% rename from frontend/frontend.config-cere-stage.js rename to frontend/frontend.config-cere-stg.js From d252a05ee5c803f596efb48d1600a04fbfea60a8 Mon Sep 17 00:00:00 2001 From: Andrei Navoichyk Date: Thu, 14 Oct 2021 15:35:15 +0300 Subject: [PATCH 2/8] updated README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8b5a7f2d..d74616d9 100644 --- a/README.md +++ b/README.md @@ -73,8 +73,9 @@ After that you need to access to Hasura console at http://localhost:8082 and: - Login as admin using the password you previously set in `HASURA_GRAPHQL_ADMIN_SECRET` - Track all tables -- For all tables go to Permissions and add a new ROLE named 'public' ony with SELECT permissions. -- For all tables enable aggregate under Permissions tab. +- For all tables go to Permissions and: + - Add a new ROLE named 'public' with SELECT permissions. + - Enable aggregate permissions. ### Frontend @@ -89,4 +90,4 @@ Generate a static build under `frontend/dist` directory: ```bash yarn workspace frontend generate -``` \ No newline at end of file +``` From d4957bb16388b8c45352cbe55298055a786f74bf Mon Sep 17 00:00:00 2001 From: karthikeyan-cere <73122026+karthikeyan-cere@users.noreply.github.com> Date: Mon, 18 Oct 2021 19:40:28 +0530 Subject: [PATCH 3/8] Added prod config (#16) * feat(config): adding prod config * feat(config): added changelog * feat(config): added sql script for prod * feat(config): updated changelog * Update CHANGELOG.md --- CHANGELOG.md | 3 +- backend/docker/sql/backend-prod.sql | 373 ++++++++++++++++++++++++++ frontend/frontend.config-cere-prod.js | 18 ++ 3 files changed, 393 insertions(+), 1 deletion(-) create mode 100644 backend/docker/sql/backend-prod.sql create mode 100644 frontend/frontend.config-cere-prod.js diff --git a/CHANGELOG.md b/CHANGELOG.md index a1c3e56a..14529230 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # Cerestats vNext -- Added API to add and get EDP info. \ No newline at end of file +- Added API to add and get EDP info. +- Added prod configuration for frontend and backend. diff --git a/backend/docker/sql/backend-prod.sql b/backend/docker/sql/backend-prod.sql new file mode 100644 index 00000000..517fd33f --- /dev/null +++ b/backend/docker/sql/backend-prod.sql @@ -0,0 +1,373 @@ +GRANT ALL PRIVILEGES ON DATABASE prod_cerestats TO prod_cerestats; + +CREATE TABLE IF NOT EXISTS block ( + block_number BIGINT NOT NULL, + finalized BOOLEAN NOT NULL, + block_author TEXT NOT NULL, + block_author_name TEXT NOT NULL, + block_hash TEXT NOT NULL, + parent_hash TEXT NOT NULL, + extrinsics_root TEXT NOT NULL, + state_root TEXT NOT NULL, + active_era BIGINT NOT NULL, + current_index BIGINT NOT NULL, + is_election BOOLEAN NOT NULL, + spec_name TEXT NOT NULL, + spec_version INT NOT NULL, + total_events INT NOT NULL, + total_extrinsics INT NOT NULL, + total_issuance NUMERIC(40,0) NOT NULL, + timestamp BIGINT NOT NULL, + PRIMARY KEY ( block_number ) +); + +CREATE TABLE IF NOT EXISTS harvest_error ( + block_number BIGINT NOT NULL, + error TEXT NOT NULL, + timestamp BIGINT NOT NULL, + PRIMARY KEY ( block_number ) +); + +CREATE TABLE IF NOT EXISTS event ( + block_number BIGINT NOT NULL, + event_index INT NOT NULL, + section TEXT NOT NULL, + method TEXT NOT NULL, + phase TEXT NOT NULL, + data TEXT NOT NULL, + timestamp BIGINT NOT NULL, + PRIMARY KEY ( block_number, event_index ) +); + +CREATE TABLE IF NOT EXISTS extrinsic ( + block_number BIGINT NOT NULL, + extrinsic_index INT NOT NULL, + is_signed BOOLEAN NOT NULL, + signer TEXT, + section TEXT NOT NULL, + method TEXT NOT NULL, + args TEXT NOT NULL, + hash TEXT NOT NULL, + doc TEXT NOT NULL, + fee_info TEXT NOT NULL, + fee_details TEXT NOT NULL, + success BOOLEAN NOT NULL, + timestamp BIGINT NOT NULL, + PRIMARY KEY ( block_number, extrinsic_index ) +); + +CREATE TABLE IF NOT EXISTS log ( + block_number BIGINT NOT NULL, + log_index INT NOT NULL, + type TEXT, + engine TEXT NOT NULL, + data TEXT NOT NULL, + timestamp BIGINT NOT NULL, + PRIMARY KEY ( block_number, log_index ) +); + +CREATE TABLE IF NOT EXISTS ranking ( + block_height BIGINT NOT NULL, + rank INT NOT NULL, + active BOOLEAN NOT NULL, + active_rating INT NOT NULL, + name TEXT NOT NULL, + identity TEXT NOT NULL, + has_sub_identity BOOLEAN NOT NULL, + sub_accounts_rating INT NOT NULL, + verified_identity BOOLEAN NOT NULL, + identity_rating INT NOT NULL, + stash_address TEXT NOT NULL, + stash_address_creation_block BIGINT NOT NULL, + stash_parent_address_creation_block BIGINT NOT NULL, + address_creation_rating INT NOT NULL, + controller_address TEXT NOT NULL, + included_thousand_validators BOOLEAN NOT NULL, + thousand_validator TEXT NOT NULL, + part_of_cluster BOOLEAN NOT NULL, + cluster_name TEXT NOT NULL, + cluster_members INT NOT NULL, + show_cluster_member BOOLEAN NOT NULL, + nominators INT NOT NULL, + nominators_rating INT NOT NULL, + commission TEXT NOT NULL, + commission_history TEXT NOT NULL, + commission_rating INT NOT NULL, + active_eras INT NOT NULL, + era_points_history TEXT NOT NULL, + era_points_percent TEXT NOT NULL, + era_points_rating INT NOT NULL, + performance TEXT NOT NULL, + performance_history TEXT NOT NULL, + relative_performance TEXT NOT NULL, + relative_performance_history TEXT NOT NULL, + slashed BOOLEAN NOT NULL, + slash_rating INT NOT NULL, + slashes TEXT NOT NULL, + council_backing BOOLEAN NOT NULL, + active_in_governance BOOLEAN NOT NULL, + governance_rating INT NOT NULL, + payout_history TEXT NOT NULL, + payout_rating INT NOT NULL, + self_stake BIGINT NOT NULL, + other_stake BIGINT NOT NULL, + total_stake BIGINT NOT NULL, + stake_history TEXT NOT NULL, + total_rating INT NOT NULL, + dominated BOOLEAN NOT NULL, + timestamp BIGINT NOT NULL, + PRIMARY KEY ( block_height, stash_address ) +); + +CREATE TABLE IF NOT EXISTS era_vrc_score ( + stash_address TEXT NOT NULL, + era INT NOT NULL, + vrc_score INT NOT NULL, + PRIMARY KEY ( stash_address, era ) +); + +CREATE TABLE IF NOT EXISTS era_commission ( + stash_address TEXT NOT NULL, + era INT NOT NULL, + commission FLOAT NOT NULL, + PRIMARY KEY ( stash_address, era ) +); + +CREATE TABLE IF NOT EXISTS era_commission_avg ( + era INT NOT NULL, + commission_avg FLOAT NOT NULL, + PRIMARY KEY ( era ) +); + +CREATE TABLE IF NOT EXISTS era_self_stake ( + stash_address TEXT NOT NULL, + era INT NOT NULL, + self_stake BIGINT NOT NULL, + PRIMARY KEY ( stash_address, era ) +); + +CREATE TABLE IF NOT EXISTS era_self_stake_avg ( + era INT NOT NULL, + self_stake_avg BIGINT NOT NULL, + PRIMARY KEY ( era ) +); + +CREATE TABLE IF NOT EXISTS era_relative_performance ( + stash_address TEXT NOT NULL, + era INT NOT NULL, + relative_performance FLOAT NOT NULL, + PRIMARY KEY ( stash_address, era ) +); + +CREATE TABLE IF NOT EXISTS era_relative_performance_avg ( + era INT NOT NULL, + relative_performance_avg FLOAT NOT NULL, + PRIMARY KEY ( era ) +); + +CREATE TABLE IF NOT EXISTS era_points ( + stash_address TEXT NOT NULL, + era INT NOT NULL, + points INT NOT NULL, + PRIMARY KEY ( stash_address, era ) +); + +CREATE TABLE IF NOT EXISTS era_points_avg ( + era INT NOT NULL, + points_avg FLOAT NOT NULL, + PRIMARY KEY ( era ) +); + +CREATE TABLE IF NOT EXISTS featured ( + stash_address TEXT NOT NULL, + name TEXT NOT NULL, + timestamp BIGINT NOT NULL, + PRIMARY KEY ( stash_address ) +); + +CREATE TABLE IF NOT EXISTS account ( + account_id TEXT NOT NULL, + identity TEXT NOT NULL, + identity_display TEXT NOT NULL, + identity_display_parent TEXT NOT NULL, + balances TEXT NOT NULL, + available_balance TEXT NOT NULL, + free_balance TEXT NOT NULL, + locked_balance TEXT NOT NULL, + nonce BIGINT NOT NULL, + timestamp BIGINT NOT NULL, + block_height BIGINT NOT NULL, + PRIMARY KEY ( account_id ) +); + +CREATE TABLE IF NOT EXISTS total ( + name TEXT, + count BIGINT NOT NULL, + PRIMARY KEY ( name ) +); + +CREATE TABLE IF NOT EXISTS edp( + id serial NOT NULL, + key TEXT UNIQUE, + value json NOT NULL, + PRIMARY KEY ( key ) +); + +INSERT INTO total (name, count) VALUES + ('blocks', 0), + ('extrinsics', 0), + ('transfers', 0), + ('events', 0), + ('active_validator_count', 0), + ('waiting_validator_count', 0), + ('nominator_count', 0), + ('current_era', 0), + ('active_era', 0), + ('minimum_stake', 0); + +CREATE INDEX IF NOT EXISTS block_finalized_idx ON block (finalized); +CREATE INDEX IF NOT EXISTS block_block_number_idx ON block (block_number); +CREATE INDEX IF NOT EXISTS block_block_hash_idx ON block (block_hash); + +CREATE INDEX IF NOT EXISTS extrinsic_block_number_idx ON extrinsic (block_number); +CREATE INDEX IF NOT EXISTS extrinsic_section_idx ON extrinsic (section); +CREATE INDEX IF NOT EXISTS extrinsic_method_idx ON extrinsic (method); +CREATE INDEX IF NOT EXISTS extrinsic_signer_idx ON extrinsic (signer); + +CREATE INDEX IF NOT EXISTS event_block_number_idx ON event (block_number); +CREATE INDEX IF NOT EXISTS event_section_idx ON event (section); +CREATE INDEX IF NOT EXISTS event_method_idx ON event (method); + +GRANT ALL PRIVILEGES ON TABLE block TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE harvest_error TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE event TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE extrinsic TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE ranking TO prod_cerestats; + +GRANT ALL PRIVILEGES ON TABLE era_vrc_score TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_commission TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_commission_avg TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_self_stake TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_self_stake_avg TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_relative_performance TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_relative_performance_avg TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_points TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_points_avg TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE featured TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE account TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE total TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE edp TO prod_cerestats; + +-- +-- Fast counters +-- +-- Taken from https://www.cybertec-postgresql.com/en/postgresql-count-made-fast/ +-- + +-- Block +START TRANSACTION; +CREATE FUNCTION block_count() RETURNS trigger LANGUAGE plpgsql AS +$$BEGIN + IF TG_OP = 'INSERT' THEN + UPDATE total SET count = count + 1 WHERE name = 'blocks'; + RETURN NEW; + ELSIF TG_OP = 'DELETE' THEN + UPDATE total SET count = count - 1 WHERE name = 'blocks'; + RETURN OLD; + ELSE + UPDATE total SET count = 0 WHERE name = 'blocks'; + RETURN NULL; + END IF; +END;$$; +CREATE CONSTRAINT TRIGGER block_count_mod + AFTER INSERT OR DELETE ON block + DEFERRABLE INITIALLY DEFERRED + FOR EACH ROW EXECUTE PROCEDURE block_count(); +-- TRUNCATE triggers must be FOR EACH STATEMENT +CREATE TRIGGER block_count_trunc AFTER TRUNCATE ON block + FOR EACH STATEMENT EXECUTE PROCEDURE block_count(); +-- initialize the counter table +UPDATE total SET count = (SELECT count(*) FROM block) WHERE name = 'blocks'; +COMMIT; + +-- Extrinsics +START TRANSACTION; +CREATE FUNCTION extrinsic_count() RETURNS trigger LANGUAGE plpgsql AS +$$BEGIN + IF TG_OP = 'INSERT' THEN + UPDATE total SET count = count + 1 WHERE name = 'extrinsics'; + RETURN NEW; + ELSIF TG_OP = 'DELETE' THEN + UPDATE total SET count = count - 1 WHERE name = 'extrinsics'; + RETURN OLD; + ELSE + UPDATE total SET count = 0 WHERE name = 'extrinsics'; + RETURN NULL; + END IF; +END;$$; +CREATE CONSTRAINT TRIGGER extrinsic_count_mod + AFTER INSERT OR DELETE ON extrinsic + DEFERRABLE INITIALLY DEFERRED + FOR EACH ROW EXECUTE PROCEDURE extrinsic_count(); +-- TRUNCATE triggers must be FOR EACH STATEMENT +CREATE TRIGGER extrinsic_count_trunc AFTER TRUNCATE ON extrinsic + FOR EACH STATEMENT EXECUTE PROCEDURE extrinsic_count(); +-- initialize the counter table +UPDATE total SET count = (SELECT count(*) FROM extrinsic) WHERE name = 'extrinsics'; +COMMIT; + + +-- Events +START TRANSACTION; +CREATE FUNCTION event_count() RETURNS trigger LANGUAGE plpgsql AS +$$BEGIN + IF TG_OP = 'INSERT' THEN + UPDATE total SET count = count + 1 WHERE name = 'events'; + RETURN NEW; + ELSIF TG_OP = 'DELETE' THEN + UPDATE total SET count = count - 1 WHERE name = 'events'; + RETURN OLD; + ELSE + UPDATE total SET count = 0 WHERE name = 'events'; + RETURN NULL; + END IF; +END;$$; +CREATE CONSTRAINT TRIGGER event_count_mod + AFTER INSERT OR DELETE ON event + DEFERRABLE INITIALLY DEFERRED + FOR EACH ROW EXECUTE PROCEDURE event_count(); +-- TRUNCATE triggers must be FOR EACH STATEMENT +CREATE TRIGGER event_count_trunc AFTER TRUNCATE ON event + FOR EACH STATEMENT EXECUTE PROCEDURE event_count(); +-- initialize the counter table +UPDATE total SET count = (SELECT count(*) FROM event) WHERE name = 'events'; +COMMIT; + +-- Transfers +START TRANSACTION; +CREATE FUNCTION transfer_count() RETURNS trigger LANGUAGE plpgsql AS +$$BEGIN + IF NEW.method IN ('transfer', 'transferKeepAlive') THEN + IF TG_OP = 'INSERT' THEN + UPDATE total SET count = count + 1 WHERE name = 'transfers'; + RETURN NEW; + ELSIF TG_OP = 'DELETE' THEN + UPDATE total SET count = count - 1 WHERE name = 'transfers'; + RETURN OLD; + ELSE + UPDATE total SET count = 0 WHERE name = 'transfers'; + RETURN NULL; + END IF; + END IF; + RETURN NULL; +END;$$; +CREATE CONSTRAINT TRIGGER transfer_count_mod + AFTER INSERT OR DELETE ON extrinsic + DEFERRABLE INITIALLY DEFERRED + FOR EACH ROW EXECUTE PROCEDURE transfer_count(); +-- TRUNCATE triggers must be FOR EACH STATEMENT +CREATE TRIGGER transfer_count_trunc AFTER TRUNCATE ON extrinsic + FOR EACH STATEMENT EXECUTE PROCEDURE transfer_count(); +-- initialize the counter table +UPDATE total SET count = (SELECT count(*) FROM extrinsic WHERE method IN ('transfer', 'transferKeepAlive')) WHERE name = 'transfers'; +COMMIT; diff --git a/frontend/frontend.config-cere-prod.js b/frontend/frontend.config-cere-prod.js new file mode 100644 index 00000000..c02dd8b8 --- /dev/null +++ b/frontend/frontend.config-cere-prod.js @@ -0,0 +1,18 @@ +export const network = { + id: 'cere', + name: 'Cerebellum Network', + tokenSymbol: 'CERE', + tokenDecimals: 10, + ss58Format: -1, + coinGeckoDenom: 'cere', + nodeWs: 'wss://archive.mainnet.cere.network:9945', + backendWs: 'wss://hasura.stats.cere.network/v1/graphql', + backendHttp: 'https://api.stats.cere.network/api/v1', + googleAnalytics: '', + theme: '@/assets/scss/themes/polkastats.scss', + // ranking Í + historySize: 84, // 84 days + erasPerDay: 1, + validatorSetSize: 24, +} +export const paginationOptions = [10, 20, 50, 100] From e0c51de8ef972971d2af4e08b05e0b31e7dc47d1 Mon Sep 17 00:00:00 2001 From: Andrei Navoichyk Date: Tue, 19 Oct 2021 16:23:41 +0300 Subject: [PATCH 4/8] Cerebellum -> Cere --- frontend/components/Footer.vue | 2 +- frontend/frontend.config-cere-dev.js | 2 +- frontend/frontend.config-cere-local.js | 2 +- frontend/frontend.config-cere-prod.js | 2 +- frontend/frontend.config-cere-stg.js | 2 +- frontend/locales/en.json | 2 +- frontend/nuxt.config.js | 4 ++-- frontend/pages/block/index.vue | 4 ++-- frontend/pages/event/_block/_index.vue | 4 ++-- frontend/pages/extrinsic/_block/_index.vue | 4 ++-- frontend/pages/extrinsic/_hash.vue | 4 ++-- frontend/pages/index.vue | 4 ++-- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/frontend/components/Footer.vue b/frontend/components/Footer.vue index 83b9ff22..774fe3c0 100644 --- a/frontend/components/Footer.vue +++ b/frontend/components/Footer.vue @@ -9,7 +9,7 @@ -
Cerebellum Network
+
Cere Network
diff --git a/frontend/frontend.config-cere-dev.js b/frontend/frontend.config-cere-dev.js index 1293f37a..0251333b 100644 --- a/frontend/frontend.config-cere-dev.js +++ b/frontend/frontend.config-cere-dev.js @@ -1,6 +1,6 @@ export const network = { id: 'cere', - name: 'Cerebellum Network', + name: 'Cere Network', tokenSymbol: 'CERE', tokenDecimals: 10, ss58Format: -1, diff --git a/frontend/frontend.config-cere-local.js b/frontend/frontend.config-cere-local.js index 5e0c18d9..a128aa89 100644 --- a/frontend/frontend.config-cere-local.js +++ b/frontend/frontend.config-cere-local.js @@ -1,6 +1,6 @@ export const network = { id: 'cere', - name: 'Cerebellum Network', + name: 'Cere Network', tokenSymbol: 'CERE', tokenDecimals: 10, ss58Format: -1, diff --git a/frontend/frontend.config-cere-prod.js b/frontend/frontend.config-cere-prod.js index c02dd8b8..6c4ab742 100644 --- a/frontend/frontend.config-cere-prod.js +++ b/frontend/frontend.config-cere-prod.js @@ -1,6 +1,6 @@ export const network = { id: 'cere', - name: 'Cerebellum Network', + name: 'Cere Network', tokenSymbol: 'CERE', tokenDecimals: 10, ss58Format: -1, diff --git a/frontend/frontend.config-cere-stg.js b/frontend/frontend.config-cere-stg.js index b9ed6642..80f28c32 100644 --- a/frontend/frontend.config-cere-stg.js +++ b/frontend/frontend.config-cere-stg.js @@ -1,6 +1,6 @@ export const network = { id: 'cere', - name: 'Cerebellum Network', + name: 'Cere Network', tokenSymbol: 'CERE', tokenDecimals: 10, ss58Format: -1, diff --git a/frontend/locales/en.json b/frontend/locales/en.json index 55564093..7e81e3bc 100644 --- a/frontend/locales/en.json +++ b/frontend/locales/en.json @@ -223,7 +223,7 @@ "follow_polkastats_on_twitter": "Follow @PolkaStats on Twitter", "are_you_a_TEXT": "Are you a happy PolkaStats user? Make sure you follow", "on_twitter_to_get_TEXT": "on Twitter to get the last platform updates", - "head_title": "Cerebellum Network - Support us", + "head_title": "Cere Network - Support us", "head_content": "Support us" }, "how_to_stake": { diff --git a/frontend/nuxt.config.js b/frontend/nuxt.config.js index 3e01cc62..3e05143f 100644 --- a/frontend/nuxt.config.js +++ b/frontend/nuxt.config.js @@ -8,7 +8,7 @@ export default { // Global page headers: https://go.nuxtjs.dev/config-head head: { - title: 'Cerebellum Network Stats', + title: 'Cere Network Stats', htmlAttrs: { lang: 'en', }, @@ -18,7 +18,7 @@ export default { { hid: 'description', name: 'description', - content: 'Cerebellum Network Stats', + content: 'Cere Network Stats', }, ], link: [{ rel: 'icon', type: 'image/png', href: '/img/favicon.ico' }], diff --git a/frontend/pages/block/index.vue b/frontend/pages/block/index.vue index f404f9ef..3cba9625 100644 --- a/frontend/pages/block/index.vue +++ b/frontend/pages/block/index.vue @@ -21,12 +21,12 @@ export default { }, head() { return { - title: 'Cerebellum Network Stats', + title: 'Cere Network Stats', meta: [ { hid: 'description', name: 'description', - content: 'Cerebellum Network Stats', + content: 'Cere Network Stats', }, ], } diff --git a/frontend/pages/event/_block/_index.vue b/frontend/pages/event/_block/_index.vue index 9784f01c..97565ab4 100644 --- a/frontend/pages/event/_block/_index.vue +++ b/frontend/pages/event/_block/_index.vue @@ -44,12 +44,12 @@ export default { }, head() { return { - title: 'Cerebellum Network Stats', + title: 'Cere Network Stats', meta: [ { hid: 'description', name: 'description', - content: 'Cerebellum Network Stats', + content: 'Cere Network Stats', }, ], } diff --git a/frontend/pages/extrinsic/_block/_index.vue b/frontend/pages/extrinsic/_block/_index.vue index d074f541..49125626 100644 --- a/frontend/pages/extrinsic/_block/_index.vue +++ b/frontend/pages/extrinsic/_block/_index.vue @@ -48,12 +48,12 @@ export default { }, head() { return { - title: 'Cerebellum Network Stats', + title: 'Cere Network Stats', meta: [ { hid: 'description', name: 'description', - content: 'Cerebellum Network Stats+', + content: 'Cere Network Stats+', }, ], } diff --git a/frontend/pages/extrinsic/_hash.vue b/frontend/pages/extrinsic/_hash.vue index 0c873a4b..9aab0dff 100644 --- a/frontend/pages/extrinsic/_hash.vue +++ b/frontend/pages/extrinsic/_hash.vue @@ -43,12 +43,12 @@ export default { }, head() { return { - title: 'Cerebellum Network Stats', + title: 'Cere Network Stats', meta: [ { hid: 'description', name: 'description', - content: 'Cerebellum Network Stats', + content: 'Cere Network Stats', }, ], } diff --git a/frontend/pages/index.vue b/frontend/pages/index.vue index c2c79356..94bdcbf9 100644 --- a/frontend/pages/index.vue +++ b/frontend/pages/index.vue @@ -87,12 +87,12 @@ export default { }, head() { return { - title: 'Cerebellum Network Stats', + title: 'Cere Network Stats', meta: [ { hid: 'description', name: 'description', - content: 'Cerebellum Network Stats', + content: 'Cere Network Stats', }, ], } From 197d238654538d5495cf0abceeca0d033fd84e8c Mon Sep 17 00:00:00 2001 From: Andrei Navoichyk Date: Tue, 19 Oct 2021 17:07:11 +0300 Subject: [PATCH 5/8] added cross links --- frontend/components/Footer.vue | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/frontend/components/Footer.vue b/frontend/components/Footer.vue index 774fe3c0..7693590f 100644 --- a/frontend/components/Footer.vue +++ b/frontend/components/Footer.vue @@ -22,19 +22,19 @@
Date: Tue, 19 Oct 2021 17:27:41 +0300 Subject: [PATCH 6/8] prod_cerestats to prd_cerestats --- backend/docker/sql/backend-prod.sql | 38 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/backend/docker/sql/backend-prod.sql b/backend/docker/sql/backend-prod.sql index 517fd33f..971013e6 100644 --- a/backend/docker/sql/backend-prod.sql +++ b/backend/docker/sql/backend-prod.sql @@ -1,4 +1,4 @@ -GRANT ALL PRIVILEGES ON DATABASE prod_cerestats TO prod_cerestats; +GRANT ALL PRIVILEGES ON DATABASE prd_cerestats TO prd_cerestats; CREATE TABLE IF NOT EXISTS block ( block_number BIGINT NOT NULL, @@ -238,25 +238,25 @@ CREATE INDEX IF NOT EXISTS event_block_number_idx ON event (block_number); CREATE INDEX IF NOT EXISTS event_section_idx ON event (section); CREATE INDEX IF NOT EXISTS event_method_idx ON event (method); -GRANT ALL PRIVILEGES ON TABLE block TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE harvest_error TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE event TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE extrinsic TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE ranking TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE block TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE harvest_error TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE event TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE extrinsic TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE ranking TO prd_cerestats; -GRANT ALL PRIVILEGES ON TABLE era_vrc_score TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE era_commission TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE era_commission_avg TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE era_self_stake TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE era_self_stake_avg TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE era_relative_performance TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE era_relative_performance_avg TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE era_points TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE era_points_avg TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE featured TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE account TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE total TO prod_cerestats; -GRANT ALL PRIVILEGES ON TABLE edp TO prod_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_vrc_score TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_commission TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_commission_avg TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_self_stake TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_self_stake_avg TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_relative_performance TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_relative_performance_avg TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_points TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE era_points_avg TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE featured TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE account TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE total TO prd_cerestats; +GRANT ALL PRIVILEGES ON TABLE edp TO prd_cerestats; -- -- Fast counters From 2b25afbac653a5579ab17a82aa6e8a46b760380c Mon Sep 17 00:00:00 2001 From: Andrei Navoichyk Date: Tue, 19 Oct 2021 17:27:59 +0300 Subject: [PATCH 7/8] renaming --- backend/docker/sql/{backend-prod.sql => backend-prd.sql} | 0 .../{frontend.config-cere-prod.js => frontend.config-cere-prd.js} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename backend/docker/sql/{backend-prod.sql => backend-prd.sql} (100%) rename frontend/{frontend.config-cere-prod.js => frontend.config-cere-prd.js} (100%) diff --git a/backend/docker/sql/backend-prod.sql b/backend/docker/sql/backend-prd.sql similarity index 100% rename from backend/docker/sql/backend-prod.sql rename to backend/docker/sql/backend-prd.sql diff --git a/frontend/frontend.config-cere-prod.js b/frontend/frontend.config-cere-prd.js similarity index 100% rename from frontend/frontend.config-cere-prod.js rename to frontend/frontend.config-cere-prd.js From f9bfb3ad0e71b3b11094cb22db4d62ef65bb33de Mon Sep 17 00:00:00 2001 From: Andrei Navoichyk Date: Tue, 19 Oct 2021 17:39:13 +0300 Subject: [PATCH 8/8] updated README.md --- CHANGELOG.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14529230..a1f47d98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Cerestats -vNext -- Added API to add and get EDP info. -- Added prod configuration for frontend and backend. +## vNext +- ... + +## v0.1.0 +- Adapted for Cere Network. +- Added API to add and get EDP info.