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

Generate Secp256k1 #46

Open
stormeye2000 opened this issue Oct 4, 2023 · 3 comments
Open

Generate Secp256k1 #46

stormeye2000 opened this issue Oct 4, 2023 · 3 comments

Comments

@stormeye2000
Copy link

What happened?

A Secp256k1 account is created and funded via the faucet account
A transfer is deployed with the new account as the approver
The deploy result is returned and the approval account is analysed
The signer contains the algorithm type ED25519

What did you expect to happen?

The signer contains the algorithm type Secp256k1

Thanks

Carl Norburn

@davidatwhiletrue
Copy link
Member

hey @stormeye2000 . Can you share a deploy hash for which the SDK behaves as described? Thanks.

@stormeye2000
Copy link
Author

stormeye2000 commented Oct 17, 2023

Hi David, I've attached the deploy for a failed Secp256k1 algorithm check

The feature is here

And the code here

Thanks

deploy-Secp256k1.json.zip

@davidatwhiletrue
Copy link
Member

hi @stormeye2000 , the deploy is correct. I see the problem is in this assert:

    public async Task ThenTheTransferApprovalsSignerContainsTheAlgo(string algo) {
        WriteLine("the transfer approvals signer contains the {0} algo", algo);
        
        var matchingBlockHash =  _contextMap.Get<BlockAdded>(StepConstants.LAST_BLOCK_ADDED);
        
        var block = await GetCasperService().GetBlock(matchingBlockHash.BlockHash);

        Assert.That(block, Is.Not.Null);
        Assert.That(block.Parse().Block.Body.Proposer.PublicKey.KeyAlgorithm.ToString(), Is.EqualTo(algo.ToUpper()));

    }

Last assert is checking public key algorithm for the validator account that proposed the block. It's not the taking a public key from the approvals object of a deploy, which seems to be the target.

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

2 participants