Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Relay Info: Payments URL && Website Design Improvements #172

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

mroxso
Copy link

@mroxso mroxso commented Nov 12, 2023

This fixes the payments_url in the relay information, so that clients can display a "register to this relay" button (see here: https://github.com/nostr-protocol/nips/blob/master/11.md#pay-to-relay)

It also contains a better designed website for joining. You can see it in action on relay.layer.systems or greensoul.space

mroxso and others added 27 commits April 18, 2023 15:06
* improvement: use appropriate paths for systemd example

* improvement: add a configurable postgres write conn string

This adds a new configurable connection string for postgres writes.

* improvement: document pg connection_write config

* build: upgrade checkout action for github ci

---------

Co-authored-by: Petr Kracik <[email protected]>
Co-authored-by: Kieran <[email protected]>
Co-authored-by: Greg Heartsfield <[email protected]>
* improvement: use appropriate paths for systemd example

* improvement: add a configurable postgres write conn string

This adds a new configurable connection string for postgres writes.

* improvement: document pg connection_write config

* build: upgrade checkout action for github ci

* perf: use standard allocator, limit sqlite mmap to 4GB

This is an experimental change to see if we can reduce memory usage
with large SQLite databases.  If successful, we'll do this again and
further reduce the database mmap size.

This will cause greater use of the page cache, but that is more easily
reclaimed by the kernel, and should reduce memory pressure, as well as
making it clearer how much memory the application is actually using
for connections, subscriptions, etc.

* docs: reformatting

* docs: allow host header prefix matching, required for Damus compatibility

* perf: disable sqlite mmap to reduce memory pressure

* perf: switch to jemalloc allocator

* docs: helpful ubuntu packages for building

* perf: reduce SQLite connection count and idle lifetime

On lightly loaded relays, we free up memory faster by letting idle
connections be reclaimed in 10 seconds instead of the default 10
minutes.  This also sets the minimum to zero connections, instead of
always trying to hold one open.

---------

Co-authored-by: Petr Kracik <[email protected]>
Co-authored-by: Kieran <[email protected]>
Co-authored-by: Greg Heartsfield <[email protected]>
* improvement: use appropriate paths for systemd example

* improvement: add a configurable postgres write conn string

This adds a new configurable connection string for postgres writes.

* improvement: document pg connection_write config

* build: upgrade checkout action for github ci

* perf: use standard allocator, limit sqlite mmap to 4GB

This is an experimental change to see if we can reduce memory usage
with large SQLite databases.  If successful, we'll do this again and
further reduce the database mmap size.

This will cause greater use of the page cache, but that is more easily
reclaimed by the kernel, and should reduce memory pressure, as well as
making it clearer how much memory the application is actually using
for connections, subscriptions, etc.

* docs: reformatting

* docs: allow host header prefix matching, required for Damus compatibility

* perf: disable sqlite mmap to reduce memory pressure

* perf: switch to jemalloc allocator

* docs: helpful ubuntu packages for building

* perf: reduce SQLite connection count and idle lifetime

On lightly loaded relays, we free up memory faster by letting idle
connections be reclaimed in 10 seconds instead of the default 10
minutes.  This also sets the minimum to zero connections, instead of
always trying to hold one open.

---------

Co-authored-by: Petr Kracik <[email protected]>
Co-authored-by: Kieran <[email protected]>
Co-authored-by: Greg Heartsfield <[email protected]>
* docs: typo in `build-essential` package name

* improvement(NIP-42): use 'restricted:' prefix for auth error msgs

* docs: add database maintenance example queries

* feat: allow logging output to file

* feat: roll over logs daily

* refactor: reorder imports

* improvement: default to logging on stdout

* fix: ensure startup SQL runs, even with zero min writers

---------

Co-authored-by: thesimplekid <[email protected]>
Co-authored-by: rorp <[email protected]>
Co-authored-by: Yuval Adam <[email protected]>
Co-authored-by: Jamin M <[email protected]>
Co-authored-by: Greg Heartsfield <[email protected]>
Fork Sync: Update from parent repository
Fork Sync: Update from parent repository
Fork Sync: Update from parent repository
Fork Sync: Update from parent repository
add latest tag to building docker container image for master branch
Fork Sync: Update from parent repository
Fork Sync: Update from parent repository
Fork Sync: Update from parent repository
@mroxso mroxso closed this Nov 12, 2023
@mroxso mroxso reopened this Nov 12, 2023
@mroxso mroxso changed the title Fix: Relay Info: Payments URL Fix: Relay Info: Payments URL && Website Design Improvements Nov 12, 2023
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I think the the webpage design can certainly be improved. I do not think it is a good idea to put in a realize on a CDN. I think it's important for the relay to be as self contained as possible without external dependencies. I believe this is important from a performance prospective as we do not have to relay on any 3rd parties for any aspect of the relay even as simple as styling. However, my main concern is one of privacy where every user visiting the login page has to make a request to this CDN and the other once you've used below.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True and I also thought about that already

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

@thesimplekid
Copy link
Contributor

I think it maybe better to split this into two PRs. One with the fix on the payments_url and then do a separate one for styling. As well as squashing some of these commits for a cleaner history.

@scsibug
Copy link
Owner

scsibug commented Dec 1, 2023

Agreed on splitting & squashing. Splitting out any Github build improvements into a separate PR would be appreciated as well.

@kuba-04 kuba-04 mentioned this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants