Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

Add proper bounce support #378

Merged
merged 21 commits into from
Jan 29, 2018
Merged

Conversation

renatomassaro
Copy link
Member

@renatomassaro renatomassaro commented Jan 19, 2018

Closes #380. Closes #369. Closes #256.

🚧 πŸ‘·β€β™‚οΈ πŸ—οΈ πŸ’₯

  • Remove Net
  • Proper logging among bounced nodes
  • Refactor / clean-up of the Network service
  • Bounce internals
  • Bounce requests and events
  • NetworkHenforcer.Bounce
  • Bounce validation on every request whose bounce is defined by the user
  • Represent bounces as valid connections [1]
  • Solve the implicit bounce issue. Delegated to Add support for implicit bounceΒ #379
  • Bounce data on bootstrap (inventory?)

TODO:

  • Check for cyclic references
  • Support customnetwork_id on ServerPublic.connect_to_server/3

Incidental

  • Removed NetworkFactory πŸŽ‰
  • Renamed destination_id to target_id on Tunnel
  • Added client_nip to HETypes, as well as to_nip conversion method on ClientUtils
  • Added Helix.Client.Renderer system (later on ClientUtils could be moved to Helix.Client)
  • Added TunnelFlow
  • Added assert_bounce macro helper.
  • Redesigned the Loggable API for greater flexibility.
  • Logs when player installs virus (with bounce support). Closes Log when player installs virusΒ #369

[1] - They are, implicitly. AnyMap would call connections_through_node. If server_id is not the Tunnel's gateway_id or target_id, then it always is a bounce. In that case, display connection (link) as bounce from (n-1) to (n+1) of type connection_type.


This change is Reviewable

@sourcelevel-bot
Copy link

Ebert has finished reviewing this Pull Request and has found:

  • 3 possible new issues (including those that may have been commented here).
  • 9 fixed issues! πŸŽ‰

You can see more details about this review at https://ebertapp.io/github/HackerExperience/Helix/pulls/378.

@renatomassaro
Copy link
Member Author

Reviewed 111 of 123 files at r1, 12 of 12 files at r2.
Review status: all files reviewed at latest revision, 5 unresolved discussions.


lib/event/utils.ex, line 7 at r2 (raw file):

  alias Helix.Network.Query.Bounce, as: BounceQuery

  def fetch_bounce(bounce = %Bounce{}),

spec + docs


lib/event/loggable/flow.ex, line 85 at r2 (raw file):

  defined, in which case the event will be pattern-matched against them.
  """
  defmacro log(query, do: block) do

explain better how this works


lib/event/loggable/flow.ex, line 320 at r2 (raw file):

  end

  def get_first_ip(nil, ip),

doc + spec (til the end of the file)


lib/software/websocket/requests/cracker/bruteforce.ex, line 82 at r2 (raw file):

        update_meta(request, %{process: process}, reply: true)

      # REVIEW: Bad format

Review πŸ’β€β™‚οΈ


lib/universe/bank/action/flow/bank_account.ex, line 43 at r2 (raw file):

    meta = %{
      network_id: NetworkQuery.internet().network_id,
      bounce_id: nil

it's not bounce_id. Which means this isn't tested


Comments from Reviewable

@renatomassaro
Copy link
Member Author

Reviewed 4 of 4 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@renatomassaro renatomassaro merged commit f40c095 into HackerExperience:master Jan 29, 2018
@renatomassaro renatomassaro deleted the bounce branch January 29, 2018 06:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant