Commit Graph

362 Commits

Author SHA1 Message Date
Joe Uhren 8bcb995728 Cluster + instance improvements
-Moved the database initialize call out of the instance code into the prestart script so that it is now only called once when you start the explorer even if you are running multiple cpus/threads
-The database connection function now uses the default connection string in the event a connection string is not supplied
-Removed unused reference to lib/explorer.js code from the cluster file
2023-08-20 20:41:41 -06:00
Joe Uhren 550b961ab3 Auto update expired TLS/SSL certificates
-Previously when manually linking TLS/SSL certificates from certbot, the certificates themselves would be automatically updated via certbot but the explorer was still referencing the old certificates in memory and would cause https connections to stop working once the certificates actually expired. The explorer now watches for changes to the certificate directory and will automatically refresh and use the new certificates without requiring any kind of restart.
2023-08-20 14:30:20 -06:00
Joe Uhren eec0efa25c Added support for top panel spacers
-3 panel spacer options have been added to the page header panel config to allow for different spacing configurations if desired
2023-08-19 16:24:03 -06:00
Joe Uhren 1c6bb35d58 Fix error in peer sync when node has no port 2023-06-27 21:13:53 -06:00
Joe Uhren 271e6f8679 Remove defunct exchange stex
-The default exchange was also updated to freiexchange
2023-06-15 20:47:27 -06:00
Joe Uhren dae3966632 Update website screenshot for readme 2023-06-14 18:43:45 -06:00
Joe Uhren dee62ade4f Version bump to v1.102.0 + other small updates
-Version bumped to v1.102.0 in package.json
-Updated the UPGRADE file with details of changes in v1.102.0
-Updated the year in the LICENSE and README files
2023-06-14 18:35:05 -06:00
Joe Uhren de0da04e7b Added better support for NODE_ENV
-The different methods of starting the explorer now set NODE_ENV to "development" or "production" depending on which options were chosen
-pm2 is now loaded from within the prestart script and will reload the config instead of starting if it was previously loaded which allows changing the NODE_ENV value if necessary

NOTE: if running via pm2 or forever when updating the explorer with this change, it is necessary to manually stop the explorer with `npm run stop-pm2` or `npm run stop-forever` and then start again after the code has been updated to allow NODE_ENV to be set to "production". Without doing this, the explorer will still be run in "development" mode until pm2 or forever is fully stopped and restarted.
2023-05-27 21:45:03 -06:00
Joe Uhren cb6c95c472 Added a new option for redirecting to https 2023-05-22 20:54:32 -06:00
Joe Uhren 74e9b43403 README changes
-Updated the recommended versions for Node.js and MongoDB
-Added text to the first paragrpah to make it more clear that EVM blockchains are not supported
-Added a step for exiting the mongo shell in the "Database Setup" section
-Removed the "Full Setup Guide" section
-Dropped the "Quick Install Instructions" section title and now all install instructions are under the main Installation section
-Added new steps to the "Pre-Install" section for installing node.js and mongodb
-Added a new entry to the "Known Issues" section to explain the "Callback was already called" error msg
-Added a new entry to the "Known Issues" section that better explains the padLevels warning msgs when using the forever module
-Added alternate instructions to the "Manually Link TLS/SSL Certificates to the Explorer" section which better explain which method should be used depending on whether the explorer is running on port 80 for http traffic or not
2023-05-22 20:38:52 -06:00
Joe Uhren 2e7c8ea201 Added an rpc cmd queue 2023-05-16 20:29:57 -06:00
Joe Uhren e5bd30a457 Fix for identifiying multi MNs created in same tx
-The find_masternodes function now searches for both txhash and address instead of only txhash to prevent matching different masternodes that were created in the same tx
-Moved the find_masternodes function out of the module.exports section of the database file since it doesn't need to be exported
2023-05-11 20:12:17 -06:00
Joe Uhren f6ebb89f27 "Powered By" footer text is now configurable
-Added a new "powered_by_text" option to the page_footer settings which can be used to override the text in the middle of the footer without the need to modify the source code
-The word "Explorer" was removed from the powered by text for new installs
2023-05-10 19:22:16 -06:00
Joe Uhren 813fe72471 Better handling of null market data 2023-05-08 20:08:45 -06:00
Joe Uhren 1a0ef69749 Added support for newer mongoose versions
-Mongoose and mongodb dependencies have been updated to the most recent versions in package.json
-Updated the project for use with the newest mongoose major version which required fixing many breaking changes to a number of files in the explorer
-Removed the db.find_address_tx() function as it is unused

