kadena-io/chainweb-data

Support the new WebAuthn keys/sigs

Closed this issue · 1 comments

EnoF commented

When making transactions using the new WebAuthn keysets those transactions end up in an error when Chainweb Data attempts to parse it. The error indicates that the sig cannot be parsed, which is due to the new interface necessary for WebAuthn based signatures.

For our kadena internal folks, you can navigate to the webauthn-wallet PoC. Follow the README.md instructions and simply register and then buy a cookie.

Here is the error message:

2023-11-23T11:30:03.517Z [Error] [] Couldn't fetch payload batch for chain: 14
2023-11-23T11:30:03.517Z [Error] [] ApiError {apiError_type = OtherError "Decoding error in payloadWithOutputsBatch: Error in $[0].transactions[0][0]: Error in $.sigs[0]: key \"sig\" not found\nHashes: ( \"dprjb8G8OyOiBgQF_uIhLOyRfXQ1KSqwvcwGwr2-60E\" )", apiError_status = Status {statusCode = 200, statusMessage = "OK"}, apiError_body = "[{\"transactions\":[[\"eyJoYXNoIjoiWG1mRFhfZk1IUFhTQ2k0alFQMnlWU01MOUZPLVBYUENLQ1oySTVyR3k2NCIsInNpZ3MiOlt7ImF1dGhlbnRpY2F0b3JEYXRhIjoibDROVFNkWkJjNGN4MDZSMVE0K0hrSFVra29DRFRpMDF2WklLazd6eUNsd2RBQUFBQUE9PSIsInNpZ25hdHVyZSI6Ik1FUUNJSEJsQ2Y1VmhUbjVrVitvQUhPRGJsU0Y1S0JZV3hleUpzbm8wZEVMSGJ3MEFpQVY1aFlQVHFiczYzZTQ1a2VaTVdPRngxd3J5K1JXRFd5R0dYMGJVZUZqK2c9PSIsImNsaWVudERhdGFKU09OIjoiZXlKMGVYQmxJam9pZDJWaVlYVjBhRzR1WjJWMElpd2lZMmhoYkd4bGJtZGxJam9pV0cxbVJGaGZaazFJVUZoVFEyazBhbEZRTW5sV1UwMU1PVVpQTFZCWVVFTkxRMW95U1RWeVIzazJOQ0lzSW05eWFXZHBiaUk2SW1oMGRIQnpPbHd2WEM5M1pXSmhkWFJvYmkxM1lXeHNaWFF0WkdWdGJ5NTJaWEpqWld3dVlYQndJaXdpWVc1a2NtOXBaR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_yi637R48Qw6jT_Vd4vFc\",\"coinbase\":\"eyJnYXMiOjAsInJlc3VsdCI6eyJzdGF0dXMiOiJzdWNjZXNzIiwiZGF0YSI6IldyaXRlIHN1Y2NlZWRlZCJ9LCJyZXFLZXkiOiJJbGxuYTB4YU5HTlFlVll6U1ZwYU5UaE9iamg1UjJOMU9GZGFOVGxFTXpaVlN6Vlpia0ZtVFUxeFgwMGkiLCJsb2dzIjoiVXlHaWl1WnYyVUVDb1ZqZ2ZWWE1vcWlxNFhyNU1BY0VkcEltb3V0NUhjZyIsImV2ZW50cyI6W3sicGFyYW1zIjpbIiIsIms6ZjkwZWY0NjkyN2Y1MDZjNzBiNmE1OGZkMzIyNDUwYTkzNjMxMWRjNmFjOTFmNGVjM2Q4ZWY5NDk2MDhkYmYxZiIsMS4xNTIyNjE1XSwibmFtZSI6IlRSQU5TRkVSIiwibW9kdWxlIjp7Im5hbWVzcGFjZSI6bnVsbCwibmFtZSI6ImNvaW4ifSwibW9kdWxlSGFzaCI6Ik0xZ2FiYWtxa0VpXzFOOGRSS3Q0ejVsRXYxa3VDX254TFRueURDdVpJSzAifV0sIm1ldGFEYXRhIjpudWxsLCJjb250aW51YXRpb24iOm51bGwsInR4SWQiOjEwMDQ5fQ\"}]"}

We've tried to reproduce this issue with @EnoF, but it seems like it only appeared while running CW-D against an intermediate CW-N commit that was never released. CW-D seems to be handling transactions with webauthn sigs fine with the recently released CW-N 2.22, so I'm closing this issue.