talaia-labs / rust-teos

The Eye of Satoshi - Lightning Watchtower
https://talaia-labs.github.io/talaia.watch/
MIT License
134 stars 63 forks source link

Create a misbehaviour verification tool / site #87

Open sr-gi opened 2 years ago

sr-gi commented 2 years ago

Currently, there is no simple way of verifying that an accountable tower has cheated (i.e. that has not responded to a breach).

However, all the information is in place to do so. It'll be nice to either have a standalone tool / simple website to run this verification.

The user would need to input the corresponding receipts (registration and appointment), the tower identifier, and proof that a dispute transaction was published but no penalty was ever submitted to the chain.

sr-gi commented 1 year ago

Adding this as a Summer Of Bitcoin (SOB) project. If you're considering tackling this but you are not part of SOB, please leave it until SOB is over. After that, feel free to jump in.

Further info: https://www.summerofbitcoin.org/project-ideas-details?recordId=recYp3MeVaI79Jocg

Aankirz commented 1 year ago

Hi @sr-gi 👋, After spending time on what eye of satoshi does and what actually the problem is

Please correct me if I'm wrong (is this is the way the problem can be solved ?),

For Frontend: HTML, CSS, and JavaScript for the user interface React for building a dynamic frontend

Backend: Node.js for server-side JavaScript Express.js for creating RESTful APIs PostgreSQL(relational db) for database storage

Then creating a smart contract on bitcoin, and integrating the application to eye of satoshi.

Can you pls guide me,I'm willing to solve this issue 😊?

Thanks

mariocynicys commented 1 year ago

I think we need to create a web application where users will register, and submit relevant receipts.

Nah, this is a tool that checks whether the tower has made a bad action/no-action or not. Users normally register using their lightning node clients.

Then creating a smart contract on bitcoin, and integrating the application to eye of satoshi.

No bitcoin script involved in this.


When a user registers with a tower the tower promises to cover that user for X amount of time and hands him/her a receipt. A user can then send appointments to the tower for that X amount of time (or until they have no more slots left) and the tower should decrypt & broadcast these appointments/penalty-transactions when a user's channel is breached. If the tower doesn't do so, then the tower has misbehaved.

Given a registration receipt and an appointment receipt a user can prove that the tower had been sent appointment A and was still covered with registration R but DIDN'T send out penalty-transaction P, and thus the channel was breached.

There is currently no easy way to generate such a proof without manual work. In this project, the student should create a tool to do that work.

sr-gi commented 1 year ago

I think we need to create a web application where users will register, and submit relevant receipts.

Nah, this is a tool that checks whether the tower has made a bad action/no-action or not. Users normally register using their lightning node clients.

Then creating a smart contract on bitcoin, and integrating the application to eye of satoshi.

No bitcoin script involved in this.

When a user registers with a tower the tower promises to cover that user for X amount of time and hands him/her a receipt. A user can then send appointments to the tower for that X amount of time (or until they have no more slots left) and the tower should decrypt & broadcast these appointments/penalty-transactions when a user's channel is breached. If the tower doesn't do so, then the tower has misbehaved.

Given a registration receipt and an appointment receipt a user can prove that the tower had been sent appointment A and was still covered with registration R but DIDN'T send out penalty-transaction P, and thus the channel was breached.

There is currently no easy way to generate such a proof without manual work. In this project, the student should create a tool to do that work.

Couldn't have explained it more concisely.

Regarding the tech stack, the tool should be built in rust, with respect to the site, you can design it using the tech stack you feel more comfortable with.

Aankirz commented 1 year ago

I think we need to create a web application where users will register, and submit relevant receipts.

Nah, this is a tool that checks whether the tower has made a bad action/no-action or not. Users normally register using their lightning node clients.

Then creating a smart contract on bitcoin, and integrating the application to eye of satoshi.

No bitcoin script involved in this.

