Skip to content

Allow multiple attacks per graph and check in network - #122

Merged
carlaKC merged 7 commits into
masterfrom
flexible-format
Oct 8, 2025
Merged

Allow multiple attacks per graph and check in network#122
carlaKC merged 7 commits into
masterfrom
flexible-format

Conversation

@carlaKC

@carlaKC carlaKC commented Oct 2, 2025

Copy link
Copy Markdown
Owner

This PR refactors our expected file structure to allow multiple attacks to run with a single "base" graph. This flexibility allows us to use one "base" graph and run different types of attacks against it, specifying custom attack topologies for each.

This code is a bit verbose, but hopefully cleans up all the different file-switching we were doing in each binary crate to one place. We could get fancy and macro some of it out in future commits.

This PR also checks in a graph so that people have a starting point to write their own attacks. We use git lfs to check in the larger files, which means you have to git lfs pull to be able to get the full file content.

We don't technically have to check in peacetime_traffic.csv (we could just check in reputation summaries), but I've chosen to do so because:

  1. We have to use lfs anyway for attacktime_traffic.csv (to allow sink attacks with different bootstrap durations.
  2. It allows us to re-generate reputations with different reputation parameters.
  3. If somebody wanted to create their own graph, it gives them a more comprehensive example of what's required.

@carlaKC

carlaKC commented Oct 2, 2025

Copy link
Copy Markdown
Owner Author

@elnosh along with regular review, could you test that:

  • You're able to pull this branch (+lfs files) and run the sink attack
  • This format works for your fast jamming attack impl (you should be able to add an attack to the ln_50 graph)

@carlaKC
carlaKC requested a review from elnosh October 2, 2025 14:42

@elnosh elnosh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're able to pull this branch (+lfs files) and run the sink attack

I wasn't able to do this :( Couldn't figure out why but still getting Git LFS is disabled for this repository error when trying to pull

This format works for your fast jamming attack impl

This worked. I defined a base graph and then added extra channels for the specific attack setting up the files in new structure and was able to run the attack fine. Only clunky thing is the duplicated attack_type flag that is now in Cli and NetworkParams which initially caused it to fail bc I had to pass it twice.

Comment thread ln-simln-jamming/src/parsing.rs Outdated
Comment thread ln-simln-jamming/src/parsing.rs Outdated
Comment thread ln-simln-jamming/src/bin/forward_builder.rs
Comment thread ln-simln-jamming/src/bin/forward_builder.rs
Comment thread ln-simln-jamming/src/parsing.rs Outdated
@carlaKC
carlaKC requested a review from elnosh October 7, 2025 13:28
@carlaKC

carlaKC commented Oct 7, 2025

Copy link
Copy Markdown
Owner Author

Seems like we've run into some github-side issues with LFS 💀 I've emailed support but it may only resolve next month (quota cycle for files restarts). For now I think I'll just make a note in the readme that LFS isn't working and link to files in gdrive :| going to leave them checked in because having the hash is useful for me locally.

@carlaKC
carlaKC force-pushed the flexible-format branch 2 times, most recently from b983f23 to 9f3b584 Compare October 7, 2025 18:26

@elnosh elnosh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignorable nits but LGMT - trusting that LFS works

Comment thread ln-simln-jamming/src/parsing.rs
Comment thread ln-simln-jamming/src/main.rs
@carlaKC

carlaKC commented Oct 8, 2025

Copy link
Copy Markdown
Owner Author

Rebased on slow jamming PR.

@carlaKC
carlaKC merged commit e946de7 into master Oct 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants