Skip to content

GAS price for CreateMultisigAccount is too cheap: 14 mins with 20GAS #2710

@dusmart

Description

@dusmart

The syscall System.Contract.CreateMultisigAccount is based on Sha256 while its price is lower than CryptoLib.Sha256's (1<<10 < 1<<15).

Therefore, a minor DOS can be composed using CreateMultisigAccount syscall.

curl http://seed1t5.neo.org:20332 -d '{ "jsonrpc": "2.0", "id": 1, "method": "invokescript", "params": ["VwIANSUAAAB3AAKIcSMAdwFvABFBajPpCUlvAZ13AW8BJfD///9JQFcCAAwhAswQ0OkpynUs/TQIvt2gZGPi2T/UNeTCuGqJWzeS3uTIAf8DdwFvASMNAAAASm8BnXcBbwEl+P///0PAdwBvAEA="] }'| json_pp

source code: https://github.com/lazynode/Tanya/pull/26/files

I propose that charge CreateMultisigAccount as Neo.Crypto.CheckMultisig does which is dynamic and depends on accnout number.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions