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
In many places we use switches over the three networks we support (mainnet, ropsten, rinkeby). This may be meaningful to move them into a separate interface encapsulating common operations for these networks and created by a factory.
I believe transactions sending and deciding which server to use for it deserve better architecture. Let's examine if concerns are separated correctly and fix it if not.
Make jail.baseJSCode always end with ; somehow. Those ugly hacks adding ; to the end are annoying.
Investigate why we return 0x address in case of a missing value in RPCCall.ParseFromAddress.
ExecutionPolicy should be an interface and an appropriate implementation should be set in construction time, not during execution. Hence less checks for config.UpstreamConfig.Enabled. Generally, all logic regarding RPC requests handling must be incapsulated in small components which complies to a single interface, this shouldn't be handled with if statements for different cases.
preProcessRequest and postProcessRequest should be named appropriately and shouldn't be just hanging functions.
Probably, it should be not StopRPCCallError which callees return but callers should instead detect an error and terminate if it's fatal or something.
Revisit Jail, NodeManager and so on and determine concerns of each.
StatusAPI's TxQueueManager and SendTransaction are only exposed for tests and look like either a design shortcoming or test helpers. Either way, this should be fixed after tests for C bindings are made separate from testing application logic.
TxQueueManager should not know about AccountManager and NodeManager. However, it should be able to send a transaction (after receiving CompleteTransaction() call). Refactor TxQueueManager and TxQueue #338
Bring NetworkId from NodeConfig together with UpstreamConfig as they are tightly coupled and this would decrease chances that they're inconsistent to one another.
Refactor NodeManager's all start and stop methods. Start/Stop logic is overcomplicated with synchronisation and has bad naming.
Think about creating RunningNode field in NodeManager which will eliminate a lot of unneeded checks.
Rename geth/jail/jail_cell.go to geth/jail/cell.go
Get rid of makeSendHandler call in geth/jail/handlers.go. It's post-refactoring byproduct, just use jail.Send instead.
Get rid of ExecutionPolicy.
Rename upstream to remote.
Remove faucet cmd, we now use an original geth node to request ether.
Fix lint notice for NodeManager type name will be used as node.NodeManager by other packages, and that stutters; consider calling this Manager
Subtasks will be added up until there is enough work to start.
TODO: Split this issue over several each taking approximately 1 day.
TODO: Traverse the source for TODOs and FIXMEs for other refactoring notes.
The text was updated successfully, but these errors were encountered:
jail.baseJSCode
always end with;
somehow. Those ugly hacks adding;
to the end are annoying.0x
address in case of a missing value inRPCCall.ParseFromAddress
.config.UpstreamConfig.Enabled
. Generally, all logic regarding RPC requests handling must be incapsulated in small components which complies to a single interface, this shouldn't be handled withif
statements for different cases.preProcessRequest
andpostProcessRequest
should be named appropriately and shouldn't be just hanging functions.StopRPCCallError
which callees return but callers should instead detect an error and terminate if it's fatal or something.StatusAPI
'sTxQueueManager
andSendTransaction
are only exposed for tests and look like either a design shortcoming or test helpers. Either way, this should be fixed after tests for C bindings are made separate from testing application logic.TxQueueManager
should not know aboutAccountManager
andNodeManager
. However, it should be able to send a transaction (after receivingCompleteTransaction()
call). Refactor TxQueueManager and TxQueue #338TxQueue
andTxQueueManager
handlers as after moving it tostatus-go
, their purpose is unknown. Refactor TxQueueManager and TxQueue #338common.QueuedTxID
. Refactor TxQueueManager and TxQueue #338NodeConfig.LogLevel
seems redundant.node.RPCClient
.NetworkId
fromNodeConfig
together withUpstreamConfig
as they are tightly coupled and this would decrease chances that they're inconsistent to one another.NodeManager
's all start and stop methods. Start/Stop logic is overcomplicated with synchronisation and has bad naming.RunningNode
field inNodeManager
which will eliminate a lot of unneeded checks.geth/jail/jail_cell.go
togeth/jail/cell.go
makeSendHandler
call ingeth/jail/handlers.go
. It's post-refactoring byproduct, just usejail.Send
instead.upstream
toremote
.faucet
cmd, we now use an original geth node to request ether.type name will be used as node.NodeManager by other packages, and that stutters; consider calling this Manager
Subtasks will be added up until there is enough work to start.
TODO: Split this issue over several each taking approximately 1 day.
TODO: Traverse the source for TODOs and FIXMEs for other refactoring notes.
The text was updated successfully, but these errors were encountered: