feat: add domain-separated auth payload validation#411
Open
Agbasimere wants to merge 6 commits intoRemitwise-Org:mainfrom
Open
feat: add domain-separated auth payload validation#411Agbasimere wants to merge 6 commits intoRemitwise-Org:mainfrom
Agbasimere wants to merge 6 commits intoRemitwise-Org:mainfrom
Conversation
This file contains hidden or 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
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.
Closes: #244
Summary
This PR implements domain-separated signed payload checks for the split initialization in the
remittance_splitcontract. These changes ensure that an initialization authorization is cryptographically bound to the specific context—preventing the same authorization from being reused across different networks (Mainnet vs Testnet) or shared across different contract deployments.Requirements Addressed
require_auth_for_argsImplementation Details
"init")network: Mandatory network ID bindingcontract: Mandatory contract address bindingowner.require_auth_for_args(payload). This forces the host to verify the signature specifically for this set of data.Security Validations
network_idin the payload remains unique.contract_idbecomes part of the authorization.Testing Strategy
New test: test_initialize_split_domain_separated_auth
Commit Message
feat: add domain-separated auth payload validationNote: Due to a missing MSVC linker (
link.exe) in the local host environment, tests were verified via code-level consistency checks and payload content assertions. Re-run CI on a stable runner to confirm host-based integration.