Commit Graph

86 Commits

Author SHA1 Message Date
d5e2fcca0f Resolve unused '#[allow(clippy::unnecessary_wraps)]' error supressions 2021-07-24 20:14:26 +02:00
3568fbadcb Changed veloren-server-cli to run in interactive basic mode as default. Removed -b and added -t which enables the tui. 2021-07-14 20:03:16 +01:00
3f8d2f95be Added non-admin moderators and timed bans.
The security model has been updated to reflect this change (for example,
moderators cannot revert a ban by an administrator).  Ban history is
also now recorded in the ban file, and much more information about the
ban is stored (whitelists and administrators also have extra
information).

To support the new information without losing important information,
this commit also introduces a new migration path for editable settings
(both from legacy to the new format, and between versions).  Examples
of how to do this correctly, and migrate to new versions of a settings
file, are in the settings/ subdirectory.

As part of this effort, editable settings have been revamped to
guarantee atomic saves (due to the increased amount of information in
each file), some latent bugs in networking were fixed, and server-cli
has been updated to go through StructOpt for both calls through TUI
and argv, greatly simplifying parsing logic.
2021-05-09 21:19:16 -07:00
af7091182e use a constant for recommended_threads 2021-05-05 14:35:06 +02:00
87cf347377 limit tokio threads to 1/4 of num_cpus
make sure that rayon has at least 2 threads even on 1cpu systems to increase stability
2021-05-04 21:06:11 +02:00
404aca3e20 Fixed cargo test-server. Removed -Z package-features from .cargo/config as it is no longer required 2021-04-15 19:07:46 +01:00
1fbea66a66 * Replaced diesel with rusqlite and refinery
* Added "migration of migrations" to transfer the data from the __diesel_schema_migrations table to the refinery_schema_history table
* Removed all down migrations as refinery does not support down migrations
* Changed all diesel up migrations to refinery naming format
* Added --sql-log-mode parameter to veloren-server-cli to allow SQL tracing and profiling
* Added /disconnect_all_players admin command
* Added disconnectall CLI command
* Fixes for several potential persistence-related race conditions
2021-04-13 22:05:47 +00:00
7afa77a06f move tracing code to own crate 2021-03-30 16:35:36 +02:00
2198fece98 make interactive OPT-OUT isntead so that it's not forgotten when its important. and its more userfriendly for the average user. scripts prob just add a -n or -b 2021-03-26 00:22:46 +01:00
13d79625f2 add keepalive in server-cli so we know it still ticks, ~ all 30s 2021-03-21 19:15:40 +01:00
0f405626e8 create a wrapper around rayon, slowjobpool, that spawns on rayon but drop feed it 2021-03-16 13:31:04 +01:00
87a7d7afd1 Move server-cli commands to separate file, tracy profiling par_join improvements, misc improvements
- remove overwritten logging setting in server-cli
- add server-cli command to load a random area for testing without a client
- make admin add/remove commands modify ingame players instead of needing to reconnect
- add spans to par_join jobs
- added test command that loads up an area of the world
- add tracy-world-server alias
- set debug directives to info for logging
2021-03-13 02:28:59 -05:00
aa2a5a2549 fix tracy 2021-03-11 17:05:17 +01:00
eacb60cfa0 Auth requests are now done async, the register system is fetching it, via a PendingLogin component
The auth server no longer allows the protocol to be specified. we enforce `https` for the auth server, so DO NOT provide a auth url with `https://` but without.
correct is now `auth.veloren.net`
incorrect is: `https://auth.veloren.net`
2021-03-11 17:05:02 +01:00
51cf530877 update dependencies, including removal of some tracy deps as they are get through common/tracy 2021-03-09 20:17:29 +01:00
c0129b0505 Move Specs code to own common_ecs create, put tracy and macros into common_base 2021-03-09 00:54:01 +01:00
13276a6d00 get rid of async_std::channel
switch to `tokio` and `async_channel` crate.
I wanted to do tokio first, but it doesnt feature Sender::close(), thus i included async_channel
Got rid of `futures` and only need `futures_core` and `futures_util`.

Tokio does not support `Stream` and `StreamExt` so for now i need to use `tokio-stream`, i think this will go in `std` in the future

Created `b2b_close_stream_opened_sender_r` as the shutdown procedure does not need a copy of a Sender, it just need to stop it.

Various adjustments, e.g. for `select!` which now requieres a `&mut` for oneshots.

Future things to do:
 - Use some better signalling than oneshot<()> in some cases.
 - Use a Watch for the Prio propergation (impl. it ofc)
 - Use Bounded Channels in order to improve performance
 - adjust tests coding

