Skip to content

Upgrades: max map + sync-proxy + wss/https#30

Open
astarinmymind wants to merge 15 commits intomasterfrom
v2.1
Open

Upgrades: max map + sync-proxy + wss/https#30
astarinmymind wants to merge 15 commits intomasterfrom
v2.1

Conversation

@astarinmymind
Copy link
Collaborator

@astarinmymind astarinmymind commented Mar 19, 2025

  • package increase-map-count increases the vm.max_map_count from 65530 to 2097152 by default
  • switches from baked in lighthouse to syncing with sync-proxy
  • adds new firewall rules that allows titan's new wss/https ports

@@ -1 +1,2 @@
searcher ALL=(root) NOPASSWD: /usr/bin/toggle No newline at end of file
searcher ALL=(root) NOPASSWD: /usr/bin/toggle
searcher ALL=(root) NOPASSWD: /sbin/sysctl -w vm.max_map_count=2097152 No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

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

why is needed if you expose it as a SSH action below to trigger from the searcher user?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sysctl commands requires sudo privileges (similar to iptables, which is why toggle is also here)

Copy link
Member

@MoeMahhouk MoeMahhouk Mar 21, 2025

Choose a reason for hiding this comment

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

I see, then I agree with what @ilyaluk / @Ruteri suggest to have it natively there instead of an exposed functionality for the searcher to trigger.

Comment on lines 173 to 177
# Sync proxy outbound on port 8552 (TCP only) - IP whitelisted
$IPTABLES -A $CHAIN_ALWAYS_ON_OUT -p tcp -d $FLASHBOTS_NGINX_IP_1 --dport $SYNC_PROXY_PORT \
-m conntrack --ctstate NEW -j ACCEPT
$IPTABLES -A $CHAIN_ALWAYS_ON_OUT -p udp --dport $CL_P2P_PORT \
$IPTABLES -A $CHAIN_ALWAYS_ON_OUT -p tcp -d $FLASHBOTS_NGINX_IP_2 --dport $SYNC_PROXY_PORT \
-m conntrack --ctstate NEW -j ACCEPT
Copy link

Choose a reason for hiding this comment

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

Ah, I see that above we have

$IPTABLES -A OUTPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT

In that case, these outbound rules are not required and can safely be removed


// If command == "increase-map-count", set vm.max_map_count to 2097152
else if (strcmp(command, "increase-map-count") == 0) {
execl("/usr/bin/sudo", "sudo", "/sbin/sysctl", "-w", "vm.max_map_count=2097152", NULL);
Copy link

@ilyaluk ilyaluk Mar 20, 2025

Choose a reason for hiding this comment

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

Can this be made default? E.g. in /etc/sysctl.conf or container init script

Copy link
Member

Choose a reason for hiding this comment

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

this should be on the host directly and not the container because the container is running in rootless mode and would inherit the hosts configuration. (I tested it manually in a dev instance).
So this could be offloaded as part of the guest OS configuration instead

FLASHBOTS_BUILDER_IP="131.153.11.211"
TITAN_BUILDER_IP="52.207.17.217"
RBUILDER_02_IP="3.16.169.173"
FLASHBOTS_NGINX_IP_1="18.220.237.111"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably better to name those FLASHBOTS_CL_ENGINE_EVENTS_1

@astarinmymind astarinmymind requested review from Ruteri and ilyaluk March 21, 2025 20:39
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.

4 participants