When a user registers with a tower the tower promises to cover that user for X amount of time and hands him/her a receipt. A user can then send appointments to the tower for that X amount of time (or until they have no more slots left) and the tower should decrypt & broadcast these appointments/penalty-transactions when a user's channel is breached. If the tower doesn't do so, then the tower has misbehaved.

Given a registration receipt and an appointment receipt a user can prove that the tower had been sent appointment A and was still covered with registration R but DIDN'T send out penalty-transaction P, and thus the channel was breached.

There is currently no easy way to generate such a proof without manual work. In this project, the student should create a tool to do that work.

Oo got it, I was thinking something else, thanks a lot for the clarity 👍🏻 .

anipaul2 commented 1 year ago

Hello @sr-gi, I am very interested in contributing to this project under the Summer of Bitcoin program. I have read the issue description and I believe I can develop a standalone tool or a simple website to run the verification as described. I would like to inform you that I will be drafting a proposal for this project idea and would appreciate any guidance or additional information you can provide to help me better understand the requirements and scope of the project.

anipaul2 commented 1 year ago

Hi @sr-gi, I hope this message finds you well. I wanted to follow up on my previous comment regarding contributing to the project for verifying misbehaviour. As I mentioned before, I am very interested in contributing to this issue and will be submitting the proposal soon. In the meantime, I would like to work on some minor isssues or bugs related to this project idea. So, it would be really helpful if you point some issues related to it which I can start working now as I already finished the #210 task.

anipaul2 commented 1 year ago

I think we need to create a web application where users will register, and submit relevant receipts.

Nah, this is a tool that checks whether the tower has made a bad action/no-action or not. Users normally register using their lightning node clients.

Then creating a smart contract on bitcoin, and integrating the application to eye of satoshi.

No bitcoin script involved in this. When a user registers with a tower the tower promises to cover that user for X amount of time and hands him/her a receipt. A user can then send appointments to the tower for that X amount of time (or until they have no more slots left) and the tower should decrypt & broadcast these appointments/penalty-transactions when a user's channel is breached. If the tower doesn't do so, then the tower has misbehaved. Given a registration receipt and an appointment receipt a user can prove that the tower had been sent appointment A and was still covered with registration R but DIDN'T send out penalty-transaction P, and thus the channel was breached. There is currently no easy way to generate such a proof without manual work. In this project, the student should create a tool to do that work.

Couldn't have explained it more concisely.

Regarding the tech stack, the tool should be built in rust, with respect to the site, you can design it using the tech stack you feel more comfortable with.

Do we have to build a tool or a site or both? I'm asking because the title is saying any one of them but your comment is pointing to make a tool in rust and a site with respect to it.

sr-gi commented 1 year ago

Hi @sr-gi, I hope this message finds you well. I wanted to follow up on my previous comment regarding contributing to the project for verifying misbehaviour. As I mentioned before, I am very interested in contributing to this issue and will be submitting the proposal soon. In the meantime, I would like to work on some minor isssues or bugs related to this project idea. So, it would be really helpful if you point some issues related to it which I can start working now as I already finished the #210 task.

I don't think there is any open issue especially related to this. Feel free to try to tackle any good-first-issue or just go over the codebase to get more familiar with it.

sr-gi commented 1 year ago

I think we need to create a web application where users will register, and submit relevant receipts.

Nah, this is a tool that checks whether the tower has made a bad action/no-action or not. Users normally register using their lightning node clients.

Then creating a smart contract on bitcoin, and integrating the application to eye of satoshi.

No bitcoin script involved in this. When a user registers with a tower the tower promises to cover that user for X amount of time and hands him/her a receipt. A user can then send appointments to the tower for that X amount of time (or until they have no more slots left) and the tower should decrypt & broadcast these appointments/penalty-transactions when a user's channel is breached. If the tower doesn't do so, then the tower has misbehaved. Given a registration receipt and an appointment receipt a user can prove that the tower had been sent appointment A and was still covered with registration R but DIDN'T send out penalty-transaction P, and thus the channel was breached. There is currently no easy way to generate such a proof without manual work. In this project, the student should create a tool to do that work.

