Steem区块链专用网络-缺少发布权限

时间:2018-06-29 06:33:11

标签: blockchain

我正在尝试探索Steem区块链。我正在尝试建立一个私人测试网络。我有initminer帐户。但是,当我尝试提交新帖子时,我会得到失踪的移植机构。

请求发布博客:

  

localhost:4000 / api / v1 / user / postBlog

身体

{   
"postTitle":"myFirstBlog",  
"postBody":"hello this is my first blog",   
"tags":"fristBlock myFrist" 
}

这是请求。以下是响应。

响应:

{
    "error": true,
    "message": "Some error in posting blog",
    "response": {
        "name": "RPCError",
        "jse_shortmsg": "Missing Posting Authority vinay001",
        "jse_info": {
            "code": 3030000,
            "name": "tx_missing_posting_auth",
            "message": "missing required posting authority",
            "stack": [
                {
                    "context": {
                        "level": "error",
                        "file": "transaction_util.hpp",
                        "line": 54,
                        "method": "verify_authority",
                        "hostname": "",
                        "timestamp": "2018-06-28T13:20:04"
                    },
                    "format": "Missing Posting Authority ${id}",
                    "data": {
                        "id": "vinay001",
                        "posting": {
                            "weight_threshold": 1,
                            "account_auths": [],
                            "key_auths": [
                                [
                                    "STM6ZJoPsL2mFdgwCSBZumbkJFMxxejxmZWqFD4qKy7Z3D41u8VrZ",
                                    1
                                ]
                            ]
                        },
                        "active": {
                            "weight_threshold": 1,
                            "account_auths": [],
                            "key_auths": [
                                [
                                    "STM5PXPWrMDhUEuxQJLUEKeuWji1YDLEZWutvyL4w45DPc81RPPyM",
                                    1
                                ]
                            ]
                        },
                        "owner": {
                            "weight_threshold": 1,
                            "account_auths": [],
                            "key_auths": [
                                [
                                    "STM8PMsuU15fwKZ68MUMMU6fTfhnBBFyEgjr7dTgafw329RZ9iqvu",
                                    1
                                ]
                            ]
                        }
                    }
                },
                {
                    "context": {
                        "level": "warn",
                        "file": "transaction_util.hpp",
                        "line": 97,
                        "method": "verify_authority",
                        "hostname": "",
                        "timestamp": "2018-06-28T13:20:04"
                    },
                    "format": "",
                    "data": {
                        "auth_containers": [
                            {
                                "type": "comment_operation",
                                "value": {
                                    "parent_author": "",
                                    "parent_permlink": "fristBlock",
                                    "author": "vinay001",
                                    "permlink": "jacx7iwp3k",
                                    "title": "myFirstBlog",
                                    "body": "hello this is my first blog",
                                    "json_metadata": "{\"tags\":[\"fristBlock\",\"myFrist\"]}"
                                }
                            }
                        ],
                        "sigs": [
                            "STM8486K4JZN61pa6sUgN9cZgLCnZpQrq5b4z23mdvC95wuFK6Dey"
                        ]
                    }
                },
                {
                    "context": {
                        "level": "warn",
                        "file": "transaction.cpp",
                        "line": 195,
                        "method": "verify_authority",
                        "hostname": "",
                        "timestamp": "2018-06-28T13:20:04"
                    },
                    "format": "",
                    "data": {
                        "*this": {
                            "ref_block_num": 60173,
                            "ref_block_prefix": 3336246025,
                            "expiration": "2018-06-28T13:21:03",
                            "operations": [
                                {
                                    "type": "comment_operation",
                                    "value": {
                                        "parent_author": "",
                                        "parent_permlink": "fristBlock",
                                        "author": "vinay001",
                                        "permlink": "jacx7iwp3k",
                                        "title": "myFirstBlog",
                                        "body": "hello this is my first blog",
                                        "json_metadata": "{\"tags\":[\"fristBlock\",\"myFrist\"]}"
                                    }
                                }
                            ],
                            "extensions": [],
                            "signatures": [
                                "2016209a8a48f3ef7d722830a2e4d6c3e969a8c7d2caf68df636a2a51cc1ceec1314a249938913f71875db929444e549f8bcd1aea0fbddd706b3c05a7a65b83893"
                            ]
                        }
                    }
                },
                {
                    "context": {
                        "level": "warn",
                        "file": "database.cpp",
                        "line": 3208,
                        "method": "_apply_transaction",
                        "hostname": "",
                        "timestamp": "2018-06-28T13:20:04"
                    },
                    "format": "",
                    "data": {
                        "trx": {
                            "ref_block_num": 60173,
                            "ref_block_prefix": 3336246025,
                            "expiration": "2018-06-28T13:21:03",
                            "operations": [
                                {
                                    "type": "comment_operation",
                                    "value": {
                                        "parent_author": "",
                                        "parent_permlink": "fristBlock",
                                        "author": "vinay001",
                                        "permlink": "jacx7iwp3k",
                                        "title": "myFirstBlog",
                                        "body": "hello this is my first blog",
                                        "json_metadata": "{\"tags\":[\"fristBlock\",\"myFrist\"]}"
                                    }
                                }
                            ],
                            "extensions": [],
                            "signatures": [
                                "2016209a8a48f3ef7d722830a2e4d6c3e969a8c7d2caf68df636a2a51cc1ceec1314a249938913f71875db929444e549f8bcd1aea0fbddd706b3c05a7a65b83893"
                            ]
                        }
                    }
                },
                {
                    "context": {
                        "level": "warn",
                        "file": "database.cpp",
                        "line": 776,
                        "method": "push_transaction",
                        "hostname": "",
                        "timestamp": "2018-06-28T13:20:04"
                    },
                    "format": "",
                    "data": {
                        "trx": {
                            "ref_block_num": 60173,
                            "ref_block_prefix": 3336246025,
                            "expiration": "2018-06-28T13:21:03",
                            "operations": [
                                {
                                    "type": "comment_operation",
                                    "value": {
                                        "parent_author": "",
                                        "parent_permlink": "fristBlock",
                                        "author": "vinay001",
                                        "permlink": "jacx7iwp3k",
                                        "title": "myFirstBlog",
                                        "body": "hello this is my first blog",
                                        "json_metadata": "{\"tags\":[\"fristBlock\",\"myFrist\"]}"
                                    }
                                }
                            ],
                            "extensions": [],
                            "signatures": [
                                "2016209a8a48f3ef7d722830a2e4d6c3e969a8c7d2caf68df636a2a51cc1ceec1314a249938913f71875db929444e549f8bcd1aea0fbddd706b3c05a7a65b83893"
                            ]
                        }
                    }
                }
            ]
        },
        "message": "Missing Posting Authority vinay001"
    }
}

任何想法,为什么我遇到这个问题。我的帐户initminer具有使用get_account时可以看到的所有密钥。但是,所有键具有相同的值。我不确定谁创建这些密钥,何时创建。我想这些是在区块链启动期间创建的。但是,没有明确提及。任何对此的投入将不胜感激。预先感谢。

1 个答案:

答案 0 :(得分:0)

不知道您是否现在已经解决了这个问题,但是我也遇到了这个问题并找到了解决方法。

问题似乎是您用来将交易广播到您的私有链的客户端仍然使用默认的公共词链id。

我认为这已为官方cli_wallet进行了修补,默认情况下应该可以使用。但是我对此不是100%肯定。

如果您正在使用像dsteem这样的库来像我一样发帖,则必须提供如下所示的chainId:

(启动私有链时,您的chainId已登录到终端中)

const dsteem = require('dsteem');

const client = new dsteem.Client('http://you.server.ip:port', {
  chainId: 'abc.....xyz',
});

const result = client.broadcast.comment(/* data ... */);