Commit Graph

100 Commits

Author SHA1 Message Date
Jason Rhinelander 5f1bd2f1e4 Drop integration test code.
This code is bitrotting, doesn't compile, and isn't being maintained
anymore.

The integration test suite was an interesting idea, in early Loki days,
but is no longer being maintained and is quite cumbersome to run (for
instance, it is not possible to run it via CI because it depends on
xterm to actually run).  The code to actually run it (in doy-lee's
loki-integration-testing repository) is also a large burden of "janky"
code that isn't worth maintaining.

Remove this from the code; if someone wants to pick it back up in the
future reverting this commit shouldn't be too difficult (though I'd
suggest that a much better approach to integration testing would be to
run different daemons/wallets via rpc commands, as the network-tests do,
rather than trying to feed stdin and parse stdout from running
individual oxends/wallets).
2021-08-19 16:42:15 -03:00
Jason Rhinelander 58cb24b9df Bump required lokinet version to 0.9.5 2021-07-05 23:51:54 -03:00
Jason Rhinelander 3644861971 lokinet/SS minimum proof versions; 9.2.0 version bump
Remove support for old (non-bt) proofs with the 9.2.0 snode revision
block (I'm not 100% sure on what to call this; "snode revision"? "soft
fork"? "spork"?).

Also bumps the working version to 9.2.0; this likely isn't release
ready, but allows for testing of this on testnet.
2021-06-19 15:13:57 -03:00
Jason Rhinelander 7b00cb251b Add snode revision soft forks & drop hard fork voting code
Snode revisions are a secondary version that let us put out a mandatory
update for snodes that isn't a hardfork (and so isn't mandatory for
wallets/exchanges/etc.).

The main point of this is to let us make a 9.2.0 release that includes
new mandatory minimums of future versions of storage server (2.2.0) and
lokinet (0.9.4) to bring upgrades to the network.

This slightly changes the HF7 blocks to 0 (instead of 1) because,
apparently, we weren't properly checking the HF value of the
pre-first-hf genesis block at all before.  (In practice this changes
nothing because genesis blocks are v7 anyway).

This also changes (slightly) how we check for hard forks: now if we skip
some hard forks then we still want to know the height when a hard fork
triggers.  For example, if the hf tables contains {7,14} then we still
need to know that the HF14 block height also is the height that
activates HF9, 10, etc.
2021-06-19 15:13:57 -03:00
Jason Rhinelander 41ba779834 Increase minimum versions for SS/lokinet 2021-06-10 15:32:50 -03:00
Sean Darcy 2f12e84938 Bump versions and minimum versions for uptime proofs 2021-04-22 14:01:56 +10:00
Jason Rhinelander eda03d1590
Merge pull request #1432 from jagerman/ss-updates
Storage server RPC updates
2021-04-18 22:19:13 -03:00
Sean Darcy 8023b59867 rebrand lns -> ons 2021-04-12 10:27:57 +10:00
Jason Rhinelander ce9d0a9c1e Storage server RPC improvements
Improves the oxend<->storage server communications protocol:

- pass storage server HTTPS port as part of the storage server ping
(which already carries the also-required OMQ port) rather than needing
to provide it when starting up oxend.  --storage-server-port is now
obsolete (and ignored, if specified).
- Fix up the internal API to use `storage_https_port` and
`storage_omq_port` rather than `storage_port` and `storage_lmq_port`.
- Redo and the SS ping RPC endpoint so that it is less verbose and more
closely matches the lokinet endpoint; instead of:

    { "version_major": 2, "version_minor": 0, "version_patch": 9, "storage_lmq_port": 22222 }

we now expect:

    { "version": [2,0,9], "https_port": 11111, "omq_port": 22222 }

- Tweaks the (not-yet-released) SS proof key names: "s"->"shp" and "slp"->"sop"
2021-04-08 13:42:33 -03:00
Jason Rhinelander 2fb0dbcaa3 Tweak uptime proof times; reduce times for testnet
This makes uptime proof times network-dependent, and tweaks them a bit.
Also converts the times to type-safe std::chrono types rather than
macros.

Mainnet/testnet/devnet:

- Send the first proof 30s after startup rather than waiting 2 minutes.
- Check for whether we need to send a proof every 30s rather than every
5mins.

Mainnet:

Other times unchanged.

Testnet/devnet:

