Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-implementation of Local Resource Conservation in Rust: rust-lrc #36

Open
PurpleTimez opened this issue Jan 6, 2025 · 0 comments
Open

Comments

@PurpleTimez
Copy link

Re-implemented Local Resource Conservation in Rust with all the interfaces and components, new code is slightly unit tested and error handling is more than summary for now: https://github.com/PurpleTimez/rust-lrc

src
├── lib.rs
└── resources
    ├── decaying_average.rs
    ├── interface.rs
    ├── mod.rs
    ├── reputation_tracker.rs
    ├── resource_bucketing.rs
    ├── resource_manager.rs
    └── target_tracker.rs

Understanding that LRC is testing code only and that the interfaces will change heavily with the progress of the protocol. I still have 2 observations so far.

Firstly, should all internal opportunity_cost math be done in f64 or float64, like floating arithmetic can be cumbersome to handle and I'm not sure it has a real impact on reputation-based jamming handling ?

Secondly, all the resolution period and block_time, I think LocalResourceManager internal interface would gain to be defined with a block hash and timestamp, that way the opportunity_cost can be adapted to the real difficulty period ?

I'll see to integrate rust-lrc in the rust-lightning sample to test this further, and I think I still have a branch somewhere trying to add rust-lightning support in sim-ln. I won't have that much time to make progress on that during the coming weeks, though I
don't forget go back to it.

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

No branches or pull requests

1 participant