This eliminates superfluous info logs:
Sync data returned a new top block candidate: blah blah
Blink changed the logic here to not early return when we already have
the remote's top block because we may need to sync blinks even if the
top block is the same, but then resulted in lots of the above info
messages whenever we sync up with a new peer (even if the peer has no
new blocks for us).
This restores it to the 5.x behaviour where we only want to display the
info if we don't have the remote's block.
I'm not sure exactly when this is strictly needed -- only the debian
stretch build had a linking failure while sid and buster were fine
without it. There is some SSL code happening in the wallet, though, so
it seems correct to have it.
Many linux systems have a severely outdated zmq.hpp which we don't want;
lokimq includes an up-to-date one (which it loads locally, avoiding the
system one).
Moving generic_signature out of crypto, I deleted some of the helper
macros EPEE_TYPE_IS_SPANNABLE and CRYPTO_MAKE_HASHABLE which let
hex_to_pod behave correctly on generic_signature. Instead opt for
putting signature into the ed25519 primitive.
We static assert that the size is the same as crypto::signature.
- Also fix a subtle bug that use to always default a the wallet's spend
key in update mappings even if no owner or backup owner was specified
for update.
- updating to latest loki-mq (1.0.0 + various linking fixes)
- BUILD_SHARED_LIBS was being handled very strangely; make it a full
option instead (defaulting to off) that a cmake invoker can specify, as
per cmake recommendations.
- travis ci tweaks/changes:
- Add a static bionic build
- Simplify cmake argument code
- Add `--version` invocation for lokid and loki-wallet-cli to test
that the binaries were linked properly.
- always build an embedded sodium statically; if we do it dynamically
and an older system one exists we are going to have trouble.
- don't force epee and blocks to be static; rather they get controlled
by the above BUILD_SHARED_LIBS, just like all the other internal
libraries.
- use some PkgConfig:: imported targets rather than bunch-of-variables.
- Renames generic_key->generic_owner
- Move generic_owner and generic_signature out of crypto.h because they
aren't really crypto items, rather composition of crypto primitives.
generic_owner also needs access to account_public_address, while that is
just 2 public keys, I've decided to include cryptonote_basic.h into
tx_extra.h instead of crypto.h.
- Some generic_owner helper functions were moved into
cryptonote_basic/format_utils as they need to avoid circular
dependencies between cryptonote_core/cryptonote_basic had I included
generic_owner/generic_signature into loki_name_system.h
- Utilise the normal serialize macros since tx_extra.h already includes
the serializing headers.
- Disallow spaces
- Allow underscores for Session/Wallet names
In summary
SESSION or WALLET
Name has to start with a (alphanumeric or underscore), and can have
(alphanumeric, hyphens or underscores) in between and must end with
a (alphanumeric or underscore)
LOKINET
Domain has to start with an alphanumeric, and can have (alphanumeric or
hyphens) in between, the character before the suffix <char>'.loki' must
be alphanumeric followed by the suffix '.loki'
We still pull out the spend public key, in a future coming PR we will
take the entire wallet address as to improve the usability of LNS.
Said PR will also accept subaddresses which should work out of the box
as long as we use the correct secret key of said subaddress to generate
the required signature.
The --regtest/fakechain mode that blink uses no longer generates enough
mining rewards to submit blink registrations under the LRC-6 change
(with HF16 mining rewards ta 0). This commit changes two things:
- fakechain now goes hf7-8-9-...-16 instead of jumping immediately from
hf7 to hf16 at height 2; this ensures that there are *some* mining
rewards (before hf16) that can be used to register SNs and thus get
additional rewards.
- the registration logic is adapted to work with the more blocks needed
under HF16 SN rewards before submitting registrations.
ConnectionID's are loki-mq's (new from quorumnet) way of replying to a
specific connection; replying by pubkey now only works for service
nodes, while sending via ConnectionID is designed to work for any
connections.
The existing code was using the pubkey, which failed to send a reply
from the blink quorum when the initiator was not itself a service node.
I opted for just a enum instead of pulling in mapbox::variant for
simplicity. mapbox::variant saves a few lines of code for easily
capturing the type at assignment, whereas here we have helper functions
for assigning type.