ripple / validator-history-service

Service for ingesting, aggregating, storing, and disbursing XRP Ledger validation related data.
ISC License
14 stars 8 forks source link

feat: add amendment info #135

Closed pdp2121 closed 10 months ago

pdp2121 commented 11 months ago

High Level Overview of Change

Add a table to store amendments information:

This will also provide more stable source of truth for AmendmentEnabled transaction in Explorer, which hits 2 repos every time it was called.

This information will be accessed via /network/amendments/info endpoint.

Type of Change

ckniffen commented 10 months ago

I think this code should mostly be reworked into a tool in this repo to build the initial amendment info json files. That is because the datasources used here will likely always be behind test networks and behind when main net activates and amendment which we should catch when it happens so the data will already be there.

setupAmendmentsInfoTable should pull from json like the other PR does.

pdp2121 commented 10 months ago

I think this code should mostly be reworked into a tool in this repo to build the initial amendment info json files. That is because the datasources used here will likely always be behind test networks and behind when main net activates and amendment which we should catch when it happens so the data will already be there.

setupAmendmentsInfoTable should pull from json like the other PR does.

This is done only once anyway when we deploy so I don't think it's necessary to write it to json (it's complicated to write to a json file on the server as I mentioned earlier with the paths complication, reading is simple though). I have moved it to happen immediately after setupTables before connection began to ensure it happens before any connection, and add a log for future debug. Please let me know if that works.