dashboard: a Slipstream page, and withdrawing a slipstream tx from admin - #84
Draft
rsantacroce wants to merge 1 commit into
Draft
rsantacroce wants to merge 1 commit into
rsantacroce wants to merge 1 commit into
Conversation
With SLIPSTREAM_API_URL set, the public nav gains /slipstream: the minimum submission rate and current mineable rate, how to submit, and each recent tx with where it stands -- in template, mined (ours or not), confirmed, dropped with its reason. The page reads the slipstream service's API rather than slipstream.db, so the service stays the only owner of its schema, and a service that is down costs the page one card. Admin -> Tools lists the txs still open, each with a Withdraw button. That calls removeslipstreamtx on the enforcer, which holds the txs; the service records the tx as dropped (withdrawn) on its next poll.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This is the dashboard half of slipstream, stacked on #83. Its base is
feat/slipstream-service, so the diff here is only the dashboard. It retargets tomainonce #83 merges./slipstreamis shown in the nav only whenSLIPSTREAM_API_URLis set. It has four parts:curlline pointing atPUBLIC_SLIPSTREAM_URL, and a link to the pool'sinfo.json.removeslipstreamtxon the enforcer (ENFORCER_GBT_URL), because the enforcer is what holds the txs.dropped (withdrawn).ENFORCER_GBT_URLthe list still shows, but the buttons do not.Design notes
slipstream.db. The service stays the only owner of its schema, and there is no second reader to keep in step.Testing
dashboard/test/slipstream.test.js(6 new tests):fetchSlipstreamworks against a stub service.removeslipstreamtxto a stub enforcer.--enable-slipstream, the slipstream service, and this dashboard.withdrew 1 tx(s), the service recordedaccepted, in_template, dropped (withdrawn), and the page showed it as dropped.Found, not fixed here
Without a
shares.db(a proxy that has never run),/returns 500 fromviews/index.ejs:71. This is the same on the base branch, so it is not from this change.