Couldn't have explained it more concisely. Regarding the tech stack, the tool should be built in rust, with respect to the site, you can design it using the tech stack you feel more comfortable with.

Do we have to build a tool or a site or both? I'm asking because the title is saying any one of them but your comment is pointing to make a tool in rust and a site with respect to it.

This issue is older than the SoB project. For it, a tool was enough, but for SoB, both are required (otherwise it won't be much of a project for an entire summer).

anipaul2 commented 1 year ago

Hi @sr-gi, I hope this message finds you well. I wanted to follow up on my previous comment regarding contributing to the project for verifying misbehaviour. As I mentioned before, I am very interested in contributing to this issue and will be submitting the proposal soon. In the meantime, I would like to work on some minor isssues or bugs related to this project idea. So, it would be really helpful if you point some issues related to it which I can start working now as I already finished the #210 task.

I don't think there is any open issue especially related to this. Feel free to try to tackle any good-first-issue or just go over the codebase to get more familiar with it.

I will definitely look into the existing issues and see if there's anything I can contribute to while I prepare my proposal for the main project. If I have any questions or need further clarification, I will not hesitate to reach out. Thanks again for your support and encouragement.

anipaul2 commented 1 year ago

I think we need to create a web application where users will register, and submit relevant receipts.

Nah, this is a tool that checks whether the tower has made a bad action/no-action or not. Users normally register using their lightning node clients.

Then creating a smart contract on bitcoin, and integrating the application to eye of satoshi.

No bitcoin script involved in this. When a user registers with a tower the tower promises to cover that user for X amount of time and hands him/her a receipt. A user can then send appointments to the tower for that X amount of time (or until they have no more slots left) and the tower should decrypt & broadcast these appointments/penalty-transactions when a user's channel is breached. If the tower doesn't do so, then the tower has misbehaved. Given a registration receipt and an appointment receipt a user can prove that the tower had been sent appointment A and was still covered with registration R but DIDN'T send out penalty-transaction P, and thus the channel was breached. There is currently no easy way to generate such a proof without manual work. In this project, the student should create a tool to do that work.

Couldn't have explained it more concisely. Regarding the tech stack, the tool should be built in rust, with respect to the site, you can design it using the tech stack you feel more comfortable with.

Do we have to build a tool or a site or both? I'm asking because the title is saying any one of them but your comment is pointing to make a tool in rust and a site with respect to it.

This issue is older than the SoB project. For it, a tool was enough, but for SoB, both are required (otherwise it won't be much of a project for an entire summer).

Okay. Then, I'll prepare my proposal accordingly. Thanks for the clarification.

anipaul2 commented 1 year ago

Hi @sr-gi , I have completed drafting the proposal for this project idea, and I would greatly appreciate your valuable input and feedback. To facilitate the review process, I have prepared the document in editor mode, allowing for any suggestions or modifications to be made directly. I have submitted the doument in SOB site.

I understand that you have a busy schedule, but if you could spare some time to provide your insights and recommendations, it would be immensely beneficial for me to refine the proposal further. I am eager to incorporate your expertise to ensure that the proposal is in alignment with the project's goals and expectations.

Thank you for your time and consideration. I look forward to receiving your feedback and making the necessary adjustments to the proposal.

anipaul2 commented 1 year ago

Hi @sr-gi, thank you for selecting me to work on this project idea for this summer! I already did all the setup and was also able to load queries and fetch the data. What should I start doing now? Designing the frontend first and keeping the tool off for now or start with making the tool first?

sr-gi commented 1 year ago

It's up to you. I'd do backend then frontend, but that's how I normally work, you may do things differently.

anipaul2 commented 1 year ago

It's up to you. I'd do backend then frontend, nit that's how I normally work, you may do things differently.

Based on your suggestion, I'll start working on the backend first and then move on to the frontend. I'll keep you updated on my progress and reach out if I have any questions or need clarification.