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

Testnet bridge architecture #254

Merged
merged 38 commits into from
Aug 29, 2024
Merged

Testnet bridge architecture #254

merged 38 commits into from
Aug 29, 2024

Conversation

ekrembal
Copy link
Member

No description provided.

ekrembal and others added 23 commits July 31, 2024 15:46
* Add some musig2 functionalities

* Some changes in general and in MuSig2

* Change musig2 functions

* Add one small test

* Added three more simple tests

* Add test with dummy_tx key_spend

* Add test with dummy_tx script_spend

* Add rpc tests for key_spend and script_spend

* Add wrappers for aggregate_nonces and aggregate_partial_signatures, formatting

* Cargo fmt

* Small change for config file

* Some refactor

* (WIP) Change XOnlyPublicKeys to PublicKeys in config files

* Fix errors from pk-xonlypk change

* More refactor

* Remove code duplication

* More refactor

* Commentation + more refactor

* Trying something

* Removed Cargo.lock + add to .gitignore
Reduces code duplication and isolates the reponsibility to a dedicated function
* WIP

* Fix some errors

* WIP

* Merge ozan/new-architecture-improvments into ekrem/new-architecture-improvments (#218)

* WIP Impl. new endpoints

* WIP Impl. new endpoints

* nits

* Implement move txs partial sig

* WIP db nonce

* Use UTXO instead of PsbtOutpoint

* remove redundant db funcs

---------

Co-authored-by: ozankaymak <92448699+ozankaymak@users.noreply.github.com>
* Change the db file for the new architecture

* Change some UTXOs to OutPoints, add some checks

* WIP Fix inconsistencies

* WIP Impl database wrappers

* Update schema

* Fix some db

* WIP

* nits

* Fix error for a wrapper, add some example db trait impl. and db func.

* nits

* WIP Impl. database functions

---------

Co-authored-by: Ekrem BAL <mail.ekrembal@gmail.com>
* Update config files and impl. some db tests

* WIP Fix checks and tests

* (WIP) Add test for nonce table, fix small errors

* (WIP) Add more tests for nonces table

* (WIP) Add tests for get_pub_nonce

* (WIP) Add test for deposit_utxo

* Change operator new_deposit with new schema

* WIP

* DecodeRow inside the function

* Current tests work

* WIP

* Fix Json issue with UTXODB

* Clean wrapper.rs and formatting

* Add tests for deposit_kickoff_generator_txs table

* Apply review

---------

Co-authored-by: Ekrem BAL <mail.ekrembal@gmail.com>
* WIP

* nits

* Add sig check for withdrawal (#229)

* Add sig check for withdrawal

* Use tx.verify

---------

Co-authored-by: Ekrem BAL <mail.ekrembal@gmail.com>

* Impl operator paying withdrawal

* Merge ozan/withdrawal-endpoint-test into ekrem-new-architecture (#230)

* wip

* WIP: created operators and verifiers

* Add steps for the flow

* Add withdrawal endpoint test,organize configs

* Flaky but ok

* Fix flakiness

* Remove unnecessary serialization

---------

Co-authored-by: lemonpartee <lemonpartey@proton.me>
Co-authored-by: Ekrem BAL <mail.ekrembal@gmail.com>

* Merge ozan/kickoff-root-operations into withdrawal (#231)

* WIP Implement endpoints with db operations and tests

* wip

* WIP

* WIP

* Implement changes

* Apply review changes

* Refactor the binaries

* Rename, refactor

---------

Co-authored-by: Ekrem BAL <mail.ekrembal@gmail.com>

---------

Co-authored-by: Ekrem BAL <mail.ekrembal@gmail.com>
Co-authored-by: lemonpartee <lemonpartey@proton.me>
Co-authored-by: ozankaymak <ozan.kaymak@boun.edu.tr>
* wip

* WIP: created operators and verifiers

* Add steps for the flow

* wip

* Test e2e deposit flow

* Undo unrelated changes

* Fix agg nonces and use same deposit

* Adjust test flow after rebase to withdrawal

* Use create verifiers and operators func

* Works until set_operator_funding_utxo_rpc

* Fix create operators and verifiers

* Fix sig aggregation

* nits

* WIP

* WIP MuSig2VerifyError(BadSignature)

* Debug

* Fix error

* Send move_tx + refactor

---------

Co-authored-by: Ekrem BAL <mail.ekrembal@gmail.com>
Co-authored-by: ozankaymak <ozan.kaymak@boun.edu.tr>
* Introduce dockerized PostgresSQL database compatible with integration tests

* refactor compose
* Save operator take and slash or take sigs

* Operator can find kickoff utxo

* Operator can send kickoff tx onchain

* WIP verifiers and operators should use same db missing

* Fix bugs

* WIP Boths sigs verified but operator_take_tx fails

* WIP MuSig2 fix

* Fix withdrawal happy part test

* nits

* Fix musig test

* Use key aggregator trait

---------

Co-authored-by: ozankaymak <ozan.kaymak@boun.edu.tr>
* workflow: Add all-targets flag to clippy.

* workflow: Add the new build_and_test workflow.

* workflow: Remove all features and move services.

* workflow: Remove old basic workflow.

* workflow: Add cache warm ups for build and test.

* workflow: Add all features flag to build and test.

* workflow: Lower healt-retries to 5.

Co-authored-by: Ceyhun Şen <ceyhuusen@gmail.com>
@ceyhunsen
Copy link
Member

Calling Cargo with --all-features flag causes compilation errors. Also there are still config file parsing errors.

ozankaymak
ozankaymak previously approved these changes Aug 29, 2024
@ozankaymak ozankaymak self-requested a review August 29, 2024 12:12
@ekrembal ekrembal merged commit 7391928 into main Aug 29, 2024
4 checks passed
@ekrembal ekrembal deleted the ekrem/new-architecture branch August 29, 2024 12:14
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.

4 participants