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

Reflect API changes from Kaia v1.0.1 #14

Closed
blukat29 opened this issue Jul 11, 2024 · 2 comments
Closed

Reflect API changes from Kaia v1.0.1 #14

blukat29 opened this issue Jul 11, 2024 · 2 comments

Comments

@blukat29
Copy link
Contributor

blukat29 commented Jul 11, 2024

@blukat29
Copy link
Contributor Author

blukat29 commented Jul 30, 2024

1. Message signing RPCs

Please replace the RPC descriptions. I want the (...This prevents misuse...) paragraph removed because the EIP explains the rationale. I also want the (...Steps to test...) paragraph removed because it describes regular Ethereum API behavior which we don't have to explain.

  • klay_sign, kaia_sign, eth_sign, personal_sign
    The method calculates an [EIP-191](https://eips.ethereum.org/EIPS/eip-191) signature: sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)))
    
    **NOTE**: In versions earlier than Kaia v1.0.1, the method calculates an [KIP-97](https://kips.kaia.io/KIPs/kip-97) signature: sign(keccak256("\x19Klaytn Signed Message:\n" + len(message) + message)))
    
    The personal_ecRecover and kaia_recoverFromMessage methods can verify the signature.
    
  • personal_ecRecover
    No change
  • klay_recoverFromMessage, kaia_recoverFromMessage
     This method recovers or verifies an ECDSA signature signed by a private key associated with the given address.
     
     The signature has to be signed by the private key that constitutes the account, e.g. "natural" private key of a Legacy account, one of the keys of a WeightedMultisig account.
     
     Both [EIP-191](https://eips.ethereum.org/EIPS/eip-191) and [KIP-97](https://kips.kaia.io/KIPs/kip-97) signatures are accepted.
    
  • klay_signTransaction, kaia_signTransaction, klay_signTransactionAsFeePayer, kaia_signTransactionAsFeePayer, eth_signTransaction
    Remove the paragraph: ...will be failed to baobab/cypress... Step 3: Unlock the account for using in signing

@blukat29
Copy link
Contributor Author

2. Gas price recommending RPCs

Please update the RPC descriptions.

  • klay_gasPriceAt, kaia_gasPriceAt
    Remove the API. It's deleted since v1.11.0 https://github.com/klaytn/klaytn/releases/tag/v1.11.0
  • klay_gasPrice, kaia_gasPrice, eth_gasPrice
    • Description
      Returns a recommended gasPrice for a new transaction.
      
      - Before Magma, returns the fixed UnitPrice
      - After Magma, returns the twice of next baseFee (2*baseFee)
      - After Kaia, returns slightly buffered baseFee plus recommended tip (BaseFee * (1.10 or 1.15) + eth_maxPriorityFeePerGas)
      
    • Result
      Recommended gas price in kei
      
  • klay_maxPriorityFeePerGas, kaia_maxPriorityFeePerGas, eth_maxPriorityFeePerGas
    • Description
      Returns a recommended maxPriorityFeePerGas for a new transaction.
      
      - Before Magma, returns the fixed UnitPrice
      - After Magma, returns zero
      - After Kaia, returns zero if network is uncongested (i.e. next baseFee at its lower bound), otherwise 60% percentile effective tip from previous 20 blocks (under default setting)
      
    • Result
      Recommended maxPriorityFeePerGas in kei
      

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

1 participant