NOTE: This update requires mongoose 6.0.10 or higher. If you are getting errors running the explorer after upgrading, it is recommended to run an 'npm update' or manually update mongoose to a more modern version which should fix the problem
2023-05-07 20:55:29 -06:00
Joe Uhren ace3f52543 Fix Deprecation Warning msg for applicable themes
-The Flatly, Litera and Solar themes have been updated by removing some duplicate text that caused a number of deprecation msgs to appear when starting the explorer
2023-05-06 19:03:45 -06:00
Joe Uhren 7f6c58525c Better quote support for coin name and symbol
-Fixed some javascript errors with using quotes in the coin.name and coin.symbol settings which effectively broke certain functions in the explorer
2023-05-06 18:16:47 -06:00
Joe Uhren 09fa919686 Orphan block fix + other misc improvements
-The block sync will now remove orphaned block data from the txes collecton,  address balances/sent/received data as well as addresstx data and now stores limited info in a new orphans collection
-Added a new optional page for viewing orphaned block data
-The coinbase address now updates sent totals from POS rewards and other transactions that have vout but no vin addresses
-Block and transaction pages now display a warning when viewing an orphaned block or tx
-Added a couple new fields to the coinstats collection for tracking orphaned blocks
-Added new locale strings for the orphaned block feature
2023-05-06 12:36:35 -06:00
Joe Uhren 208187c293 Fix confirmations value in gettx api 2023-03-03 15:20:33 -07:00
Joe Uhren 4047587990 Fix strictQuery warning from new mongoose versions
-Suppress the "DeprecationWarning: Mongoose: the `strictQuery` option will be switched back to `false` by default in Mongoose 7" warning msg when starting the explorer and using any of the scripts that connect to mongo
2022-12-16 19:17:37 -07:00
Joe Uhren ac10031bf8 Add options to round decimals for network charts
-New options to set max decimals for network (nethash and difficulty) charts
-Restored the number formatting with commas for numbers larger than 1000
2022-10-15 14:32:38 -06:00
Joe Uhren de25461494 Improve network chart precision
-Chart.js numbers are rounded to 3 decimals by default. This fix uses the raw value instead of the formatted number for display on the network hashrate and difficulty charts so that low numbers like 0.00028363 are displayed properly instead of being rounded to 0
2022-10-14 13:13:46 -06:00
Joe Uhren 03f62a22dc Remove jstransformer-markdown-it dependency
-jstransformer-markdown-it was barely being used and its use as a dependency just isn't justified, so it has been removed
-The network page was the only place where the markup plugin was used so the text was rewritten to no longer use the plugin
2022-09-22 19:50:52 -06:00
Joe Uhren 6078cd8733 Add sorting by protocol to get_peers function
-Small change to help sort the peers list a bit better when filtering ports so that lower protocols drop off the list if there are multiple connections from the same ip with different protocols
2022-09-22 16:54:56 -06:00
Joe Uhren 7bbd8d80b4 Hide protocols before filter ports on network page
-Moved the code around for filtering ports and protocols on the network page to prevent filtering too aggressively when there are multipl entries for an ip address in which the 1st record for a given ip happens to be on a protocol that will be filtered
2022-09-22 16:43:01 -06:00
Joe Uhren 408df1c9c9 port_filter option now allows hiding port
-The port_filter settings for all 3 network page tables now support a -1 value which will completely hide the port from the associated table. If there are/were multiple ip addresses in the peers list with connections from different ports, this new option will consolidate those multiple records into a single entry since the port is no longer visible
2022-09-22 16:27:39 -06:00
Joe Uhren a4363d1a98 Prevent scrolling on side menu close button click 2022-09-22 14:43:04 -06:00
Joe Uhren a38284f2ae Fix footer width calculations
-The footer was being resized at the wrong width breakpoints because of an issue with determining the current width of the screen. If you had previously fine-tuned your page_footer.footer_height_xxx and page_footer.social_link_percent_height_xxx options, they may need to be readjusted to account for the new proper width breakpoints after this fix is applied
2022-09-18 17:00:17 -06:00
Joe Uhren 261c2b6d1d Add side menu support + other core layout changes
-A new side menu option was added for displaying menu items vertically on the left-hand side of the page
-Added a new script called OverlayScrollbars v1.13.3 for displaying custom scrollbars on the mobile menu (both top and side menu) in the event that they extend beyond the visible screen
-Updated the market menu dropdown colors to better match the base menu colors (default, light and dark colors only)
-Updated the Exor theme to v3.0.1 with a few small fixes for displaying menu items in the side menu and updated market dropdown colors
-Updated how the richlist pie chart is sized to prevent it from creating unnecessary scrollbars because of the side menu
-Search field and button are now hidden in the top menu when the mobile menu is expanded to make it easier to scroll through menu items
-Added a tooltip title to the top menu search and menu toggler buttons
2022-09-17 22:02:00 -06:00
Joe Uhren ed96eb78a1 Fix peer sync for addresses without country data
-Removed the check for country and country_code since not all ip addresses have country information and can cause a peer drop loop as a result
-Updated the error msg text when port data is not found for existing peers
2022-08-10 19:09:28 -06:00
Joe Uhren dbe0238587 Add Unnamed exchange to markets 2022-08-07 17:19:51 -06:00
Joe Uhren e76461db7d Fix divide by zero when calculating market change 2022-07-24 19:19:31 -06:00
Joe Uhren 07968c52eb Add Txbit exchange to markets
-Also updated the comments for some of the other markets in the settings.js and settings.json.template files
2022-07-24 19:06:26 -06:00
Joe Uhren 1178038710 Better handling of stop/kill sync processes
-The SIGINT and SIGTERM signals are now being caught and handled in the sync.js file so that most options for syncing blocks, markets, peers, masternodes, etc. are now being gracefully shut down instead of killed in the middle of the process. This should help prevent data anomalies when you need to stop or kill a sync process
-The update_tx_db function was moved from the database.js file into the sync.js file so that block syncs can now be gracefully stopped. The update_tx_db function was also copied to the benchmark.js
-The save_tx function was moved into the module.exports for the database.js file so that it can now be called from outside the database.js file
2022-07-17 16:49:02 -06:00
Joe Uhren bfbc50beda Add support for vin/vout hashes inside an array
-Some blockchains store certain vin or vout addresses within an array instead of as a simple string which would cause them to be read improperly by the explorer and result in transactions that were not attributed to the proper address. It also caused multiple inputs/outputs from the same address in a single transaction to not be grouped together like other transactions in the explorer
2022-07-17 14:28:58 -06:00
Joe Uhren 58bd8ffec8 Update website screenshot for readme 2022-07-09 20:25:10 -06:00
Joe Uhren 42a59abac2 Version bump to v1.101.0 + update UPGRADE file 2022-07-09 19:33:58 -06:00
Joe Uhren 41a62c9a29 Block/Transaction text updates
-Locale string tx_hash was changed from "Hash" to "Tx Hash" to be clearer about which Hash it refers to
-TXid was renamed to "Tx Hash" throughout the site
-Removed the coin name from the tx hash label on the transaction page
-Removed the coin name from the block hash label on the block page and changed the text "block" to "Block Hash"
2022-07-09 16:23:57 -06:00
Joe Uhren e7fcc64e12 Rename header_logo.png to header-logo.png 2022-07-09 14:23:34 -06:00
Joe Uhren 27c29efb81 Add new arguments to the update script
-Use the cmd `npm run update-explorer "explorer-only"` to update the explorer code only, without checking for out-of-date dependencies
-Use the cmd `npm run update-explorer "dependencies-only"` to update outdated dependencies only, without checking for explorer code updates
-Updated the README with the 2 new script arguments
2022-07-09 13:53:33 -06:00
Joe Uhren e5d4c639d3 Add custom javascript file
-The custom.js file can be used to add custom javascript code without affecting the ability to do a git pull update
-Added a quick explanation of using the custom.js file in the "Configure Explorer Settings" section of the README
2022-07-06 21:50:00 -06:00
Joe Uhren 4681fa1e65 Network addnode table updates
-Added "copy to clipboard" buttons to addnode tables
-Addnode table data no longer wraps onto multiple lines when the data cannot fit on the screen
2022-07-06 21:10:01 -06:00
Joe Uhren 82abe8a675 Add missing error page title 2022-07-03 20:13:50 -06:00
Joe Uhren 5843b5d442 Fix for installs with spaces in the absolute path
-If the explorer is installed to a directory that has a space character somewhere in the absolute path, the locking mechanism will not work correctly on non-windows computers and will cause undesired behavior without this fix
2022-07-03 20:00:07 -06:00
Joe Uhren bae4d50087 Various core improvements and easier updating
-The update_explorer.js script has been improved with better spacing and the ability to restart the explorer automatically to ensure new changes take effect immidiately (works with npm start, pm2 and forever)
-The code to compile scss to css has been moved from the prestart script into its own compile_css.js script which is now called from the update-explorer.js script to apply css changes after update
-The cluster code now handles a custom restart msg which is used to restart the explorer from the update explorer process
-Pm2 and Forever are now referenced by the name 'explorer' instead of ./bin/instance or ./bin/cluster [SEE IMPORTANT NOTE BELOW]
-Added reload/restart scripts to the package.json for pm2 and forever
-Pm2 and forever now write a pid file to the tmp directory when started. NOTE: Forever is now started from the prestart script due to a bug in forever that prevents the pid from being written to a different directory without the absolute path
-Fixed a bug which caused the prestart script to be run twice when starting the explorer with `npm start`
-The cluster code now accepts a numeric argument to force a specific number of instances to be loaded
-The `npm run start-instance` cmd now loads using the cluster code with a single instance
-The is_locked function now accepts an optional 'silent' argument to prevent displaying msgs while checking for pid/lock files
-Added some process.exit statements to the stop_explorer.js file
-Updated the README with cmd changes from package.json and updated description of the "Update Explorer Script"