bring tests to work
2021-02-17 12:38:53 +01:00
88620c804a Initial switch to tokio for network, minimum working example. 2021-02-17 12:37:59 +01:00
92991a92ef adjust fmt and clippy after toolchain upgrade 2020-12-10 14:53:01 +01:00
1df4e8098b Move tracy frame markers to proper locations, add a few spans 2020-11-22 14:22:39 -05:00
69d019e5ac Make fps display and specification more precise 2020-11-11 21:47:22 -05:00
f831df5064 massivly switch clock algorithm.
- before we had a Clock that tried to average multiple ticks and predict the next sleep.
   This system is massivly bugged.
   a) We know exactly how long the busy time took, so we dont need to predict anything in the first place
   b) Preduction was totally unrealistic after a single lag spike
   c) When a very slow tick happens, we dont benefit from 10 fast ticks.
 - Instead we just try to keep the tick time exact what we expect.
   If we can't manage a constant tick time because we are to slow, the systems have to "catch" this via the `dt` anyway.
2020-11-10 18:31:42 +01:00
20c6b171d6 Log where the userdata folder is in binary crates, fix bug where the old
path was logged instead of the new path when renaming invalid settings
2020-10-29 18:30:49 -04:00
7211b6a8ad Fix clippy, minor fmt, add TODO comments 2020-10-10 03:01:30 -04:00
8ad8864b9b Change admins from Vec<String> into Hashset<Uuid>, add commands to server-cli-bin for adding and removing admins 2020-10-10 02:10:32 -04:00
088b0994f9 Group editable server settings into one struct that is stored in the ecs, don't expose DataDir, use Uuid in the whitelist instead of usernames, replace Banlist record tuple with new type with named fields, remove commented code 2020-10-10 02:10:32 -04:00
26dec245fa Put server-cli specific settings in their own structure, serde_derive -> serde 2020-10-10 02:10:32 -04:00
52362cfd08 New userdata folder that holds voxygen settings and logs and server saves and settings, split up server settings file into parts that are persisted back to their files and parts that are read-only, misc fixes 2020-10-10 02:10:32 -04:00
62105d654d Add server-cli option to disable auth 2020-10-10 02:10:32 -04:00
bbff0932e9 Make basic server-cli mode default to not reading input and add interactive option 2020-10-10 02:10:31 -04:00
cdf9d1b059 Implemented graceful shutdown on SIGUSR1 signal. Added shutdown <seconds> TUI command. Added abortshutdown TUI command. Fixed a bug in TUI that caused a panic on quit in basic mode on windows. 2020-10-04 21:24:45 +01:00
06b4d3a489 Added #![deny(clippy::clone_on_ref_ptr)] to all crates and fixed resulting lint errors 2020-09-27 17:25:33 +01:00
8fd5b2358f switching veloren naming scheme, to either one of the following:
`stable-0.7.0 (<hash>-<datetime>)` for release versions.
And
`nightly-<date> (<hash>)` for nightly and master versions

Reason is, many players only give information that they are running `0.x.0` but are not giving us the information which day, or commit they are running. So we should make master builds less confusing.
2020-09-22 11:47:18 +02:00
69bf76e5b5 fix spam due to mio tracing 2020-09-16 10:13:37 +02:00
58e78686d2 Merge branch 'imbris/tracy' into 'master'
Add more tracing instrumentation and tracy support

See merge request veloren/veloren!1359
2020-09-10 05:07:51 +00:00
3897f59848 detect EOL on stdin and no longer try to read commands.
This can be locally tested with CTRL+D on basic mode.
RUST_LOG=trace might help
2020-09-07 16:28:13 +02:00
5b96b0aa93 Use finish_continuous_frame directly 2020-09-06 22:28:14 -04:00
f5fc9d6722 Update tracy crates, reduce overhead of timing, add more misc instrumentation 2020-09-06 22:28:14 -04:00
b892d71c73 Added commands to basic mode 2020-09-03 09:05:15 +02:00
f7951d352b Fix all the problems with the tui 2020-09-03 09:04:42 +02:00
ee89afa76a clean shutdown and do a full frame all 10 ticks. also increase polling time to 100ms and dont poll while drawing but afterwards 2020-09-01 23:03:50 +02:00
6ca4f31a9e move tui in multiple files 2020-09-01 23:03:48 +02:00
848dd32755 Fix lack of scrolling 2020-09-01 23:03:47 +02:00
c80295e10a Fix panic when window is too small 2020-09-01 23:03:45 +02:00
6a344c6eea Fix resize issue 2020-09-01 23:03:43 +02:00
6fc992f027 Fix typo and clippy warnings 2020-09-01 23:03:40 +02:00
d3a2a20d63 Added flags to toggle the tui 2020-09-01 23:03:38 +02:00
47b25b35b1 Make it easier to add commands and added the help command 2020-09-01 23:03:36 +02:00
3d9eee6190 Fix the offsetting problem after using the cli 2020-09-01 23:03:35 +02:00
278d4cc193 Coloring done very badly 2020-09-01 23:03:32 +02:00