Also included is an upgrade from bootstrap 4.5 to 4.6.2. Nothing major changes
in the new version, just some improved compatibility/consistency between
browsers.
- Fixed an issue where long pages (such as ticket search result) would allow the
viewer to scroll beyond the footer.
- Fixed footer stretching to full widescreen size rather than staying inside
bounds of bootstrap container
- More consistent style for inputs (password prompt, ticket search input)
Using a relative time rather than absolute requires far less effort for
a reader to understand, e.g. compare "25 Oct 2024 11:12:49 UTC" to "3
minutes ago".
As a nice side-effect this also fixes a minor privacy issue where using
the full absolute timestamp would expose the server timezone to the
public.
Not gaining any new features here but some minor bug fixes.
gorilla/sessions v1.4.0 and bbolt v1.3.11 are available but not taking
them at this time because they will force this project to bump its
minimum required go version.
* ci: Update linter to 1.59.1.
Also remove deprecated linter "vetshadow", its functionality is now
included in the "govet" linter.
* ci: Add new linters.
- fatcontext - Detects nested contexts in loops.
- mirror - Reports wrong mirror patterns of bytes/strings usage.
- nilnil - Checks that there is no simultaneous return of nil error and
an invalid value.
- usestdlibvars - detect the possibility to use variables/constants from
the Go standard library.
Upgrade the dcrwallet dependency to pick up the new version of
txrules.StakePoolTicketFee which considers the status of DCP0012 in its
fee calculation.
**Warning: This commit contains a database upgrade.**
In order to add future support for retiring xpub keys, the database is
upgraded such that the keys are now stored in a dedicated bucket which
can hold multiple values rather than storing a single key as individual
values in the root bucket.
A new ID field is added to distinguish between keys. This ID is added to
every ticket record in the database in order to track which pubkey was
used for each ticket.
A new field named "Retired" has also been added to pubkeys. It is a unix
timestamp representing the moment the key was retired, or zero for the
currently active key.
A new command in vspadmin writes the default config file for a new vspd
deployment. The behaviour is removed from vspd and documentation has
been updated to reflect the change.
vspadmin is a new binary which implements one-off admin tasks which are
necessarily interactive and thus do not fit neatly into the long-lived
vspd binary.
The first behaviour added to vspadmin is the ability to create a new
vspd database. This behaviour is removed from vspd with the associated
config option deprecated. Documentation and scripts updated to reflect
the change.
Fee xpub key and last used address index are now wrapped into a struct,
with both fields being set and retrieved together rather than
individually.
The underlying format for storing these values in the database does not
change. The only change is the interface between the database code and
the caller.
Returning a single struct which contains multiple named fields reduces
the chance of a mistake in the calling code, as compared to returning
multiple unnamed values which are all of the same type.
This enables the config to be reused in multiple binaries - eg. the
upcoming vsp admin binary which will be responsible for writing a
default config file for new vspd deployments.
Upcoming changes constitute breaking public API changes to both the
client and types modules, therefore this bumps the version numbers of
both modules and adds local replacements to go.mod files such that the
new versions can be used before they are publicly tagged.
Run tests and linters against a hard-coded set of local submodules
instead of attempting to find submodules dynamically.
While this has the obvious drawback of needing to manually update the
list of submodules, it greatly simplifies the script by removing a bunch
of regexes and string manipulation. This trade-off seems worthwhile
because the list of submodules in this repo will not be something which
changes often.
This change makes the script less brittle because it is hard-coded to
always run against the local code, regardless of any changes to module
versionining or project dependencies.
Loading config and preparing loggers are two separate concepts which
should be handled individually. Nesting one inside the other makes
little sense and complicates reusing the code.
There is no need to declare a dozen different "default..." vars only to
immediately insert them into a default config struct when the struct
itself could just be initialized with the default values instead.
This removes the --configfile option from vspd. It introduced quite a
few weird edge cases (and a fair bit of code to deal with them) but
afaik nobody actually used it. Note that the --homedir option stays, so
it is still possible to run vspd with config in a non-default location
if required.
Checking for --help as an explicit step before parsing any other configs
makes the code more intuitive by removing a convoluted bit of error
handling, which happened to be unnecessarily duplicated in three places.
Moving it to a function in the internal package makes it reusable by
multiple binaries.
This also enables the IgnoreUnknown option to be used whilst parsing for
help, which ensures the presence of --help will always result in the
help message being printed. This fixes a minor inconsistency where the
help message would be printed if the flag was placed before an invalid
config, but placing it after would cause an invalid config error to be
written instead. For example, `vspd --help --fakeflag` vs `vspd
--fakeflag --help`.