From 0f221489ba7f88b3c34b344d73aac9c02d0d79e3 Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Tue, 2 May 2023 14:39:28 -0600 Subject: [PATCH 01/15] fix(webapp): fix missing entity name in lacchain network --- .../customHooks/useHealthCheckHistoryState.js | 22 +++++++++++-------- webapp/src/language/en.json | 3 ++- webapp/src/language/es.json | 3 ++- webapp/src/routes/EndpointsStats/index.js | 1 + 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/webapp/src/hooks/customHooks/useHealthCheckHistoryState.js b/webapp/src/hooks/customHooks/useHealthCheckHistoryState.js index 4fc069e8..0e575afc 100644 --- a/webapp/src/hooks/customHooks/useHealthCheckHistoryState.js +++ b/webapp/src/hooks/customHooks/useHealthCheckHistoryState.js @@ -51,19 +51,23 @@ const useHealthCheckState = () => { useEffect(() => { if (!producers?.length) return - setProducersNames( - producers.map(producer => ({ - id: producer.id, - name: producer?.bp_json?.org?.candidate_name, - })), - ) + const formattedProducers = producers.map((producer) => ({ + id: producer.id, + name: + producer?.bp_json?.org?.candidate_name || + producer?.bp_json?.org?.organization_name || + producer?.owner, + })) + + setProducersNames(formattedProducers) const id = location?.state?.producerId const producer = - producers.find(producer => producer.id === id) || producers[0] + formattedProducers.find(producer => producer.id === id) || + formattedProducers[0] - setSelected(id || producers[0]?.id) - setSelectedName(producer?.bp_json?.org?.candidate_name) + setSelected(id || formattedProducers[0]?.id) + setSelectedName(producer?.name) window.history.replaceState({}, document.title) }, [producers, location]) diff --git a/webapp/src/language/en.json b/webapp/src/language/en.json index 3d5a9cb5..da4969f0 100644 --- a/webapp/src/language/en.json +++ b/webapp/src/language/en.json @@ -44,7 +44,8 @@ "bugRequest": "Report a bug / Request a feature", "moreInfo": "More Info", "openLink": "Visit Site", - "table": "Table" + "table": "Table", + "noOptions": "No matches" }, "routes": { "/>sidebar": "Dashboard", diff --git a/webapp/src/language/es.json b/webapp/src/language/es.json index e2e19b66..c95a2446 100644 --- a/webapp/src/language/es.json +++ b/webapp/src/language/es.json @@ -55,7 +55,8 @@ "bugRequest": "Reportar un problema / Solicitar una característica ", "moreInfo": "Más Información", "openLink": "Visitar Sitio", - "table": "Tabla" + "table": "Tabla", + "noOptions": "Sin coincidencias" }, "routes": { "/>sidebar": "Panel", diff --git a/webapp/src/routes/EndpointsStats/index.js b/webapp/src/routes/EndpointsStats/index.js index 9bac286d..d5410c00 100644 --- a/webapp/src/routes/EndpointsStats/index.js +++ b/webapp/src/routes/EndpointsStats/index.js @@ -96,6 +96,7 @@ const EndpointsStats = () => { renderInput={params => ( )} + noOptionsText={t('noOptions')} /> )} {historyData && ( From 09f61e76fb912025b593d1be1ffdffc21d43aed8 Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Tue, 2 May 2023 14:42:24 -0600 Subject: [PATCH 02/15] fix(hapi): use producer id when health check history is updated --- hapi/src/services/health-check-history.service.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hapi/src/services/health-check-history.service.js b/hapi/src/services/health-check-history.service.js index b8985e6c..4225964b 100644 --- a/hapi/src/services/health-check-history.service.js +++ b/hapi/src/services/health-check-history.service.js @@ -36,7 +36,11 @@ const updateEndpointsHealthHistory = async (endpoints, date) => { ` const updates = endpoints.map(endpoint => ({ where: { - _and: [{ value: { _eq: endpoint.value } }, { date: { _eq: date } }] + _and: [ + { producer_id: { _eq: endpoint.producer_id } }, + { value: { _eq: endpoint.value } }, + { date: { _eq: date } } + ] }, _inc: { successful_checks: endpoint.isWorking, From f84471397419a1bf8ff93e7461c17d5ef34de221 Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Thu, 4 May 2023 16:35:34 -0600 Subject: [PATCH 03/15] feat:(hasura): add producers_list_update_log to store the last update date and the next estimated --- .../tables/public_producers_list_update_log.yaml | 11 +++++++++++ hasura/metadata/databases/default/tables/tables.yaml | 1 + .../down.sql | 1 + .../up.sql | 1 + 4 files changed, 14 insertions(+) create mode 100644 hasura/metadata/databases/default/tables/public_producers_list_update_log.yaml create mode 100644 hasura/migrations/default/1683238474098_create_table_public_producers_list_update_log/down.sql create mode 100644 hasura/migrations/default/1683238474098_create_table_public_producers_list_update_log/up.sql diff --git a/hasura/metadata/databases/default/tables/public_producers_list_update_log.yaml b/hasura/metadata/databases/default/tables/public_producers_list_update_log.yaml new file mode 100644 index 00000000..ac78df0c --- /dev/null +++ b/hasura/metadata/databases/default/tables/public_producers_list_update_log.yaml @@ -0,0 +1,11 @@ +table: + name: producers_list_update_log + schema: public +select_permissions: + - role: guest + permission: + columns: + - id + - last_update + - next_estimated_update + filter: {} diff --git a/hasura/metadata/databases/default/tables/tables.yaml b/hasura/metadata/databases/default/tables/tables.yaml index 0a6a467d..244cf61c 100644 --- a/hasura/metadata/databases/default/tables/tables.yaml +++ b/hasura/metadata/databases/default/tables/tables.yaml @@ -10,6 +10,7 @@ - "!include public_node.yaml" - "!include public_node_info.yaml" - "!include public_producer.yaml" +- "!include public_producers_list_update_log.yaml" - "!include public_round_history.yaml" - "!include public_schedule_history.yaml" - "!include public_setting.yaml" diff --git a/hasura/migrations/default/1683238474098_create_table_public_producers_list_update_log/down.sql b/hasura/migrations/default/1683238474098_create_table_public_producers_list_update_log/down.sql new file mode 100644 index 00000000..98faf2ae --- /dev/null +++ b/hasura/migrations/default/1683238474098_create_table_public_producers_list_update_log/down.sql @@ -0,0 +1 @@ +DROP TABLE "public"."producers_list_update_log"; diff --git a/hasura/migrations/default/1683238474098_create_table_public_producers_list_update_log/up.sql b/hasura/migrations/default/1683238474098_create_table_public_producers_list_update_log/up.sql new file mode 100644 index 00000000..90f07d26 --- /dev/null +++ b/hasura/migrations/default/1683238474098_create_table_public_producers_list_update_log/up.sql @@ -0,0 +1 @@ +CREATE TABLE "public"."producers_list_update_log" ("id" integer NOT NULL DEFAULT 1, "last_update" timestamp with time zone NOT NULL, "next_estimated_update" timestamp with time zone NOT NULL, PRIMARY KEY ("id") , UNIQUE ("id")); From 8b456c10338b690232b1838ea7a005ebefd2a635 Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Thu, 4 May 2023 16:38:15 -0600 Subject: [PATCH 04/15] feat(hapi): save the last update of the producers list and the estimated next update --- hapi/src/services/producer.service.js | 35 ++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/hapi/src/services/producer.service.js b/hapi/src/services/producer.service.js index 95ea7687..fcb45346 100644 --- a/hapi/src/services/producer.service.js +++ b/hapi/src/services/producer.service.js @@ -1,7 +1,7 @@ const { StatusCodes } = require('http-status-codes') const { hasuraUtil, sequelizeUtil, producerUtil } = require('../utils') -const { eosConfig } = require('../config') +const { eosConfig, workersConfig } = require('../config') const lacchainService = require('./lacchain.service') const eosioService = require('./eosio.service') @@ -59,6 +59,24 @@ const updateProducers = async (producers = []) => { return insertedRows.insert_producer.returning } +const updateProducersLog = async ({ lastUpdateAt, nextUpdateAt }) => { + const upsertMutation = ` + mutation ($payload: [producers_list_update_log_insert_input!]!) { + insert_producers_list_update_log(objects: $payload, on_conflict: {constraint: producers_list_update_log_pkey, update_columns: [ last_update, next_estimated_update ]}) { + affected_rows + } + } + ` + + await hasuraUtil.request(upsertMutation, { + payload: { + id: 1, + last_update: lastUpdateAt, + next_estimated_update: nextUpdateAt + } + }) +} + const syncProducers = async () => { let producers = [] @@ -74,6 +92,7 @@ const syncProducers = async () => { if (producers?.length) { producers = await updateProducers(producers) await syncNodes(producers.slice(0, eosConfig.eosTopLimit)) + await saveEstimateNextUpdate(new Date()) await syncEndpoints() if (!eosConfig.stateHistoryPluginEndpoint) { @@ -82,6 +101,20 @@ const syncProducers = async () => { } } +const saveEstimateNextUpdate = async lastUpdateAt => { + const timeoutNodeInfo = 60 + const timeoutGetBPJSONs = 750 + const timeoutGetProducers = eosConfig.apiEndpoints.length * 30 + const timeoutSum = timeoutNodeInfo + timeoutGetBPJSONs + timeoutGetProducers + const nextUpdateAt = new Date(lastUpdateAt) + + nextUpdateAt.setSeconds( + nextUpdateAt.getSeconds() + workersConfig.syncProducersInterval + timeoutSum + ) + + await updateProducersLog({ lastUpdateAt, nextUpdateAt }) +} + const getProducersSummary = async () => { const [rows] = await sequelizeUtil.query(` SELECT From 07006cdb5f1bf108a6b3fa6f0fab59c4fc57c816 Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Thu, 4 May 2023 16:54:06 -0600 Subject: [PATCH 05/15] feat(webapp): add ProducersUpdateLog to show the last update and the next estimated update of BPs list --- .../components/ProducersUpdateLog/index.js | 47 +++++++++++ .../components/ProducersUpdateLog/styles.js | 13 +++ webapp/src/gql/producer.gql.js | 7 ++ .../hooks/customHooks/useEndpointsState.js | 9 +-- webapp/src/language/en.json | 5 +- webapp/src/language/es.json | 4 +- webapp/src/routes/BlockProducers/index.js | 2 + webapp/src/routes/EndpointsList/index.js | 80 +++++++++---------- webapp/src/routes/EndpointsList/styles.js | 12 ++- webapp/src/routes/Nodes/index.js | 4 + 10 files changed, 131 insertions(+), 52 deletions(-) create mode 100644 webapp/src/components/ProducersUpdateLog/index.js create mode 100644 webapp/src/components/ProducersUpdateLog/styles.js diff --git a/webapp/src/components/ProducersUpdateLog/index.js b/webapp/src/components/ProducersUpdateLog/index.js new file mode 100644 index 00000000..47cd2506 --- /dev/null +++ b/webapp/src/components/ProducersUpdateLog/index.js @@ -0,0 +1,47 @@ +import React from 'react' +import { makeStyles } from '@mui/styles' +import { useTranslation } from 'react-i18next' +import { useQuery } from '@apollo/client' +import Skeleton from '@mui/material/Skeleton' +import moment from 'moment' + +import { PRODUCERS_UPDATE_LOG_QUERY } from '../../gql' + +import styles from './styles' + +const useStyles = makeStyles(styles) + +const ProducersUpdateLog = () => { + const classes = useStyles() + const { t } = useTranslation() + const { loading, data: { updateLogs } = {} } = useQuery( + PRODUCERS_UPDATE_LOG_QUERY, + ) + + if (loading) return + + return ( + <> + {updateLogs && ( +
+ + {t('updatedAt')} + {': '} + + {moment(updateLogs?.at(0)?.last_update)?.format('lll')}{' '} + + + + {t('nextUpdateAt')} + {': '} + + {moment(updateLogs?.at(0)?.next_estimated_update)?.format('lll')} + + +
+ )} + + ) +} + +export default ProducersUpdateLog diff --git a/webapp/src/components/ProducersUpdateLog/styles.js b/webapp/src/components/ProducersUpdateLog/styles.js new file mode 100644 index 00000000..b9f1cac9 --- /dev/null +++ b/webapp/src/components/ProducersUpdateLog/styles.js @@ -0,0 +1,13 @@ +export default (theme) => ({ + updateLogContainer: { + display: 'flex', + flexWrap: 'wrap', + }, + dateText: { + fontWeight: 'bold', + marginRight: theme.spacing(4), + '& span': { + fontWeight: 'normal', + }, + }, +}) diff --git a/webapp/src/gql/producer.gql.js b/webapp/src/gql/producer.gql.js index c295daf3..17064576 100644 --- a/webapp/src/gql/producer.gql.js +++ b/webapp/src/gql/producer.gql.js @@ -230,3 +230,10 @@ export const HISTORY_ENDPOINTS_BY_PRODUCER_QUERY = gql`query($id: Int){ date } }` + +export const PRODUCERS_UPDATE_LOG_QUERY = gql`query{ + updateLogs: producers_list_update_log (limit: 1){ + last_update + next_estimated_update + } +}` \ No newline at end of file diff --git a/webapp/src/hooks/customHooks/useEndpointsState.js b/webapp/src/hooks/customHooks/useEndpointsState.js index 03059240..b321f560 100644 --- a/webapp/src/hooks/customHooks/useEndpointsState.js +++ b/webapp/src/hooks/customHooks/useEndpointsState.js @@ -12,10 +12,9 @@ const useEndpointsState = () => { ] = useSearchState({ query: PRODUCERS_QUERY, where: { nodes: { endpoints: { value: { _gt: '' } } } }, - limit: 20 + limit: 20, }) const { data, loading } = useSubscription(ENDPOINTS_SUBSCRIPTION, { variables }) - const [updatedAt, setUpdatedAt] = useState() const [items, setItems] = useState() useEffect(() => { @@ -43,10 +42,6 @@ const useEndpointsState = () => { } }), ) - - if (!data.producers?.[0]?.updated_at) return - - setUpdatedAt(data.producers[0].updated_at) }, [data]) const handleFilter = useCallback(value => { @@ -65,7 +60,7 @@ const useEndpointsState = () => { }, [setPagination]) return [ - { loading, pagination, producers: items, updatedAt, filters }, + { loading, pagination, producers: items, filters }, { handleFilter, handleOnPageChange, handleOnSearch, setPagination }, ] } diff --git a/webapp/src/language/en.json b/webapp/src/language/en.json index da4969f0..6040a36a 100644 --- a/webapp/src/language/en.json +++ b/webapp/src/language/en.json @@ -45,7 +45,9 @@ "moreInfo": "More Info", "openLink": "Visit Site", "table": "Table", - "noOptions": "No matches" + "noOptions": "No matches", + "updatedAt": "Updated at", + "nextUpdateAt": "Next updated at" }, "routes": { "/>sidebar": "Dashboard", @@ -334,7 +336,6 @@ }, "endpointsListRoute": { "title": "Endpoints available by", - "updatedAt": "Updated at", "endpointsResponding": "Only endpoints responding", "showList": "Show List" }, diff --git a/webapp/src/language/es.json b/webapp/src/language/es.json index c95a2446..60f6ab2a 100644 --- a/webapp/src/language/es.json +++ b/webapp/src/language/es.json @@ -56,7 +56,9 @@ "moreInfo": "Más Información", "openLink": "Visitar Sitio", "table": "Tabla", - "noOptions": "Sin coincidencias" + "noOptions": "Sin coincidencias", + "updatedAt": "Última actualización", + "nextUpdateAt": "Próxima actualización" }, "routes": { "/>sidebar": "Panel", diff --git a/webapp/src/routes/BlockProducers/index.js b/webapp/src/routes/BlockProducers/index.js index 928fee2a..dad0c5ab 100644 --- a/webapp/src/routes/BlockProducers/index.js +++ b/webapp/src/routes/BlockProducers/index.js @@ -9,6 +9,7 @@ import SearchBar from '../../components/SearchBar' import InformationCard from '../../components/InformationCard' import useBlockProducerState from '../../hooks/customHooks/useBlockProducerState' import NoResults from '../../components/NoResults' +import ProducersUpdateLog from 'components/ProducersUpdateLog' import styles from './styles' @@ -52,6 +53,7 @@ const Producers = () => { return ( <> +
{ const classes = useStyles() const { t } = useTranslation('endpointsListRoute') const [ - { loading, pagination, producers, updatedAt, filters }, + { loading, pagination, producers, filters }, { handleFilter, handleOnSearch, handleOnPageChange, setPagination }, ] = useEndpointsState({ useCache: false }) @@ -42,47 +42,45 @@ const EndpointsList = () => { {t('title')} {t('producer')} - {updatedAt && ( + +
+
+
- {t('updatedAt')}: {moment(updatedAt).format('LLL')} + {t('endpointsResponding')} - )} -
-
- - {t('endpointsResponding')} - - { - handleFilter(event.target?.checked) - }} - /> -
-
- + { + handleFilter(event.target?.checked) + }} + /> +
+
+ +
+ + {t('itemsPerPage')} + +
- - {t('itemsPerPage')} - -
{ ) : ( <> - {!!producers?.length ? ( + {!!producers?.length ? ( ) : ( diff --git a/webapp/src/routes/EndpointsList/styles.js b/webapp/src/routes/EndpointsList/styles.js index 4682ce17..70c1a80d 100644 --- a/webapp/src/routes/EndpointsList/styles.js +++ b/webapp/src/routes/EndpointsList/styles.js @@ -5,7 +5,17 @@ export default (theme) => ({ alignItems: 'center', }, dateContainer: { - flex: '40%', + flex: '50%', + display: 'flex', + flexDirection: 'column', + '& div': { + gap: theme.spacing(2), + margin: theme.spacing(2, 0, 2), + }, + }, + controlFormContainer: { + display: 'flex', + flexWrap: 'wrap', }, switchContainer: { display: 'flex', diff --git a/webapp/src/routes/Nodes/index.js b/webapp/src/routes/Nodes/index.js index 46f1ae87..8918f3c3 100644 --- a/webapp/src/routes/Nodes/index.js +++ b/webapp/src/routes/Nodes/index.js @@ -11,6 +11,9 @@ const Pagination = lazy(() => import('@mui/material/Pagination')) const SearchBar = lazy(() => import('../../components/SearchBar')) const InformationCard = lazy(() => import('../../components/InformationCard')) const NoResults = lazy(() => import('../../components/NoResults')) +const ProducersUpdateLog = lazy(() => + import('../../components/ProducersUpdateLog'), +) const useStyles = makeStyles(styles) @@ -23,6 +26,7 @@ const Nodes = () => { return ( <> +
Date: Fri, 5 May 2023 10:04:38 -0600 Subject: [PATCH 06/15] fix(hapi): exclude the syncNodes process in the estimation of the next update --- hapi/src/services/producer.service.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hapi/src/services/producer.service.js b/hapi/src/services/producer.service.js index fcb45346..a7418a09 100644 --- a/hapi/src/services/producer.service.js +++ b/hapi/src/services/producer.service.js @@ -91,8 +91,8 @@ const syncProducers = async () => { if (producers?.length) { producers = await updateProducers(producers) - await syncNodes(producers.slice(0, eosConfig.eosTopLimit)) await saveEstimateNextUpdate(new Date()) + await syncNodes(producers.slice(0, eosConfig.eosTopLimit)) await syncEndpoints() if (!eosConfig.stateHistoryPluginEndpoint) { @@ -102,10 +102,9 @@ const syncProducers = async () => { } const saveEstimateNextUpdate = async lastUpdateAt => { - const timeoutNodeInfo = 60 const timeoutGetBPJSONs = 750 const timeoutGetProducers = eosConfig.apiEndpoints.length * 30 - const timeoutSum = timeoutNodeInfo + timeoutGetBPJSONs + timeoutGetProducers + const timeoutSum = timeoutGetBPJSONs + timeoutGetProducers const nextUpdateAt = new Date(lastUpdateAt) nextUpdateAt.setSeconds( From dcd1db652f2b9b3458135ca4a7535428bdec91c5 Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Fri, 5 May 2023 16:38:31 +0000 Subject: [PATCH 07/15] [CodeFactor] Apply fixes --- webapp/src/gql/producer.gql.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/gql/producer.gql.js b/webapp/src/gql/producer.gql.js index 17064576..7d522f64 100644 --- a/webapp/src/gql/producer.gql.js +++ b/webapp/src/gql/producer.gql.js @@ -236,4 +236,4 @@ export const PRODUCERS_UPDATE_LOG_QUERY = gql`query{ last_update next_estimated_update } -}` \ No newline at end of file +}` From 0b815c9ec075fcaaf743ce9016ab50c340e1e115 Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Tue, 9 May 2023 09:19:27 -0600 Subject: [PATCH 08/15] feat(webapp): add information on how the data is obtained and what the bp.json standard is --- webapp/src/language/en.json | 12 +++- webapp/src/language/es.json | 12 +++- webapp/src/routes/About/index.js | 111 ++++++++++++++++++++---------- webapp/src/routes/About/styles.js | 17 +++-- 4 files changed, 103 insertions(+), 49 deletions(-) diff --git a/webapp/src/language/en.json b/webapp/src/language/en.json index 6040a36a..e9d2e59c 100644 --- a/webapp/src/language/en.json +++ b/webapp/src/language/en.json @@ -211,10 +211,16 @@ }, "subtitle3": "Where Does the Data Come From?", "body3": { - "paragraph1": "Antelope Tools provides a detailed and graphic visualization of relevant information of entities running nodes and blockchain infrastructure. We source data on-chain directly from the public blockchain tables and information provided by Block Producers in their bp.json files.", - "paragraph2": "For more information about Antelope Tools, visit our GitHub repo or contact us on our Telegram group. Contact us and join our effort to make EOSIO chains even more transparent and easy to use." + "paragraph1Text1": "Antelope Tools provides a detailed and graphic visualization of relevant information of entities running nodes and blockchain infrastructure. We source data on-chain directly from the public table of producers in the account", + "paragraph1Text2": ", discarding those that are not active. From the list we obtain the url addresses of the BPs to retrieve their data using the", + "paragraph2": "The bp.json contains information about the producer, its nodes and endpoints. However, it is not queried directly, as there are several networks based on the Antelope protocol, the chains.json object is queried under the producer's website address, thus the correct address of the bp.json is obtained according to the chain_id.", + "paragraph3": "It is important to note that if the chains.json object is not accessible or not contain the chain_id, /bp.json is directly queried. However, this may belong to another network, so only the organizational information of the producer is used and the rest is omitted.", + "paragraph4Text1": "If the registered url is https://edenia.com/ then it is retrieved first", + "paragraph4Text2": "and the bp.json associated with the id is retrieved. If it does not exist then it is tried with", + "paragraph4Text3": ", but, nodes and endpoints are not included", + "paragraph5": "For more information about Antelope Tools, visit our GitHub repo or contact us on our Telegram group. Contact us and join our effort to make EOSIO chains even more transparent and easy to use." }, - "bpjsonexample": "Bp.json example" + "standard": "bp.json standard" }, "helpRoute": { "title": "Thank you for using Antelope Tools Blockchain Network Monitor !", diff --git a/webapp/src/language/es.json b/webapp/src/language/es.json index 60f6ab2a..c15457c9 100644 --- a/webapp/src/language/es.json +++ b/webapp/src/language/es.json @@ -218,10 +218,16 @@ }, "subtitle3": "¿De dónde se obtienen los datos?", "body3": { - "paragraph1": "Antelope Tools proporciona una visualización detallada y gráfica de la información relevante de las entidades que ejecutan los nodos y la infraestructura de la cadena de bloques. Obtenemos los datos on-chain directamente de las tablas públicas de blockchain y de la información proporcionada por los productores de bloques en sus archivos bp.json.", - "paragraph2": "Para mayor información acerca Antelope Tools, visite nuestro repositorio en GitHub o contáctenos en nuestro grupo de Telegram. Póngase en contacto con nosotros y únase a nuestro esfuerzo por hacer que las blockchains de EOSIO sean aún más transparentes y fáciles de usar." + "paragraph1Text1": "Antelope Tools proporciona una visualización detallada y gráfica de la información relevante de las entidades que ejecutan los nodos y la infraestructura de la cadena de bloques. Obtenemos los datos on-chain directamente de la tabla pública de producers en la cuenta", + "paragraph1Text2": ", descartando aquellos que no están activos. De la lista se obtienen las direcciones url de los BPs para recuperar sus datos mediante el", + "paragraph2": "El bp.json contiene información sobre el productor, sus nodos y endpoints. Sin embargo, no se consulta directamente, ya que existen varias redes basadas en el protocolo de Antelope, se consulta el objeto chains.json bajo la dirección del sitio web del productor, de este modo se obtiene la dirección correcta del bp.json según el chain_id.", + "paragraph3": "Es importante destacar que si el objeto chains.json no es accesible o no contiene el chain_id, se consulta directamente /bp.json. Sin embargo, este puede pertenecer a otra red, por lo que solo se utiliza la información organizacional del productor y el resto se omite.", + "paragraph4Text1": "Si se considera que la url registrada es https://edenia.com/ entonces primero se recupera", + "paragraph4Text2": "y se obtiene el bp.json asociado al id. Si no existe se intenta con", + "paragraph4Text3": ", pero, los nodos y endpoints no se incluyen", + "paragraph5": "Para mayor información acerca Antelope Tools, visite nuestro repositorio en GitHub o contáctenos en nuestro grupo de Telegram. Póngase en contacto con nosotros y únase a nuestro esfuerzo por hacer que las blockchains de EOSIO sean aún más transparentes y fáciles de usar." }, - "bpjsonexample": "Ejemplo de bp.json" + "standard": "estándar del bp.json" }, "helpRoute": { "title": "¡Gracias por usar el monitor de red Blockchain de Antelope Tools!", diff --git a/webapp/src/routes/About/index.js b/webapp/src/routes/About/index.js index b5dca9b8..53d872a6 100644 --- a/webapp/src/routes/About/index.js +++ b/webapp/src/routes/About/index.js @@ -2,9 +2,12 @@ import React from 'react' import Typography from '@mui/material/Typography' import { makeStyles } from '@mui/styles' import { useTranslation } from 'react-i18next' +import { Link as RouterLink } from 'react-router-dom' import Card from '@mui/material/Card' import CardContent from '@mui/material/CardContent' +import { eosConfig } from '../../config' + import Logo from './Logo' import styles from './styles' @@ -18,47 +21,79 @@ const About = () => {
-
-
- - {t('body.paragraph1')} - -
- -
- {t('subtitle1')} - - {t('body1.paragraph1')} - -
- -
- {t('subtitle2')} - - {t('body2.paragraph1')} - -
+
+ +
+
+ + {t('body.paragraph1')} + + {t('subtitle1')} + + {t('body1.paragraph1')} + + {t('subtitle2')} + + {t('body2.paragraph1')} + + {t('subtitle3')} + {eosConfig.networkName !== 'lacchain' ? ( + <> + + {t('body3.paragraph1Text1')}{' '} + + eosio + + {t('body3.paragraph1Text2')}{' '} + + {t('standard')}. + + -
- {t('subtitle3')} - - {t('body3.paragraph1')} - - {t('bpjsonexample')} - - + + {t('body3.paragraph2')} + + + {t('body3.paragraph3')} + + + {t('body3.paragraph4Text1')}{' '} + + https://edenia.com/chains.json + {' '} + {t('body3.paragraph4Text2')}{' '} + + https://edenia.com/bp.json + + {eosConfig.networkName !== 'mainnet' && + t('body3.paragraph4Text3')} + . + + + ) : ( - {t('body3.paragraph2')} + {t('body3.paragraph1Text1')}{' '} + + eosio + + . -
-
- -
- + )} + + {t('body3.paragraph5')} +
diff --git a/webapp/src/routes/About/styles.js b/webapp/src/routes/About/styles.js index e03d0d6b..ee96232e 100644 --- a/webapp/src/routes/About/styles.js +++ b/webapp/src/routes/About/styles.js @@ -13,21 +13,28 @@ export default (theme) => ({ marginBottom: theme.spacing(4), }, }, + logoContainer: { + [theme.breakpoints.down('md')]: { + order: 1, + }, + }, logo: { width: 569, height: 498, + float: 'right', [theme.breakpoints.down('md')]: { - width: '85%', + width: '100%', }, }, cardShadow: { boxShadow: '0px 1px 5px rgba(0, 0, 0, 0.15) !important', }, mainText: { - display: 'flex', - flexDirection: 'row', + width: '100%', + overflow: 'hidden', [theme.breakpoints.down('md')]: { - flexDirection: 'column' + display: 'flex', + flexDirection: 'column', }, - } + }, }) From 520e12307e68ddf0aaf05beb1f4a30d93a5559ed Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Tue, 9 May 2023 09:55:48 -0600 Subject: [PATCH 09/15] chore(webapp): remove justified text alignment and minor text changes --- webapp/src/language/en.json | 12 ++++++------ webapp/src/language/es.json | 2 +- webapp/src/routes/About/index.js | 18 +++++++++--------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/webapp/src/language/en.json b/webapp/src/language/en.json index e9d2e59c..a5e0afc5 100644 --- a/webapp/src/language/en.json +++ b/webapp/src/language/en.json @@ -212,12 +212,12 @@ "subtitle3": "Where Does the Data Come From?", "body3": { "paragraph1Text1": "Antelope Tools provides a detailed and graphic visualization of relevant information of entities running nodes and blockchain infrastructure. We source data on-chain directly from the public table of producers in the account", - "paragraph1Text2": ", discarding those that are not active. From the list we obtain the url addresses of the BPs to retrieve their data using the", - "paragraph2": "The bp.json contains information about the producer, its nodes and endpoints. However, it is not queried directly, as there are several networks based on the Antelope protocol, the chains.json object is queried under the producer's website address, thus the correct address of the bp.json is obtained according to the chain_id.", - "paragraph3": "It is important to note that if the chains.json object is not accessible or not contain the chain_id, /bp.json is directly queried. However, this may belong to another network, so only the organizational information of the producer is used and the rest is omitted.", - "paragraph4Text1": "If the registered url is https://edenia.com/ then it is retrieved first", - "paragraph4Text2": "and the bp.json associated with the id is retrieved. If it does not exist then it is tried with", - "paragraph4Text3": ", but, nodes and endpoints are not included", + "paragraph1Text2": ", discarding those that aren't active. From the list, we obtain the URL addresses of the BPs to retrieve their data using the", + "paragraph2": "The bp.json contains information about the producer, its nodes, and endpoints. However, it's not queried directly, as there are several networks based on the Antelope protocol, the chains.json object is queried under the producer's website address, thus the correct address of the bp.json is obtained according to the chain_id of the network.", + "paragraph3": "It's important to note that if the chains.json object is not accessible or doesn't contain the chain_id, /bp.json is directly queried. However, this may belong to another network, so only the organizational information of the producer is used and the rest is omitted.", + "paragraph4Text1": "If the registered URL is https://edenia.com/ then it's retrieved first", + "paragraph4Text2": "and the bp.json associated with the id is retrieved. If it does not exist then it's tried with", + "paragraph4Text3": ", but, nodes and endpoints aren't included", "paragraph5": "For more information about Antelope Tools, visit our GitHub repo or contact us on our Telegram group. Contact us and join our effort to make EOSIO chains even more transparent and easy to use." }, "standard": "bp.json standard" diff --git a/webapp/src/language/es.json b/webapp/src/language/es.json index c15457c9..5fde0546 100644 --- a/webapp/src/language/es.json +++ b/webapp/src/language/es.json @@ -220,7 +220,7 @@ "body3": { "paragraph1Text1": "Antelope Tools proporciona una visualización detallada y gráfica de la información relevante de las entidades que ejecutan los nodos y la infraestructura de la cadena de bloques. Obtenemos los datos on-chain directamente de la tabla pública de producers en la cuenta", "paragraph1Text2": ", descartando aquellos que no están activos. De la lista se obtienen las direcciones url de los BPs para recuperar sus datos mediante el", - "paragraph2": "El bp.json contiene información sobre el productor, sus nodos y endpoints. Sin embargo, no se consulta directamente, ya que existen varias redes basadas en el protocolo de Antelope, se consulta el objeto chains.json bajo la dirección del sitio web del productor, de este modo se obtiene la dirección correcta del bp.json según el chain_id.", + "paragraph2": "El bp.json contiene información sobre el productor, sus nodos y endpoints. Sin embargo, no se consulta directamente, ya que existen varias redes basadas en el protocolo de Antelope, en cambio, se consulta el objeto chains.json bajo la dirección del sitio web del productor, de este modo se obtiene la dirección correcta del bp.json según el chain_id de la red.", "paragraph3": "Es importante destacar que si el objeto chains.json no es accesible o no contiene el chain_id, se consulta directamente /bp.json. Sin embargo, este puede pertenecer a otra red, por lo que solo se utiliza la información organizacional del productor y el resto se omite.", "paragraph4Text1": "Si se considera que la url registrada es https://edenia.com/ entonces primero se recupera", "paragraph4Text2": "y se obtiene el bp.json asociado al id. Si no existe se intenta con", diff --git a/webapp/src/routes/About/index.js b/webapp/src/routes/About/index.js index 53d872a6..342c0f3a 100644 --- a/webapp/src/routes/About/index.js +++ b/webapp/src/routes/About/index.js @@ -25,21 +25,21 @@ const About = () => {
- + {t('body.paragraph1')} {t('subtitle1')} - + {t('body1.paragraph1')} {t('subtitle2')} - + {t('body2.paragraph1')} {t('subtitle3')} {eosConfig.networkName !== 'lacchain' ? ( <> - + {t('body3.paragraph1Text1')}{' '} eosio @@ -54,13 +54,13 @@ const About = () => { - + {t('body3.paragraph2')} - + {t('body3.paragraph3')} - + {t('body3.paragraph4Text1')}{' '} { ) : ( - + {t('body3.paragraph1Text1')}{' '} eosio @@ -91,7 +91,7 @@ const About = () => { . )} - + {t('body3.paragraph5')}
From a9ec56dd35ffa1cc4488b0c4fb5299d4c53ab25a Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Tue, 9 May 2023 14:22:50 -0600 Subject: [PATCH 10/15] fix(webapp): increase the space between the name of the producers --- webapp/src/components/ProducersChart/index.js | 21 +++++++++++++++++-- .../src/components/ProducersChart/styles.js | 6 +++--- webapp/src/routes/Home/styles.js | 6 ++++++ 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/webapp/src/components/ProducersChart/index.js b/webapp/src/components/ProducersChart/index.js index ddce6c2e..0df0d56f 100644 --- a/webapp/src/components/ProducersChart/index.js +++ b/webapp/src/components/ProducersChart/index.js @@ -59,22 +59,39 @@ const CustomBarLabel = memo( outerRadius - gap, midAngle, ) - const cartesianText = polarToCartesian(cx, cy, outerRadius + 8, midAngle) + const spacing = sm ? 16 : 12 + const cartesianText = polarToCartesian( + cx, + cy, + outerRadius + spacing, + midAngle, + ) const link = generalConfig.eosRateLink ? `${generalConfig.eosRateLink}/block-producers/${payload.owner}` : payload.url + const getNameTextAnchor = (x, cx) => { + if (x + 30 >= cx && x < cx) { + return 'middle' + } else if (x > cx) { + return 'start' + } else { + return 'end' + } + } + const ProducerName = () => { const Content = () => ( cx ? 'start' : 'end'} + textAnchor={getNameTextAnchor(x, cx)} dominantBaseline="central" fill={ fill === theme.palette.primary.dark ? theme.palette.primary.dark : theme.palette.primary.light } + fontSize={sm ? 14 : 12} fontFamily="Roboto, Helvetica, Arial, sans-serif;" fontWeight={fill === theme.palette.primary.dark ? 'bold' : 'normal'} > diff --git a/webapp/src/components/ProducersChart/styles.js b/webapp/src/components/ProducersChart/styles.js index 5058920d..2290e7f1 100644 --- a/webapp/src/components/ProducersChart/styles.js +++ b/webapp/src/components/ProducersChart/styles.js @@ -4,9 +4,9 @@ export default (theme) => ({ padding: theme.spacing(2), borderRadius: theme.spacing(1), boxShadow: - '0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12)' + '0px 5px 5px -3px rgba(0,0,0,0.2), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12)', }, description: { - fontWeight: 'normal' - } + fontWeight: 'normal', + }, }) diff --git a/webapp/src/routes/Home/styles.js b/webapp/src/routes/Home/styles.js index f9a55a13..31917a0b 100644 --- a/webapp/src/routes/Home/styles.js +++ b/webapp/src/routes/Home/styles.js @@ -102,6 +102,9 @@ export default (theme) => ({ [theme.breakpoints.down('md')]: { marginBottom: '10px', }, + '& .MuiPaper-root': { + height: '100%', + }, }, cardGrow: { flexGrow: '1', @@ -110,6 +113,9 @@ export default (theme) => ({ flexBasis: 'calc(100%/3)', marginBottom: '10px', }, + '& .MuiPaper-root': { + height: '100%', + }, }, uniquelocations: { flexGrow: '1 !important', From c448f686a19086ec6e708c76dad7b44469a362f6 Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Wed, 10 May 2023 14:16:35 -0600 Subject: [PATCH 11/15] feat(hapi): add custum permission for cpu benchmark --- docker-compose.yaml | 1 + hapi/src/config/eos.config.js | 1 + hapi/src/utils/eosmechanics.util.js | 74 ++++++++++------------------ hapi/src/workers/producers.worker.js | 5 +- 4 files changed, 31 insertions(+), 50 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 069fde45..5cb0b0af 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -41,6 +41,7 @@ services: HAPI_EOS_FAUCET_ACCOUNT_PASSWORD: '${HAPI_EOS_FAUCET_ACCOUNT_PASSWORD}' HAPI_EOS_MECHANICS_ACCOUNT: '${HAPI_EOS_MECHANICS_ACCOUNT}' HAPI_EOS_MECHANICS_PASSWORD: '${HAPI_EOS_MECHANICS_PASSWORD}' + HAPI_EOS_MECHANICS_CUSTOM_PERMISSION: '${HAPI_EOS_MECHANICS_CUSTOM_PERMISSION}' HAPI_EOS_MECHANICS_INCLUDE_TRANSACTION: '${HAPI_EOS_MECHANICS_INCLUDE_TRANSACTION}' HAPI_EOS_WALLET_URL: '${HAPI_EOS_WALLET_URL}' HAPI_EOS_BP_JSON_ON_CHAIN: '${HAPI_EOS_BP_JSON_ON_CHAIN}' diff --git a/hapi/src/config/eos.config.js b/hapi/src/config/eos.config.js index de720fb9..485e09cc 100644 --- a/hapi/src/config/eos.config.js +++ b/hapi/src/config/eos.config.js @@ -23,6 +23,7 @@ module.exports = { eosmechanics: { account: process.env.HAPI_EOS_MECHANICS_ACCOUNT, password: process.env.HAPI_EOS_MECHANICS_PASSWORD, + customPermission: process.env.HAPI_EOS_MECHANICS_CUSTOM_PERMISSION || 'active', includeTransaction: process.env.HAPI_EOS_MECHANICS_INCLUDE_TRANSACTION ? JSON.parse(process.env.HAPI_EOS_MECHANICS_INCLUDE_TRANSACTION) : '' diff --git a/hapi/src/utils/eosmechanics.util.js b/hapi/src/utils/eosmechanics.util.js index 2b55ef38..50037ff6 100644 --- a/hapi/src/utils/eosmechanics.util.js +++ b/hapi/src/utils/eosmechanics.util.js @@ -2,30 +2,18 @@ const { eosConfig } = require('../config') const eosUtil = require('./eos.util') -const cpu = async () => { - const actions = [] - +const transact = async actions => { if (eosConfig.eosmechanics.includeTransaction) { actions.push(eosConfig.eosmechanics.includeTransaction) } - actions.push({ - authorization: [ - { - actor: eosConfig.eosmechanics.account, - permission: 'active' - } - ], - account: eosConfig.eosmechanics.account, - name: 'cpu', - data: {} - }) - const transaction = await eosUtil.transact( actions, eosConfig.eosmechanics.account, eosConfig.eosmechanics.password ) + + await new Promise((resolve) => setTimeout(() => resolve(), 1000)) const block = await eosUtil.getBlock(transaction.processed.block_num) return { @@ -34,18 +22,32 @@ const cpu = async () => { } } -const net = async (input = '') => { +const cpu = async () => { const actions = [] - if (eosConfig.eosmechanics.includeTransaction) { - actions.push(eosConfig.eosmechanics.includeTransaction) - } + actions.push({ + authorization: [ + { + actor: eosConfig.eosmechanics.account, + permission: eosConfig.eosmechanics.customPermission + } + ], + account: eosConfig.eosmechanics.account, + name: 'cpu', + data: {} + }) + + return await transact(actions) +} + +const net = async (input = '') => { + const actions = [] actions.push({ authorization: [ { actor: eosConfig.eosmechanics.account, - permission: 'active' + permission: eosConfig.eosmechanics.customPermission } ], account: eosConfig.eosmechanics.account, @@ -55,32 +57,17 @@ const net = async (input = '') => { } }) - const transaction = await eosUtil.transact( - actions, - eosConfig.eosmechanics.account, - eosConfig.eosmechanics.password - ) - await new Promise(resolve => setTimeout(() => resolve(), 500)) - const block = await eosUtil.getBlock(transaction.processed.block_num) - - return { - transaction, - block - } + return await transact(actions) } const ram = async () => { const actions = [] - if (eosConfig.eosmechanics.includeTransaction) { - actions.push(eosConfig.eosmechanics.includeTransaction) - } - actions.push({ authorization: [ { actor: eosConfig.eosmechanics.account, - permission: 'active' + permission: eosConfig.eosmechanics.customPermission } ], account: eosConfig.eosmechanics.account, @@ -88,18 +75,7 @@ const ram = async () => { data: {} }) - const transaction = await eosUtil.transact( - actions, - eosConfig.eosmechanics.account, - eosConfig.eosmechanics.password - ) - await new Promise(resolve => setTimeout(() => resolve(), 500)) - const block = await eosUtil.getBlock(transaction.processed.block_num) - - return { - transaction, - block - } + return await transact(actions) } module.exports = { diff --git a/hapi/src/workers/producers.worker.js b/hapi/src/workers/producers.worker.js index 3e0f6879..ef72fc04 100644 --- a/hapi/src/workers/producers.worker.js +++ b/hapi/src/workers/producers.worker.js @@ -59,7 +59,10 @@ const start = async () => { settingService.syncEOSPrice, workersConfig.syncExchangeRate ) - run('CPU WORKER', cpuService.worker, workersConfig.cpuWorkerInterval) + + if (eosConfig.eosmechanics.account && eosConfig.eosmechanics.password) { + run('CPU WORKER', cpuService.worker, workersConfig.cpuWorkerInterval) + } if (eosConfig.stateHistoryPluginEndpoint) { run('SYNC STATS INFO', statsService.sync, workersConfig.syncStatsInterval) From 06605b6a9112da9256ded1be2572d44c7498d336 Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Wed, 10 May 2023 14:18:18 -0600 Subject: [PATCH 12/15] chore(hapi): format code --- hapi/src/config/eos.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hapi/src/config/eos.config.js b/hapi/src/config/eos.config.js index 485e09cc..26fc45cf 100644 --- a/hapi/src/config/eos.config.js +++ b/hapi/src/config/eos.config.js @@ -23,7 +23,8 @@ module.exports = { eosmechanics: { account: process.env.HAPI_EOS_MECHANICS_ACCOUNT, password: process.env.HAPI_EOS_MECHANICS_PASSWORD, - customPermission: process.env.HAPI_EOS_MECHANICS_CUSTOM_PERMISSION || 'active', + customPermission: + process.env.HAPI_EOS_MECHANICS_CUSTOM_PERMISSION || 'active', includeTransaction: process.env.HAPI_EOS_MECHANICS_INCLUDE_TRANSACTION ? JSON.parse(process.env.HAPI_EOS_MECHANICS_INCLUDE_TRANSACTION) : '' From 0396d506ad0af13fdd3617463f59ba21b3980af1 Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Wed, 10 May 2023 14:19:32 -0600 Subject: [PATCH 13/15] chore(kubernetes): add HAPI_EOS_MECHANICS_CUSTOM_PERMISSION variable --- kubernetes/configmap-dashboard.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/kubernetes/configmap-dashboard.yaml b/kubernetes/configmap-dashboard.yaml index 99421d1f..5553fb71 100644 --- a/kubernetes/configmap-dashboard.yaml +++ b/kubernetes/configmap-dashboard.yaml @@ -69,6 +69,7 @@ data: HAPI_EOS_FAUCET_ACCOUNT_PASSWORD: '${HAPI_EOS_FAUCET_ACCOUNT_PASSWORD}' HAPI_EOS_MECHANICS_ACCOUNT: '${HAPI_EOS_MECHANICS_ACCOUNT}' HAPI_EOS_MECHANICS_PASSWORD: '${HAPI_EOS_MECHANICS_PASSWORD}' + HAPI_EOS_MECHANICS_CUSTOM_PERMISSION: '${HAPI_EOS_MECHANICS_CUSTOM_PERMISSION}' HAPI_EOS_MECHANICS_INCLUDE_TRANSACTION: '${HAPI_EOS_MECHANICS_INCLUDE_TRANSACTION}' HAPI_EOS_WALLET_URL: '${HAPI_EOS_WALLET_URL}' HAPI_EOS_BP_JSON_ON_CHAIN: '${HAPI_EOS_BP_JSON_ON_CHAIN}' From 94e7dca4d4764c6c11c9e2a7d50992b0b0815bd7 Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Wed, 10 May 2023 14:22:27 -0600 Subject: [PATCH 14/15] feat(github): add custom permission for cpu benchmark in libre-testnet --- .github/workflows/deploy-libre-testnet.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-libre-testnet.yaml b/.github/workflows/deploy-libre-testnet.yaml index ba2bf4d6..e9dd2f93 100644 --- a/.github/workflows/deploy-libre-testnet.yaml +++ b/.github/workflows/deploy-libre-testnet.yaml @@ -88,6 +88,7 @@ jobs: HAPI_EOS_BASE_ACCOUNT_PASSWORD: ${{ secrets.HAPI_EOS_BASE_ACCOUNT_PASSWORD }} HAPI_EOS_MECHANICS_ACCOUNT: ${{ secrets.HAPI_EOS_MECHANICS_ACCOUNT }} HAPI_EOS_MECHANICS_PASSWORD: ${{ secrets.HAPI_EOS_MECHANICS_PASSWORD }} + HAPI_EOS_MECHANICS_CUSTOM_PERMISSION: 'benchmark' HAPI_EOS_FAUCET_ACCOUNT_PASSWORD: ${{ secrets.HAPI_EOS_FAUCET_ACCOUNT_PASSWORD }} GOOGLE_CREDENTIALS_JSON: ${{ secrets.GOOGLE_CREDENTIALS_JSON }} HAPI_EOS_WALLET_URL: http://dashboard-wallet:8888 From 5a3144dfa7376bcdaf41e4659cea4792769825a7 Mon Sep 17 00:00:00 2001 From: Torresmorah Date: Thu, 11 May 2023 09:22:43 -0600 Subject: [PATCH 15/15] chore(envs): add HAPI_EOS_MECHANICS_CUSTOM_PERMISSION variable --- .env.jungle | 3 ++- .env.lacchain | 3 ++- .env.libre | 3 ++- .env.libretestnet | 5 +++-- .env.local | 3 ++- .env.mainnet | 5 +++-- .env.proton | 5 +++-- .env.protontestnet | 3 ++- .env.telos | 5 +++-- .env.telostestnet | 3 ++- .env.ultratestnet | 3 ++- .env.wax | 5 +++-- .env.waxtestnet | 3 ++- 13 files changed, 31 insertions(+), 18 deletions(-) diff --git a/.env.jungle b/.env.jungle index 8cca31b7..bcb32923 100644 --- a/.env.jungle +++ b/.env.jungle @@ -26,7 +26,8 @@ HAPI_EOS_BASE_ACCOUNT=baseaccount HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... HAPI_EOS_MECHANICS_ACCOUNT=eosmechatero HAPI_EOS_MECHANICS_PASSWORD=PW... -HAPI_EOS_WALLET_URL=http://localhost:8888 +HAPI_EOS_MECHANICS_CUSTOM_PERMISSION= +HAPI_EOS_WALLET_URL=http://wallet:8888 HAPI_EOS_BP_JSON_ON_CHAIN=false HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT= HAPI_EOS_BP_JSON_ON_CHAIN_TABLE= diff --git a/.env.lacchain b/.env.lacchain index c7bcab7f..3e23fcb4 100644 --- a/.env.lacchain +++ b/.env.lacchain @@ -27,8 +27,9 @@ HAPI_EOS_BASE_ACCOUNT=baseaccount HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... HAPI_EOS_MECHANICS_ACCOUNT=eosmechanics HAPI_EOS_MECHANICS_PASSWORD=PW... +HAPI_EOS_MECHANICS_CUSTOM_PERMISSION= HAPI_EOS_MECHANICS_INCLUDE_TRANSACTION={"account":"writer","name":"run","authorization":[{"actor":"costarica","permission":"writer"}],"data":{}} -HAPI_EOS_WALLET_URL=http://localhost:8888 +HAPI_EOS_WALLET_URL=http://wallet:8888 HAPI_EOS_BP_JSON_ON_CHAIN=false HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT= HAPI_EOS_BP_JSON_ON_CHAIN_TABLE= diff --git a/.env.libre b/.env.libre index c038637f..66597d56 100644 --- a/.env.libre +++ b/.env.libre @@ -26,7 +26,8 @@ HAPI_EOS_BASE_ACCOUNT=baseaccount HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... HAPI_EOS_MECHANICS_ACCOUNT=eosmechatero HAPI_EOS_MECHANICS_PASSWORD=PW... -HAPI_EOS_WALLET_URL=http://localhost:8888 +HAPI_EOS_MECHANICS_CUSTOM_PERMISSION= +HAPI_EOS_WALLET_URL=http://wallet:8888 HAPI_EOS_BP_JSON_ON_CHAIN=false HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT=producerjson HAPI_EOS_BP_JSON_ON_CHAIN_TABLE=producerjson diff --git a/.env.libretestnet b/.env.libretestnet index eaa7ca13..339c1b90 100644 --- a/.env.libretestnet +++ b/.env.libretestnet @@ -26,7 +26,8 @@ HAPI_EOS_BASE_ACCOUNT=baseaccount HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... HAPI_EOS_MECHANICS_ACCOUNT=eosmechatero HAPI_EOS_MECHANICS_PASSWORD=PW... -HAPI_EOS_WALLET_URL=http://localhost:8888 +HAPI_EOS_MECHANICS_CUSTOM_PERMISSION=benchmark +HAPI_EOS_WALLET_URL=http://wallet:8888 HAPI_EOS_BP_JSON_ON_CHAIN=false HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT=producerjson HAPI_EOS_BP_JSON_ON_CHAIN_TABLE=producerjson @@ -81,7 +82,7 @@ REACT_APP_EOS_BP_JSON_ON_CHAIN_SCOPE=producerjson REACT_APP_SYNC_TOLERANCE_INTERVAL=180000 REACT_APP_TOKEN_SYMBOL=LIBRE REACT_APP_NETWORK_URL=[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}] -REACT_APP_DISABLED_MENU_ITEMS=["/missed-blocks", "/cpu-benchmark","/block-distribution"] +REACT_APP_DISABLED_MENU_ITEMS=["/missed-blocks","/block-distribution"] REACT_APP_BLOCK_EXPLORER_URL=https://wax-test.bloks.io/transaction/(transaction) REACT_APP_STATE_HISTORY_ENABLED=false REACT_APP_GOOGLE_ANALITIC_PAGE_ID=G-E6Y0EC9FT8 diff --git a/.env.local b/.env.local index d037ef76..b9aebd7b 100644 --- a/.env.local +++ b/.env.local @@ -26,8 +26,9 @@ HAPI_EOS_BASE_ACCOUNT=baseaccount HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... HAPI_EOS_MECHANICS_ACCOUNT=eosmechanics HAPI_EOS_MECHANICS_PASSWORD=PW... +HAPI_EOS_MECHANICS_CUSTOM_PERMISSION= HAPI_EOS_MECHANICS_INCLUDE_TRANSACTION={"account":"writer","name":"run","authorization":[{"actor":"latamlink","permission":"writer"}],"data":{}} -HAPI_EOS_WALLET_URL=http://localhost:8888 +HAPI_EOS_WALLET_URL=http://wallet:8888 HAPI_EOS_BP_JSON_ON_CHAIN=false HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT= HAPI_EOS_BP_JSON_ON_CHAIN_TABLE= diff --git a/.env.mainnet b/.env.mainnet index b57c3e0e..ae550ba8 100644 --- a/.env.mainnet +++ b/.env.mainnet @@ -24,9 +24,10 @@ HAPI_EOS_API_ENDPOINTS=["https://eos.edenia.cloud","https://api.main.alohaeos.co HAPI_EOS_API_CHAIN_ID=aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906 HAPI_EOS_BASE_ACCOUNT=baseaccount HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... -HAPI_EOS_MECHANICS_ACCOUNT=eosmechatero +HAPI_EOS_MECHANICS_ACCOUNT= HAPI_EOS_MECHANICS_PASSWORD=PW... -HAPI_EOS_WALLET_URL=http://localhost:8888 +HAPI_EOS_MECHANICS_CUSTOM_PERMISSION= +HAPI_EOS_WALLET_URL=http://wallet:8888 HAPI_EOS_BP_JSON_ON_CHAIN=false HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT= HAPI_EOS_BP_JSON_ON_CHAIN_TABLE= diff --git a/.env.proton b/.env.proton index 0c99aeb9..5a0c27b3 100644 --- a/.env.proton +++ b/.env.proton @@ -24,9 +24,10 @@ HAPI_EOS_API_ENDPOINTS=["https://proton.edenia.cloud","https://proton.eosusa.io" HAPI_EOS_API_CHAIN_ID=384da888112027f0321850a169f737c33e53b388aad48b5adace4bab97f437e0 HAPI_EOS_BASE_ACCOUNT=baseaccount HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... -HAPI_EOS_MECHANICS_ACCOUNT=eosmechatero +HAPI_EOS_MECHANICS_ACCOUNT= HAPI_EOS_MECHANICS_PASSWORD=PW... -HAPI_EOS_WALLET_URL=http://localhost:8888 +HAPI_EOS_MECHANICS_CUSTOM_PERMISSION= +HAPI_EOS_WALLET_URL=http://wallet:8888 HAPI_EOS_BP_JSON_ON_CHAIN=false HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT= HAPI_EOS_BP_JSON_ON_CHAIN_TABLE= diff --git a/.env.protontestnet b/.env.protontestnet index 6cd2bd0d..b977934c 100644 --- a/.env.protontestnet +++ b/.env.protontestnet @@ -26,7 +26,8 @@ HAPI_EOS_BASE_ACCOUNT=baseaccount HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... HAPI_EOS_MECHANICS_ACCOUNT=eosmechatero HAPI_EOS_MECHANICS_PASSWORD=PW... -HAPI_EOS_WALLET_URL=http://localhost:8888 +HAPI_EOS_MECHANICS_CUSTOM_PERMISSION= +HAPI_EOS_WALLET_URL=http://wallet:8888 HAPI_EOS_BP_JSON_ON_CHAIN=false HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT= HAPI_EOS_BP_JSON_ON_CHAIN_TABLE= diff --git a/.env.telos b/.env.telos index 578dbb86..f4d6fbe0 100644 --- a/.env.telos +++ b/.env.telos @@ -24,9 +24,10 @@ HAPI_EOS_API_ENDPOINTS=["https://telos.greymass.com","https://telos.eosphere.io" HAPI_EOS_API_CHAIN_ID=4667b205c6838ef70ff7988f6e8257e8be0e1284a2f59699054a018f743b1d11 HAPI_EOS_BASE_ACCOUNT=eosmechatero HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... -HAPI_EOS_MECHANICS_ACCOUNT=eosmechatero +HAPI_EOS_MECHANICS_ACCOUNT= HAPI_EOS_MECHANICS_PASSWORD=PW... -HAPI_EOS_WALLET_URL=http://localhost:8888 +HAPI_EOS_MECHANICS_CUSTOM_PERMISSION= +HAPI_EOS_WALLET_URL=http://wallet:8888 HAPI_EOS_BP_JSON_ON_CHAIN=false HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT=producerjson HAPI_EOS_BP_JSON_ON_CHAIN_TABLE=producerjson diff --git a/.env.telostestnet b/.env.telostestnet index add57194..88793a02 100644 --- a/.env.telostestnet +++ b/.env.telostestnet @@ -26,7 +26,8 @@ HAPI_EOS_BASE_ACCOUNT=eosmechatero HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... HAPI_EOS_MECHANICS_ACCOUNT=eosmechatero HAPI_EOS_MECHANICS_PASSWORD=PW... -HAPI_EOS_WALLET_URL=http://localhost:8888 +HAPI_EOS_MECHANICS_CUSTOM_PERMISSION= +HAPI_EOS_WALLET_URL=http://wallet:8888 HAPI_EOS_BP_JSON_ON_CHAIN=false HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT=producerjson HAPI_EOS_BP_JSON_ON_CHAIN_TABLE=producerjson diff --git a/.env.ultratestnet b/.env.ultratestnet index 7cf5f5ef..a328ffa4 100644 --- a/.env.ultratestnet +++ b/.env.ultratestnet @@ -28,8 +28,9 @@ HAPI_EOS_FAUCET_ACCOUNT=1aa2aa3aa4ai HAPI_EOS_FAUCET_ACCOUNT_PASSWORD=PW... HAPI_EOS_MECHANICS_ACCOUNT=eosmechatero HAPI_EOS_MECHANICS_PASSWORD=PW... +HAPI_EOS_MECHANICS_CUSTOM_PERMISSION= HAPI_EOS_MECHANICS_INCLUDE_TRANSACTION= -HAPI_EOS_WALLET_URL=http://localhost:8888 +HAPI_EOS_WALLET_URL=http://wallet:8888 HAPI_EOS_BP_JSON_ON_CHAIN=false HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT= HAPI_EOS_BP_JSON_ON_CHAIN_TABLE= diff --git a/.env.wax b/.env.wax index 82e50da6..1544c12f 100644 --- a/.env.wax +++ b/.env.wax @@ -24,9 +24,10 @@ HAPI_EOS_API_ENDPOINTS=["https://wax.api.eosnation.io","https://wax.edenia.cloud HAPI_EOS_API_CHAIN_ID=1064487b3cd1a897ce03ae5b6a865651747e2e152090f99c1d19d44e01aea5a4 HAPI_EOS_BASE_ACCOUNT=baseaccount HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... -HAPI_EOS_MECHANICS_ACCOUNT=eosmechatero +HAPI_EOS_MECHANICS_ACCOUNT= HAPI_EOS_MECHANICS_PASSWORD=PW... -HAPI_EOS_WALLET_URL=http://localhost:8888 +HAPI_EOS_MECHANICS_CUSTOM_PERMISSION= +HAPI_EOS_WALLET_URL=http://wallet:8888 HAPI_EOS_BP_JSON_ON_CHAIN=false HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT= HAPI_EOS_BP_JSON_ON_CHAIN_TABLE= diff --git a/.env.waxtestnet b/.env.waxtestnet index 7ac40ad7..bc255730 100644 --- a/.env.waxtestnet +++ b/.env.waxtestnet @@ -26,7 +26,8 @@ HAPI_EOS_BASE_ACCOUNT=baseaccount HAPI_EOS_BASE_ACCOUNT_PASSWORD=PW... HAPI_EOS_MECHANICS_ACCOUNT=eosmechatero HAPI_EOS_MECHANICS_PASSWORD=PW... -HAPI_EOS_WALLET_URL=http://localhost:8888 +HAPI_EOS_MECHANICS_CUSTOM_PERMISSION= +HAPI_EOS_WALLET_URL=http://wallet:8888 HAPI_EOS_BP_JSON_ON_CHAIN=false HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT= HAPI_EOS_BP_JSON_ON_CHAIN_TABLE=