- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
client.crt
和 server.crt
使用哪种格式。{
"client_tls_cert":"client.crt",
"host": "orderer3.com",
"port": 7050,
"server_tls_cert":"server.crt"
}
我想要这样的东西:
"client_tls_cert":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNXRENDQWYrZ0F3SUJBZ0lRYTN2NXYySzBYeUhaMHk1andmS2lyVEFLQmdncWhrak9QUVFEQWpCc01Rc3cKQ1FZRFZRUUdFd0pWVXpFVE1CRUdBMVVFQ0JNS1EyRnNhV1p2Y201cFlURVdNQlFHQTFVRUJ4TU5VMkZ1SUVaeQpZVzVqYVhOamJ6RVVNQklHQTFVRUNoTUxaWGhoYlhCc1pTNWpiMjB4R2pBWUJnTlZCQU1URVhSc2MyTmhMbVY0CllXMXdiR1V1WTI5dE1CNFhEVEU1TVRJeE56RTBNRFF3TUZvWERUSTVNVEl4TkRFME1EUXdNRm93V0RFTE1Ba0cKQTFVRUJoTUNWVk14RXpBUkJnTlZCQWdUQ2tOaGJHbG1iM0p1YVdFeEZqQVVCZ05WQkFjVERWTmhiaUJHY21GdQpZMmx6WTI4eEhEQWFCZ05WQkFNVEUyOXlaR1Z5WlhJdVpYaGhiWEJzWlM1amIyMHdXVEFUQmdjcWhrak9QUUlCCkJnZ3Foa2pPUFFNQkJ3TkNBQVNjNEhVUklQN0tndFJVWXFGbTA1SGtDdFkySnB2R2RsSzNsUGZXR1hEM3JEaTMKMVY4V1YxRWU3RlZjRWF4ZjVYUFBETlpDM0Exb3ZETGxYb3h0WlNaNm80R1dNSUdUTUE0R0ExVWREd0VCL3dRRQpBd0lGb0RBZEJnTlZIU1VFRmpBVUJnZ3JCZ0VGQlFjREFRWUlLd1lCQlFVSEF3SXdEQVlEVlIwVEFRSC9CQUl3CkFEQXJCZ05WSFNNRUpEQWlnQ0Npb1RjcTZMSzJNYnhHazZDdVQ5bmYwSDB1RHdSLytEbFRpQzBHaXRNN3dUQW4KQmdOVkhSRUVJREFlZ2hOdmNtUmxjbVZ5TG1WNFlXMXdiR1V1WTI5dGdnZHZjbVJsY21WeU1Bb0dDQ3FHU000OQpCQU1DQTBjQU1FUUNJSGI0QVN3aUZzbGEySm9xRFlvUmlYeVZ0eUppZVFUbVByR01DMDQ5clVaYkFpQlc4dWhHCk9vY0I1S0N6MlU5ZktxSHYwZ1E0NUhLY1VMTS9ETnZEei9TMmFRPT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=",
我使用的一种方法是在测试环境中重新创建 genesis.block
并从 json 格式复制它的 server.crt
并且它是来自 crypto-config
目录到我的真实环境。但我想要一种更简单、更简单的方法。
client.crt
。最佳答案
可以看到here我想测试自动添加 Raft 节点时创建的一个非常非常古老的脚本。第三个参数(configFunc)应该是“addOSN”。
我不知道它是否仍然有效,但你可以阅读它并理解其中的想法。
addOSN() {
cert=`base64 /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt | sed ':a;N;$!ba;s/\n//g'`
cat config.json | jq '.channel_group.groups.Orderer.values.ConsensusType.value.metadata.consenters += [{"client_tls_cert": "'$cert'", "host": "orderer3.example.com", "port": 7050, "server_tls_cert": "'$cert'"}] ' > modified_config.json
}
channelConfig() {
channel=$1
srcSeq=$2
configFunc=$3
cert=`base64 /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer3.example.com/tls/server.crt | sed ':a;N;$!ba;s/\n//g'`
echo "fetching config block"
CORE_PEER_LOCALMSPID="OrdererMSP"
CORE_PEER_TLS_ROOTCERT_FILE=$ORDERER_CA
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/users/Admin@example.com/msp
peer channel fetch $srcSeq configBlock.pb -o orderer0.example.com:7050 -c "${channel}" --tls --cafile $ORDERER_CA
echo "converting config to JSON"
configtxlator proto_decode --input configBlock.pb --type common.Block | jq '.data.data[0].payload.data.config' > config.json
echo "adding orderer3.example.com as a new consenter"
eval $configFunc
echo "computing the config delta"
configtxlator proto_encode --input config.json --type common.Config --output config.pb
configtxlator proto_encode --input modified_config.json --type common.Config --output modified_config.pb
configtxlator compute_update --channel_id ${channel} --original config.pb --updated modified_config.pb --output orderer3Addition.pb
configtxlator proto_decode --input orderer3Addition.pb --type common.ConfigUpdate | jq . > orderer3Addition.json
echo '{"payload":{"header":{"channel_header":{"channel_id":"'${channel}'", "type":2}},"data":{"config_update":'$(cat orderer3Addition.json)'}}}' | jq . > orderer3AdditionInEnvelope.json
configtxlator proto_encode --input orderer3AdditionInEnvelope.json --type common.Envelope --output orderer3AdditionInEnvelope.pb
peer channel signconfigtx -f orderer3AdditionInEnvelope.pb
peer channel update -f orderer3AdditionInEnvelope.pb -c ${channel} -o orderer0.example.com:7050 --tls --cafile $ORDERER_CA
}
要使用该函数,我的链接中的脚本会运行:
echo "Adding orderer3.example.com to the network"
channelConfig $ORDERER_SYSCHAN_ID 0 addOSN
channelConfig $CHANNEL_NAME 2 addOSN
关于hyperledger-fabric - super 账本结构 : adding one more raft orderer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59376977/
我正在寻找通过 sql 查询对我的 sql 结果进行排序,大概在 order by 子句中使用某种嵌套的 order by/order by 我有以下数据: TERM USER I
我有一个表格,其中包含如下所示的部分数据。我已经在 edition_id 上完成了订购。现在还需要订购 laungauge_id,这取决于 edition_id 的值。 Edition_id 是指报纸
所以我有两个表,Questions 和 Answers,由多对多关系表 QuestionsAnswers 连接。 Questions 有一个排序列,允许我控制它们如何显示给用户,而 Questions
当我们说“高阶”函数时,我怀疑“阶”的真正含义是什么?例如,我有一个嵌入式函数调用: f.g.h 那么它叫“三阶”函数吗? “高阶”函数是静态函数累加的概念吗?然后当我有一个递归函数 f 时,在运行时
在具有多个 order by 子句的 SQL 查询中,它们是否真的在执行期间全部运行? 例子: select * from my_table order by field5, field3, fiel
我跟进 query其中 schema.org 数据库用于查找类的子级数量 - 作为比我的应用程序更简单的数据库。我想按字母顺序连接 child 的名字。查询: prefix schema: pre
正如 nazdrovje 所指出的(参见 here ) Ordering@Ordering 可用于获取列表中每个元素的排名。即使列表包含重复元素,结果也是 n 排列(作为整数 1 到 n 的有序列表,
我有两张 table 。 它们都有日期和 item_id 列。 我正在通过 item_id 加入他们。 结果应按两个日期列一起排序 下面的代码有效,生成正确的结果集... 但是它们仅按第一个表的日期排
尝试掌握 SQL 我想按日期订购,然后在其中按标题订购。 示例: SELECT * FROM tblboek ORDER BY jr_van_uitgave DESC 如何在按年龄的订单中按头衔排序?
我想使用 FIELD 参数对我的 SQL 输出进行排序,但是当我这样做时,它首先吐出我不想要的结果,然后它首先吐出我想要的结果。在结果之上,它首先吐出。如果这有意义的话 ;) 如何先吐出已定义的值,然
我有一个无法破解的排序问题。我这样从我的表中选择: SELECT * FROM 'sidemodules' WHERE name = 'module1' OR name = 'module2' OR
我对 Django oscar 的覆盖模型有疑问。我想为模型添加一个新字段,但是当我这样做时,我遇到了 RuntimeError: Conflicting 'order' models in appl
我有两个表,电影和类别,我想先按CategoryID获得一个排序列表,然后按名称排序。。电影表格有三个列ID、NAME和CategoryID。CATEGORY表有两列ID和NAME。。我尝试了下面这样
In a MySQL query, when using the DISTINCT option, does ORDER BY apply after the duplicates are re
我想创建一个 sql 查询,为 2 个不同的查询一起返回结果。例如,我想要以下形式的结果:产品名称, avg(price), min(price), max(price), avg(order), m
我正在使用行号从存储过程中获取分页结果。 我发现使用动态 case 语句列名称进行排序会减慢速度 - 但如果我对所有内容进行硬编码就可以了。 有没有办法通过不使整个 sql 查询一个字符串并使用 SP
如何在范围搜索中使用Morton Order? 在wiki中,在“使用一维数据结构进行范围搜索”段落中, 它说 "the range being queried (x = 2, ..., 3, y =
我正在使用 sequelize.js,我在使用 order 语句时遇到问题,我想先通过 if id 排序(如果我的 id 在该别名表中),然后再排序.... order = [['alias', 'i
我有一个 php 脚本,它从数据库中提取内容并以某种方式打印它们。数据库有一个名为“order”的列标题,它的 INT 大小为 11。当我从数据库中获取数据时,我试图按数据库中的值“order”对内容
我有一个带有 ORDER BY 子句的 UPDATE 查询。我已将相同的查询复制到具有相同 ORDER BY 子句的 SELECT 中,但得到了不同的结果。 更新查询: UPDATE t_locks
我是一名优秀的程序员,十分优秀!