You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LES Protocol(light ethereum sub-protocol) contains two parts specs and relative implementations: LES server and LES client.
Usually LES server refers to a full ethereum node that can offer additional data services for free or not. Basically both server and client share the same protocol definition like protocol message, auxiliary structure definitions and etc. However most of the internal logic of these two parts are totally different.
For LES client, most logic defined is:
how to retrieve the specified piece of chain data or state data as well as the corresponding proof.
how to manage all connected servers and payment strategy
For LES server, most logic defined is:
how to serve requests from clients.
how to limit requests from clients
how to manage all connected clients and charge strategy
But now in the current implementation, we mix all these parts logic into the same package. It means it's very hard to maintain the code correctly in the long term. So this is a proposal for LES package clean up and refactor.
The approximate structure of les codebase looks like:
Basically I propose to split a few common utilities used by both server and client in the utilities sub-package. All protocol relative message and structures are all moved to protocol sub-package.
All in all, it's the purposal for cleanup current les package for long term maintenance. Need input from internal team members especially @zsfelfoldi .
In the server side, we have two logic modules: flow control and capacity management.
For the flow control, it's a shared package used by client and server, which capacity management is server special. However now a few capacity management relative code is mixed in flow control package.
LES Protocol(light ethereum sub-protocol) contains two parts specs and relative implementations: LES server and LES client.
Usually LES server refers to a full ethereum node that can offer additional data services for free or not. Basically both server and client share the same protocol definition like
protocol message
,auxiliary structure definitions
and etc. However most of the internal logic of these two parts are totally different.For LES client, most logic defined is:
For LES server, most logic defined is:
But now in the current implementation, we mix all these parts logic into the same package. It means it's very hard to maintain the code correctly in the long term. So this is a proposal for LES package clean up and refactor.
The approximate structure of les codebase looks like:
Basically I propose to split a few common utilities used by both server and client in the
utilities
sub-package. All protocol relative message and structures are all moved toprotocol
sub-package.All in all, it's the purposal for cleanup current les package for long term maintenance. Need input from internal team members especially @zsfelfoldi .
utilities
les: create utilities as common package #20509protocol
les: move protocol definition to sub-package #20516checkpoint
les: move the checkpoint oracle into its own package #20508lesserver
andlesclient
The text was updated successfully, but these errors were encountered: