-
Notifications
You must be signed in to change notification settings - Fork 1
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
Adapt contract to Ethereum channels #10
Open
iljabvh
wants to merge
13
commits into
dev
Choose a base branch
from
adapt-to-ethereum
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…he verification of Secp256k1 signatures, used by Ethereum accounts
… Secp256k1 signatures, as used in Ethereum L1 accounts. * test(src/test.rs) WIP: Add and rewrite test/s to verify Multichannel functionality. * refactor(Cargo.toml): Add k256 dependency to validate cryptography used for Multichannels.
* feat(Cargo.toml): Add cryptography dev dependencies for testing secp256k1 signatures in tests, update ed25519-dalek crate. * feat(lib/ethsig.rs): Add Signing functionality for Secp256k1 keys. * feat(src/lib.rs): Rewrite contract protocol to allow cross-chain, including most Adjudicator functions. * feat(src/multi.rs): Extend public key enum objects to account for Ethereum addresses. Also extend the verification of signatures to Secp256k1 keypairs. * test(src/test.rs): Modify tests to account for Secp256k1 signatures of channel states.
* refactor(lib.rs/Participant, lib.rs/Params): Extend structs to be compatible with participants and state from Perun Solidity contracts. * refactor(src/multi.rs): Remove second public key, use only one public key for signing states that are transmitted to the Solidity and Soroban contracts. * add(lib/sol.rs): Add translation of Params to Solidity types, introducing alloy_rs types. Calculate channel ID the same way it is done in Solidity. * test(src/test.rs): Adapt tests to rewritten Params struct. * add(Cargo.toml): Add alloy_rs ependencies
…ne in the Solidity contract. * refactor(src/multi.rs): Declare Chain enum with Stellar, Ethereum as integer values (0, 1). * feat(src/sol.rs): Add get_channel_id_cross calculation using ABI encoding and Rust -> Solidity type translation * test(src/test.rs): Substitute get_channel_id calculation with the new get_channel_id_cross calculation. * chore(src/multi.rs): Remove comment.
* refactor(src): Remove cc_pubkey from Participant, because it is not needed - only the stellar_pubkey is needed to verify signatures in Stellar. Only the cc_addr is needed to verify signatures in Ethereum.
… that it is identical to the one in the Ethereum contract. Add ABI encoding of the state object and implement signing and verification of the resulting signature. * test(src): Add tests to use the signature generation and verification of ABI encoded Stellar states, using Secp256k1 cryptography, rendering it compatible to our Ethereum contract and backend.
…drawing, fix chainID conversion, handle Backends field conversion depending on chainID fix(multi.rs): Change as_u8 to as_u64 fix(test.rs): Remove unused imports, sort imports Signed-off-by: Sophia Koehler <[email protected]>
…using only Cross ChannelPubKey. feat(lib): Remove enums in Participant, change iteration through assets, use ChannelPubKeyCross for signature verification & Adjust state conversion to match ethereum types fix(sol): Add backends field to allocation, match types to ethereum contract Signed-off-by: Sophia Koehler <[email protected]>
feat(lib.rs): Handle funding case where one party does not have to fund. Signed-off-by: Sophia Koehler <[email protected]>
sophia1ch
force-pushed
the
adapt-to-ethereum
branch
from
December 4, 2024 15:06
f765104
to
286b9d4
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces Ethereum channels, assets and participants. This allows us to perform atomic swaps betweeen the Stellar and Ethereum blockchain.