Skip to content

fix(kms): make the AWS KMS signer support dynamic-fee transactions#792

Open
renatomaia wants to merge 3 commits into
next/2.0from
fix/awsKmsDynamicFeeSigning
Open

fix(kms): make the AWS KMS signer support dynamic-fee transactions#792
renatomaia wants to merge 3 commits into
next/2.0from
fix/awsKmsDynamicFeeSigning

Conversation

@renatomaia

Copy link
Copy Markdown

Problem

The AWS KMS factory is still built with types.NewEIP155Signer(chainId). That signer is legacy-only. Direct geth bindings can create dynamic-fee transactions when GasPrice is nil and the chain has a base fee, which is the normal EIP-1559 path. In that case the KMS code hashes and attaches the signature using the wrong signer family.

Tests

  1. Add an unit test first: fake KMS signs a types.DynamicFeeTx, the transaction is signed with types.LatestSignerForChainID, and sender recovery succeeds.
  2. Add an integration test using LocalStack and skip unless LOCALSTACK_KMS_ENDPOINT is set.

@renatomaia
renatomaia requested review from mpolitzer and vfusco July 21, 2026 20:51
@renatomaia renatomaia self-assigned this Jul 21, 2026
@renatomaia
renatomaia force-pushed the fix/awsKmsDynamicFeeSigning branch 2 times, most recently from c71f0be to 26060af Compare July 22, 2026 11:43
@renatomaia
renatomaia force-pushed the fix/awsKmsDynamicFeeSigning branch from 26060af to e412f81 Compare July 22, 2026 13:04
@mpolitzer

Copy link
Copy Markdown

Old tests needed to fill in the ARN variable with a valid AWS KMS instance to work. That would cost money and expose secrets, so it is disabled by default. But maybe with the localstack setup it could be enabled or refactored, any thoughts on that?

@renatomaia
renatomaia force-pushed the fix/awsKmsDynamicFeeSigning branch from 5c62c67 to c606f7f Compare July 22, 2026 14:56
@renatomaia
renatomaia force-pushed the fix/awsKmsDynamicFeeSigning branch from c606f7f to 9092af5 Compare July 22, 2026 19:58
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.

2 participants