seed-labs / seed-emulator

A Python framework for creating emulation of the Internet.
GNU General Public License v3.0
208 stars 78 forks source link

improve Scion implementation to allow for link properties and beacon meta-data #212

Closed Bruol closed 6 months ago

Bruol commented 6 months ago

Overiew:

As part of my Bachelor Thesis on creating a SCION Traffic Simulator with Beacon Meta-data, I made some changes and additions to the scion implementation in seed as well as to some other parts of the seed-emulator. Firstly I added the possibility to specify link properties on CrossConnect(XC) and InternetExchange(IX) links. Secondly I also added the possibility to specify which scion border routers to connect for routing. This allows for more flexibility when connecting different ASes (e.g. several links between different routers of the same two ASes). Thirdly I added the possibility to generate a staticInfoConfig.json file on the control service nodes, so that link properties are included in the beacons as meta data. There are also some other smaller changes that are detailed in the list below.

I tried to adhere to the general style of the codebase and the contribution guidelines. Also I am happy to implement suggestions that would make my code more in line with this project.

Changes and Additions:

  1. Enhanced Link Configuration:

    • Added the ability to specify link properties on xc and ix links.
  2. Extended Connectivity Options:

    • Implemented the option to connect specific Scion border routers instead of being limited to only connecting ASes.
  3. Improved Beacon Information:

    • Included link properties in staticInfoConfig.json on Control Service nodes to ensure their inclusion in the beacons.
  4. Documentation Enhancements:

    • Added a note to both ScionAutonomousSystem and Node classes.
    • Included geolocation data in Node class.
  5. New Service Creation:

    • Created a scion-bwtestclient Service.
  6. Examples and Explanations:

    • Added examples demonstrating and explaining all the new features.

Disclaimer:

Parts of this Code was created with Github Copilot autocompletion enabled

Also Thanks to my two Supervisors François Wirz and Jordi Subirà Nieto who have given me guidance in this project

wonkr commented 6 months ago

Hi @Bruol , Thanks for your contribution. Before merging this pr, please add an evidence (logs) that this changes does not break the existing code by running scion code. (https://github.com/seed-labs/seed-emulator/tree/master/test/scion). And if you are adding a new features, please add test code as well.

amdfxlucas commented 6 months ago

already though about the staticInfoConf as well here: #181

Bruol commented 6 months ago

Hi @Bruol , Thanks for your contribution. Before merging this pr, please add an evidence (logs) that this changes does not break the existing code by running scion code. (https://github.com/seed-labs/seed-emulator/tree/master/test/scion). And if you are adding a new features, please add test code as well.

I tried to run the test cases. And run into some weird errors that I could not make sense of. So I ran the same test cases on the main repo master branch and got the same errors. So I am fairly certain, that these errors do not relate to the code I added.

Because of this I dont think I will be able to provide logs that prove my code does not break the other scion code.

I attached the test output as reference test_result.txt

wonkr commented 6 months ago

@Bruol May I know the spec of your pc? (Platform: amd or arm/ CPU/ Memory)

wonkr commented 6 months ago

I will create a branch for it then run test on my side.

Bruol commented 6 months ago

@Bruol May I know the spec of your pc? (Platform: amd or arm/ CPU/ Memory)

I am running in an x86 vm with intel cpu and 4gb of ram. I realize that this might be too little for the blockchain tests. I also attached lscpu and lsmem output for reference.

cpu_info.txt mem_info.txt

Bruol commented 6 months ago

I will create a branch for it then run test on my side.

Thanks a lot