IMPORTANT NOTE: It is strongly recommended to stop the explorer before performing this update. If the explorer is running while you perform this update, you will need to stop and restart the explorer for this update to fully take effect. Because of the changes in this commit, stopping the explorer using the built-in pm2 and/or forever stop cmds will not work and you will need to type out the full stop cmd this one time only, and going forward from now on you should no longer need to even stop the explorer for any update as it is now built into the update cmd.

If running using pm2 and you cannot stop the explorer, you can use stop using the following full cmd syntax:

Windows:
pm2 stop ./bin/instance

Linux and other OS's:
node node_modules/pm2/bin/pm2 stop ./bin/instance

If running using forever and you cannot stop the explorer, you can use stop using the following full cmd syntax:

All OS's:
node node_modules/forever/bin/forever stop ./bin/cluster
2022-07-03 19:13:50 -06:00
Joe Uhren 8fa337f6f9 Network peer updates
-Added a new port_filter setting to the 3 network_page tables which allows showing only results from peers on the selected port
-Added a new hide_protocols setting to the 3 network_page tables which allows hiding results from peers on the selected protocols
-Added a Port column to the data table on the Network page Connections tab
-The data table on the Network page Connections tab is now sortable
-The peer sync now refreshes data for peers that existed since last sync
-Adding and updating peers now displays the port # in the log output
-The /ext/getnetworkpeers api is now sorted by ip4/ip6, address and port which also means all data on the Network page is sorted this way by default as well
-The /ext/getnetworkpeers api no longer requires the internal argument for calls originating from the Network page
-The Network page now only makes a single call to the /ext/getnetworkpeers api instead of 3 calls
-The find_peer and drop_peer functions now requiresa port to distinguish between multiple connections to the same peer on different ports
2022-07-01 21:11:57 -06:00
Joe Uhren fb5ce795fa Add Dex-Trade exchange to markets 2022-06-27 18:55:12 -06:00
Joe Uhren 2584fbda2a Fix favicon path on pages with more than 1 slash 2022-06-26 21:02:29 -06:00
Joe Uhren c4c09905bf Add FreiExchange/FreiXLite exchange to markets
-This exchange has 2 separate sites using the same api, so new functionality was added to the explorer to handle alt markets like this
-market files now allow for new field names: "market_name_alt" was added for the alternate market name, "market_logo_alt" was added for displaying an alternate logo, a "market_url" function was added that will return a url string to replace the {url_prefix} code in the market_url_template and an "isAlt" function was added to determine if the alt name/logo should be used
-A new freiexchange entry was added to the markets_page.exchanges setting
-Updated the README with the updated market info
2022-06-26 20:48:13 -06:00
Joe Uhren c64cc24e04 Add support for getblockchaininfo rpc cmd
-sync.supply setting now allows getting moneysupply from getblockchaininfo cmd
-README updated with info abour getblockchaininfo cmd
2022-06-24 21:12:35 -06:00