viperproject / viperproject/VerifiedSCION

Finish `prepareSCMP`

Open
#360 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lowpriority memory-safety partially-verified router
Dominant language
Go
Stars
12
Forks
5
Avg merge
13h 2m
Merged PRs (30d)
4

Description

  • introduce ghost field in *SCION for when some package is manually created vs when it is obtained from decoding from bytes
    • verify fns that come from the go packet layer interfaces for both cases,
      • DecodeFromBytes should set the manuallyBuilt flag to false and should have a postcondition expressing that.
    • identify functions which are called only for one value of 'manuallyCreated' and add it as precondition/simplify the specs of these functions (e.g., SetSrcAddr, GetAddr)
    • Add public getter for this field to use in spec
  • simplify *SCION.Mem() by removing duplicated expressions with lets
  • remove the instance of HeaderMem from Mem(), fold it when needed and remove fractional permissions from the body, pass fractional permission to HeaderMem instead
    • this will allow us to write acc(s) instead of explicit access to all fields

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at prepareSCMP and *SCION.Mem(), then trace DecodeFromBytes, SetSrcAddr, and GetAddr in the Go packet layer. Review how manually-created and decoded SCION values are specified, and confirm the ghost field, preconditions, postconditions, and simplified memory permissions are consistent when the specification is complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.