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

[3.2] Backport of the cleos validate signatures #500

Merged
merged 2 commits into from
Jun 23, 2022

Conversation

ndcgundlach
Copy link
Contributor

@ndcgundlach ndcgundlach commented Jun 22, 2022

EOSIO/eos#9068

This sub-command takes a signed transaction, validates the signatures on it, and outputs a JSON array of the recovered public keys.

cleos validate signatures <json_file_of_transaction>

Example:

./cleos create account -j -d --json-file t eosio kevinh EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
{
  "expiration": "2022-06-23T00:50:08",
  "ref_block_num": 4714,
  "ref_block_prefix": 3530990,
  "max_net_usage_words": 0,
  "max_cpu_usage_ms": 0,
  "delay_sec": 0,
  "context_free_actions": [],
  "actions": [{
      "account": "eosio",
      "name": "newaccount",
      "authorization": [{
          "actor": "eosio",
          "permission": "active"
        }
      ],
      "data": "0000000000ea305500000000b4e9b68201000000010002c0ded2bc1f1305fb0faac5e6c03ee3a1924234985427b6167ca569d13df435cf0100000001000000010002c0ded2bc1f1305fb0faac5e6c03ee3a1924234985427b6167ca569d13df435cf01000000"
    }
  ],
  "transaction_extensions": [],
  "signatures": [
    "SIG_K1_K4ewr6ZLtiWABNKjEhWzXkfgiPdhpF2nKvGz9NKAGaZwtpKdBP6FBXrzKDpuiqEVfh5tZ4GAd4FcFZK4ysMf7NcgtreKfK"
  ],
  "context_free_data": []
}

./cleos validate signatures t
info  2022-06-23T00:49:48.284 cleos     main.cpp:2690                 operator()           ] grabbing chain_id from nodeos
[
  "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"
]

Resolves: #401

@ndcgundlach ndcgundlach added the OCI OCI working this issue... label Jun 22, 2022
@ndcgundlach ndcgundlach self-assigned this Jun 22, 2022
@ndcgundlach ndcgundlach marked this pull request as ready for review June 22, 2022 17:09
@ndcgundlach ndcgundlach merged commit a26c4e9 into main Jun 23, 2022
@ndcgundlach ndcgundlach deleted the backport_add_cleos_validate branch June 23, 2022 14:10
@arhag arhag changed the title Backport of the cleos validate signatures [3.2] Backport of the cleos validate signatures Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI OCI working this issue...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backport: add cleos validate signatures
3 participants