- Send proofs every 10min instead of 1h, and consider nodes to be down
after 21m instead of 2h5m.

Fakechain:

- Send 5s after startup, check every 5s, and send every 1min.
- Expiry after 2min5s

Also remove the cmake debug option for short proofs since the fakechain
changes above basically incorporate what it did.
2021-03-25 11:46:23 -03:00
Sean 650ea6f4a2
bump HF versions (#1420)
* bump HF versions, schedule testnet HF
2021-03-24 21:17:58 -03:00
Sean Darcy b720e8ace6 Serialize the uptime proof using btencoding 2021-02-09 11:54:00 +11:00
Sean Darcy c0de851d1d Added versions for SS and lokinet to be saved to core, generate_uptime_proof adds them to the proof 2021-02-09 11:52:31 +11:00
Sean Darcy 851f9af707 lokinet revert 2021-01-04 15:21:21 +11:00
Sean Darcy 432dc319a9 executable names changed 2021-01-04 14:19:42 +11:00
Sean Darcy 0396698ee7 initial loki -> oxen pass 2021-01-04 11:09:45 +11:00
Sean Darcy ed5b946c0a quorumnet message for timestamp requests
random sampling of service nodes, call timestamp lmq message

checks timestamp of 5 service nodes, if local time is 30 seconds different from 80% of the nodes tested then warn user

tracks external timesync status and timestamp participation of service nodes

clean up includes

new template struct for participation history, individual types for participation entry

refactor checking participation

update select_randomly, move the testing for variance overflow

version locks, bump to 8.1.5

explicit casting for mac & clang

note to remove after hard fork

timestamp debugging log messages

debugging messages for before timesync - before message sent

logging errord with compiling

print version and change add_command to add_request_command

log if statement test

std::to_string replaced with tools::view_guts for x25519 key

check if my sn is active before sending timestamp requests

logging the failures

checking if statement for success of message

more logging, if guards arn't passing

more logging, successfully tests if service node might be out of sync

more tests before we decide we are out of sync

logging output if sn isn't passing tests

if check_participation fails then disconnect

print timestamp status

remove saving variance from the participation history

reduce MIN_TIME_IN_S_BEFORE_VOTING

reset participation history on recommission

undo reduction in startup time

reduce log levels

Set hardfork time in testnet
2020-12-18 16:05:51 +11:00
Jason Rhinelander 915e6109f6
Bump version to 8.1.0 and set HF16/17 fork times (#1295) 2020-10-01 11:36:25 +10:00
Doyle 8537fb0d4d HF16: Set min lokinet version to 0.8.0 2020-10-01 10:03:06 +10:00
Doyle d859605b11 HF16: Set min storage server version to 2.0.7 2020-09-30 16:21:16 +10:00
Jason Rhinelander b3f3de135d Bump dev version to 8.0.0
(For anyone watching at home: 8.0.x is our testnet version, the first
release meant for mainnet will be 8.1.0).
2020-09-18 19:21:48 -03:00
Jason Rhinelander 3f67de11df network_version_16 += _pulse 2020-09-18 16:39:50 -03:00
Doyle f2e1798b8b Pulse: Allow block time delay by +-30s instead of +-15s 2020-09-18 13:50:06 -03:00
Doyle 31b9fbff91 Pulse: Record pulse participation and issue decommission 2020-09-18 13:50:05 -03:00
Doyle 331f630d24 Pulse: Set required signatures to N-1 for integration tests 2020-08-18 11:59:54 +10:00
Doyle d232e2c2b4 Pulse: Mask values in log in release, wipe memory 2020-08-18 11:59:54 +10:00
Doyle 9fee5af8c2 Pulse: Switch back to standard min validator counts
- Fix bug expecting min validators == min signatures assumption
causing blocks to be included with invalid unreceived signatures.
2020-08-18 11:59:54 +10:00
Doyle 2588a465cb Pulse: Undo debug settings 2020-08-18 11:59:54 +10:00
Doyle c9a15f94d8 Pulse: Unify message receiving data into stage_quorum_data 2020-08-18 11:59:54 +10:00
Doyle c264563f91 Pulse: Add signed block propagation 2020-08-18 11:59:54 +10:00
Doyle b5854a11b0 Pulse: Add rand value reveal stage and gen final random value 2020-08-18 11:59:54 +10:00
Doyle 937a2fd39d Pulse: Add random value hash stage 2020-08-18 11:59:54 +10:00
Doyle 3393b75ae9 Pulse: Split submit and wait step for symmetry 2020-08-18 11:59:54 +10:00
Doyle 55086cad8f Pulse: Convert to event based pulse loop
- Respond to pulse events by submitting to the LokiMQ thread job queue
instead of managing our own queue.
2020-08-18 11:59:53 +10:00
Doyle 738231eb93 Pulse: Incorporate time drift for Pulse blocks 2020-08-18 11:59:53 +10:00
Doyle 62fe4db413 config: Convert DIFFICULTY_BLOCKS_V2 to TARGET_BLOCK_TIME 2020-08-18 11:59:53 +10:00
Doyle a62ff316e3 Pulse: Queue Block Gen code review
- Rename find_named_argument -> find_prefixed_value
- Update get_current_blockchain_height() comment to specify ability to lock
- Update memcmp(address1, address2) to address1 == address2
- Make create_next_miner_block_template call create_miner_block_template
- Update LMQ x25519 keys only when key has changed
- construct_miner_tx: Use C++17 features
- Pulse: Add log category "Pulse"
- Pulse: Check shutdown before blockchain height
- Pulse: Use get_human_readable_timespan
- Pulse: Switch to MINFO, enable with --log-level +pulse:DEBUG
- Pulse: Add height into context
- Pulse: Remove some default switch cases hiding compiler warnings
- SN: Update hardcoded '9' literals to network_version_9_service_nodes
- Core: Use using namespace std::literals
- Miner: Change num_blocks availability to debug
- RPC: Gate test rpc commands to != MAINNET
- Wallet: Store wallet before deinitialization instead of refresh
2020-08-18 11:59:53 +10:00
Doyle ba5f955f87 Pulse: Add relay signed pulse block template pulse round 2020-08-18 11:59:53 +10:00
Doyle 426290c25f pulse: Formalize round times, add msg for dropped msgs 2020-08-18 11:59:53 +10:00
Doyle 2232ecb46b Pulse: Add main block gen/validator handshake synchronizing worker 2020-08-18 11:59:53 +10:00
Doyle 5c2c35c0d6 Pulse: Make create block template have pulse/miner variants 2020-08-18 11:59:53 +10:00
Doyle a6e1f82f7a Pulse: Make active snodes info public, disambiguate next_block_template
- Make active snods info public for Pulse to query the list to allow
  Pulse quorums to be generated outside of the Service Node List.
2020-08-18 11:59:53 +10:00
Doyle 6741e0da11 Pulse: Validate block producer in service node list 2020-08-18 11:59:53 +10:00
Doyle 7b9a468df5 pulse_min_service_nodes: Parameterize with nettype 2020-08-18 11:59:53 +10:00
Doyle 2fec391873 Pulse: Increase minimum service nodes required to 50 2020-08-18 11:59:53 +10:00
Doyle 254e6aa80d Code review
- Remove PoW/Difficulty information for Pulse Block printout
- Use unary + to co-erce char's in ostreams
- Avoid epee::string_tools::pod_to_hex for lokimq equivalent
- Express validator bitmask in terms of PULSE_QUORUM_NUM_VALIDATORS
- Fix bug in generating Pulse Quorum, avoiding the use of the 0th
  service node in pulse_candidates
- Switch to std::any for void * context
2020-08-18 11:59:53 +10:00
Doyle 7883c875e0 Pulse: Support rounds changing the leader/validators in blocks
- Previously we generated quorums based off the previous quorum. To
  incorporate the round, we can no longer pre-compute the quorum.
  Instead it must be calculated when the block arrives, just before the
  Service Node List is changed.
- Add tests to check round changing works
2020-08-18 11:59:53 +10:00
Doyle 80552293a3 blockchain: set verification failed in subsystem, check validator bit masks 2020-08-18 11:59:53 +10:00
Doyle a1c658d814 Pulse: Verify incoming pulse blocks 2020-08-18 11:59:53 +10:00
Doyle ae29ecb335 Code review, keep nonce, remove HF_VERSION..
- Keep none for blocks
- Remove HF_VERSION_PULSE and prefer network_version_16 for big features
  - Keep HF_VERSION_... for smaller feature flags
- Add operator< for pulse_sort_key
- Avoid erase() in validators gen loop for pulse
2020-08-18 11:59:53 +10:00