-
Notifications
You must be signed in to change notification settings - Fork 113
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
New Proposal: add meta transaction proposal #165
base: master
Are you sure you want to change the base?
Conversation
Refs. #68. But I don't think it'll work the way it's laid out currently, too many E-chain concepts, too few N3 ones. |
Will update under discussion, we will need to make this standard to provide a few services. |
@dusmart can you please help me update this? |
Actually, there is two big differences between E-letter chain and N3 as far as I'm concerned under the discussion of if ERC-2771 can work on N3.
The first one matters because there is an |
NEP: 23 Title: NEO Meta-Transaction Proposal Author: Jinghui Liao ([email protected]) Type: Standard Status: Draft Created: 2023-10-17 Requires (*optional): NEP-2 Replaces (*optional): ==Abstract== This proposal introduces a standardized format for meta-transactions on the NEO platform, aiming to enhance user experience by making transactions more understandable and transparent. It allows users to sign human-readable, structured data, ensuring both usability and security. ==Motivation== With the increasing complexity of blockchain applications and the evolution of smart contract interactions, there's a clear need for a more user-friendly approach to transaction signing on NEO. The current protocol doesn't provide a standardized way to sign structured, human-readable data, which may lead to confusion and potential misuse. This proposal fills this gap by defining a clear and standardized format for meta-transactions. ==Specification== A meta-transaction consists of structured data with fields like domain, message, nonce, sender, receiver, value, and related data. For signing, this structured data is transformed into a byte representation, which is then signed using the signer's NEO private key. Signature verification is analogous to NEO's current transaction verification methodology. === Definitions ===
=== Byte Representation ===
=== Signing the Transaction === The byte representation is then signed using the signer's NEO private key, utilizing the encryption methods described in NEP-2. The resulting signature is appended to the meta-transaction object.
=== Verifying the Signature === The process for signature verification will be analogous to NEO's current transaction verification methodology. Extract the signature and public key from the meta-transaction object. Use the public key to verify that the signature matches the byte representation of the structured data.
==Rationale== Taking inspiration from Ethereum's EIP-712 and EIP-2771 as well as NEO's encryption methods in NEP-2, this proposal aims to combine best practices from both platforms. The design choices aim to enhance user experience, increase transparency, and ensure security. The structured data format was chosen for its clarity and ease of understanding, and the signing and verification methods are rooted in established cryptographic practices. ==Backwards Compatibility== This proposal introduces a new format but doesn't alter any existing transaction formats on the NEO platform. Thus, it's backward compatible with the current infrastructure. Existing systems and wallets can choose to integrate this new format without any disruption to their ongoing operations. ==Test Cases== Test cases will be crucial to ensure the correct implementation of the meta-transaction format, especially when it comes to signing and verification. These tests should cover various transaction scenarios, signature generations, and validation checks. ==Implementation== Implementations will be based on the defined specification and rationale. They should adhere to the structured data format, signing method, and verification process detailed in the proposal. The implementation will be completed after community consensus on the specification. == Security Considerations ==
|
Personally I do not think it is good for Neo to become another E-chain, and neither do I really love E-chains, but since Neo is testing EVM sidechain, I wrote a naive and unsafe ECrecover in csharp. |
Based on EIP-712, propose neo's standard meta transaction format.
Major difference:
chainId = > networkId,
data = > script.
'''Data Structures''':
**
networkId
: Integer representing the NEO network identifier.**
version
: String representing the version of the meta-transaction format.**
nonce
: Integer, a unique number ensuring each signature is unique.**
from
: String, address of the sender.**
to
: String, address of the receiver.**
value
: Integer, amount being transferred in smallest unit.**
script
: Bytes, script related to the transaction.