Dsorken
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Week 18 ## Recap Compared to the previous weeks, this week was definitely a lighter week in terms of actual implementation work. Most of this comes from the transition from working on purely Portal Wire communication systems to now implementing the History Network. I wanted to make sure that everything I was going to do was in line with the same ideas that Meldsun had, both to avoid overlap and to create a congruent system. We had a meeting at near the beginning of the week where we decided that I would work on implementing the FINDCONTENT, CONTENT, OFFER and ACCEPT packet logic for the History Network. I spent a good portion of my work this week just planning my approach on how I intended to tackle this. I ended up starting off my implementation with the outbound packet requests, meaning the sending of FINDCONTENT and OFFER and the recieving of CONTENT and ACCEPT responses. I was able to get the design down and implemented the outgoing portion in the HistoryNetwork class. One of the larger struggles had to do with appropriate planning on where I was going to handle the actual packet information processing for the History Network. Where I could either do so all in one place within the HistoryNetwork class, or outside in a new layer meant for such processing. I still haven't quite decided but I hope to sync ideas with Meldsun and maybe see what direction we would both like to go sometime this week. ## Learning My learning this week was somewhat just general network designs, as well as continued reference to the Portal Wire Specifications for working on outbound communication. ### Concepts #### Portal Wire Specifications I mainly focused on the FINDCONTENT, CONTENT, OFFER and ACCEPT packets in the specifications. This was used to ensure that the clients outbound communication followed the appropriate steps. It was also useful in looking ahead to which systems are needed that aren't implemented yet. For the mean time they can then just be abstracted as an interface so that the logic associated with their use can be added. ##### Resources 1. https://github.com/ethereum/portal-network-specs/blob/master/portal-wire-protocol.md 2. https://github.com/ethereum/portal-network-specs/blob/master/portal-wire-test-vectors.md ## Tasks This week had a bit less in regards to implementation work and more so focused on the design and planning of how to fit my FINDCONTENT and OFFER outbound systems into the HistoryNetwork class. In this way I could also potentially save some time down the road when needing to refactor or reorganize any systems I make. After solidifying my idea on how to go about implementation I went ahead and added the HistoryNetwork class implementations for findContent() and offer(). Both of which follow a similar design to the ping() and findNodes() methods that Meldsun had worked on. Additionally, like with the NODES response packet, the CONTENT response packet when containing the sub-type with selector 0x02 for an ENR list also needs to be filtered for the recieving nodes ENR and the responding nodes ENR before being processed. This part is still not totally complete as the HistoryNetwork class design is still partially preliminary, but one such way of doing it would be to keep a copy of the local nodes NodeRecord and the NodeRecord of the node recieving the FINDCONTENT packet, and then just using those values to look through the CONTENT response packet once recieved. Outside of that I also had to add basic database opperations as an interface for the FINDCONTENT packet once it is parsed. This way even though the database still needs to be developed, the general logic can still be implemented when working on content received in the CONTENT response packet. I will likely have to do something similar with a uTP interface for when the content size is too large in the CONTENT packet. ## Week 19 Plan Heading into Week 19 my goals are much the same as this week. Except I am looking to get more done in terms of actual implementation work. I am hoping to continue in maintaining close communication with Meldsun regarding the outbound client packet design for the History Network. This should reduce the need for any refactoring or redesigns and should allow both of our contributions to outbound packet design to work together without any issue. My main goals are: - Continue working on the FINDCONTENT and OFFER outbound packet communication for the History Network - Potentially get into a proper database storage solution to build on the basic interface - Add some additional logic to a layer previous to the HistoryNetwork class if needed for the management and use of the database interface - Start designing the incoming communication method for FINDCONTENT and OFFER packets We have decided on an interface design path where any additional systems that may be needed are to just be abstracted into an interface that can then be built on top of at a later time. This should speed up the general protocol implementation a bit and also prevent us from being restricted by any systems that just need implementation.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully