
substrate
文章平均质量分 56
yzpyzp
这个作者很懒,什么都没留下…
展开
-
《substrate 快速入门与开发实战》
视频地址:https://www.bilibili.com/video/BV1C4411U7Rvsubstrate的升级过程:编写的runtime代码 -> 编译后 得到runtime的wasm二进制文件 -> 通过链上的治理模块发送升级runtime的消息,将runtime的wasm二进制文件存到链上 -> 链上状态更新对于私有链,只需要超级权限的私钥即可升级对于公有链,需要相关节点进行投票才能升级...原创 2021-12-10 12:12:34 · 777 阅读 · 1 评论 -
web3之PromiEvent
https://learnblockchain.cn/docs/web3.js/callbacks-promises-events.htmlhttps://www.npmjs.com/package/web3-core-promievent原创 2021-08-12 20:55:30 · 303 阅读 · 0 评论 -
web3.js的provider
web3是所有ethereum交互模块的总包。web3.setProvider()参数:Object - myProvider: 有效的服务提供者对象。返回值:Booleanweb3.setProvider()方法用来修改指定模块的底层通讯服务提供者。调用:web3.setProvider(myProvider)web3.eth.setProvider(myProvider)web3.shh.setProvider(myProvider)web3.bzz.setProvid原创 2021-08-12 17:25:06 · 3342 阅读 · 0 评论 -
2021-08-12
sendRawTransaction 与 sendSignedTransaction的区别:sendRawTransaction是web3.js的旧版本的方法,新版本的web3.js已经换成了sendSignedTransaction。https://github.com/ethereum/wiki/wiki/JavaScript-APIhttps://web3js.readthedocs.io/en/v1.2.9/web3-eth.html#sendtransactionhttps://web3j原创 2021-08-12 11:50:46 · 351 阅读 · 0 评论 -
Truffle通过本地私钥部署合约
https://www.trufflesuite.com/docs/truffle/getting-started/running-migrationsTruffle Provider 构造及其解释truffle-privatekey-provider:私钥Web3提供程序-源码truffle环境搭建和应用https://github.com/bZxNetwork/truffle-privatekey-provider...原创 2021-08-11 18:08:46 · 1044 阅读 · 1 评论 -
Truffle在ganache-cli部署合约
准备确保安装好了 Truffle Framework 和 Ganache CLI.$ sudo npm install -g truffle$ sudo npm install -g ganache-cli 开始// SPDX-License-Identifier: MITpragma solidity > 0.4.21;contract Storage { mapping (string => string) private _store; funct原创 2021-08-11 17:31:30 · 7951 阅读 · 1 评论 -
nonce值
每一个账户从同一个节点发起交易时,这个nonce值从0开始计数,发送一笔nonce对应加1。当前面的nonce处理完成之后才会处理后面的nonce。注意这里的前提条件是相同的地址在相同的节点发送交易。以下是nonce使用的几条规则:● 当nonce太小(小于之前已经有交易使用的nonce值),交易会被直接拒绝。● 当nonce太大,交易会一直处于队列之中,这也就是导致我们上面描述的问题的原因;● 当发送一个比较大的nonce值,然后补齐开始nonce到那个值之间的nonce,那么交易依旧可以被执行。原创 2021-08-11 15:23:14 · 804 阅读 · 0 评论 -
MetaMask之部署合约流程
Next按钮://MetaMask/metamask-extension/ui/ducks/send/send.js/** * Signs a transaction or updates a transaction in state if editing. * This method is called when a user clicks the next button in the footer of * the send page, signaling that a transactio原创 2021-08-10 14:51:05 · 983 阅读 · 0 评论 -
truffle migrate 部署合约流程
truffle migrate做了什么///truffle/packages/core/lib/commands/deploy.jsconst migrate = require("./migrate");const command = { command: "deploy", description: "(alias for migrate)", builder: migrate.builder, help: { usage: "truffle deploy原创 2021-08-10 14:16:00 · 648 阅读 · 0 评论 -
deploy.js调用Web3.js接口部署合约流程
分析部署脚本deploy.js是如何调用Web3.js接口进行部署一个合约的://filename: deploy.jsconst Web3 = require('web3');const contractFile = require('./compile');/* -- Define Provider & Variables --*/// Providerconst providerRPC = { development: 'http://localhost:8545原创 2021-08-10 14:15:38 · 651 阅读 · 0 评论 -
使用Truffle 在Moonbeam上部署合约
报错:Error: Expected parameter 'from' not passed to function.EVM/moonbeam_doc/Using with Truffle/TruffleTest/MetaCoin$ truffle migrateCompiling your contracts...===========================> Everything is up to date, there is nothing to compile.Erro原创 2021-08-06 14:46:36 · 5361 阅读 · 0 评论 -
substrate knowledgebase: Substrate Key Concepts - Runtime
Runtime是用于定义区块链行为的业务逻辑。在基于Substrate开发的区块链中,runtime被称为”状态转换函数“;Substrate开发人员在runtime中定义了用于表示区块链的状态的存储项,同时也定义了允许区块链用户对该状态进行更改的函数。为了能够提供无须分叉的升级功能,Substrate采用了可编译成WebAssembly (Wasm)字节码的runtime形式。此外,Substrate定义了runtime必须实现的核心基本类型。Core PrimitivesSubstrate框架对r原创 2021-07-27 10:45:38 · 1941 阅读 · 0 评论 -
Substrate knowledgebase: FRAME
相关内容:https://substrate.dev/docs/en/knowledgebase/runtime/frame原创 2021-07-26 21:02:30 · 112 阅读 · 0 评论 -
Substrate knowledgebase: Pallets
相关内容:https://substrate.dev/docs/en/knowledgebase/runtime/pallets原创 2021-07-26 20:59:08 · 395 阅读 · 0 评论 -
substrate knowledgebase:Mock Runtime Environment
https://substrate.dev/docs/en/knowledgebase/runtime/tests#mock-runtime-environment原创 2021-07-26 20:26:34 · 124 阅读 · 0 评论 -
substrate-how-to-guides:Basic pallet integration
https://substrate.dev/substrate-how-to-guides/docs/basics/basic-pallet-integration原创 2021-07-26 18:24:34 · 167 阅读 · 0 评论 -
Substrate knowledgebase: Benchmarking
What Is Runtime Benchmarking?默认的 Substrate 区块生产系统以一致的时间间隔生产区块。这就是所谓的目标区块时间。鉴于此要求,基于 Substrate 的区块链的每个区块只能执行有限数量的extrinsics。执行外部函数所需的时间可能因计算复杂性、存储复杂性、使用的硬件和许多其他因素而异。我们使用称为weight的通用度量来表示一个区块中可以容纳多少extrinsics。这将在交易权重部分进一步解释。在 Substrate 中,10^12 Weight = 1 Se原创 2021-07-26 15:39:33 · 931 阅读 · 0 评论 -
moonbeam本地节点启动以及简单交互
启动节点有两种方式:(1). Getting Started with Docker(2). Getting Started with the Binary File本文使用第二种方式:Getting Started with the Binary FileSetting Up a NodeGetting Started with the Binary File一、clone Moonbeam 代码仓库git clone -b tutorial-v7 https://github.com/Pu原创 2021-07-20 18:27:58 · 1059 阅读 · 1 评论 -
Substrate Tutorials:crate a pallet :test-pallet
参考:everythingtoolbar.dll”或它的一个依赖项。_教程编写一个 Substrate 模块原创 2021-07-17 15:39:54 · 219 阅读 · 0 评论 -
Substrate Tutorials:Add the Contracts Pallet to a runtime
相关内容https://substrate.dev/docs/en/tutorials/add-contracts-pallet/添加一个 合约 Palletoj代码runtime error_在 Substrate 中为你的 runtime 添加合约模块【Substrate入门】在Runtime中添加第一个Pallet【Substrate入门】在Runtime中添加智能合约模块...原创 2021-07-16 11:26:04 · 504 阅读 · 0 评论 -
Substrate Tutorials:Add a Nicks Pallet to Your Runtime
IntroductionSubstrate Node Template 提供了最小的工作运行时,使用它可以快速开始构建自己的自定义blockchain。节点模板包括多个组件,其中包括一个使用FRAME运行时开发框架构建的运行时 。然而,为了保持最小,它不包括来自 Substrate 的核心 FRAME pallets 集里的大多数模块(称为“pallets”)。即Substrate Node Template节点模板只有少数的pallets本指南将向您展示如何添加 Nicks pallet。您可以原创 2021-07-16 11:19:21 · 585 阅读 · 0 评论 -
NFT json格式
NFT json格式原创 2021-07-09 17:12:01 · 1127 阅读 · 0 评论 -
大数据杀熟
Such a phenomenon where companies use their acquired information of the clients’ preferences and purchasing habits to take advantage of them is called “大数据杀熟.”http://www.szdaily.com/content/2019-03/14/content_21467931.htm“大数据杀熟”背后的伦理审思、治理与启示...原创 2021-07-09 10:06:10 · 207 阅读 · 0 评论 -
RPC简介
初识RPC既然有 HTTP 请求,为什么还要用 RPC 调用?RPC框架(一)RPC简介原创 2021-07-07 17:04:36 · 314 阅读 · 0 评论 -
substrate –base-path 数据存储路径
运行单节点的方式为:cargo run --bin substrate -- --dev -d .sub --execution=NativeElseWasm其中–dev是运行单节点的命令,具体内容请看help-d 是–base-path的简写,用于指定数据跟目录的,请注意若不指定这个目录,会默认把数据放在用户的目录下,linux系的操作系统将会放于~/.local/share/substrate目录下,mac os 位于~/Library/Application Support/substr原创 2021-07-07 14:15:02 · 182 阅读 · 0 评论 -
substrate启动测试节点
例子:节点1:身份证书:minichain.pem节点2:身份证书:minichain-test.pem1.节点2访问节点1需要身份证书,因此先把节点1的身份证书从本地推到节点2:~/桌面/minixTestnet/测试节点$ scp -i "minichain-test.pem" minichain.pem ubuntu@ec2-13-58-78-80.us-east-2.compute.amazonaws.com:/home/ubuntuminichain.pem原创 2021-07-07 14:06:19 · 345 阅读 · 0 评论 -
An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.原因:加载页面时使用的是https协议:https://polkadot.js.org/apps/?rpc=ws://13.213.56.67:9944#/explorer,但是页面中使用的是ws协议与目标节点建立连接,但是https协议加载的页面是不能创建非安全的we原创 2021-07-07 10:22:36 · 5676 阅读 · 0 评论 -
Clang
简介Clang 是一个 C++ 编写、基于 LLVM、发布于 LLVM BSD 许可证下的 C/C++/Objective C/Objective C++ 编译器,其目标(之一)就是超越 GCC。https://clang.llvm.org/https://releases.llvm.org/clang C/C++编译器:https://www.oschina.net/p/clang?hmsr=aladdin1e1简述 LLVM 与 Clang 及其关系...原创 2021-07-07 10:00:51 · 98 阅读 · 0 评论 -
error: failed to run custom build command for `librocksdb-sys v6.17.3`
rust build时报错提示:error: failed to run custom build command for `librocksdb-sys v6.17.3`详细信息:... Compiling ed25519-dalek v1.0.1 Compiling tracing-subscriber v0.2.17 Compiling schnorrkel v0.9.1 Compiling addr2line v0.14.1 Compiling prost-原创 2021-07-07 09:49:43 · 3599 阅读 · 0 评论 -
Substrate 的Prometheus server
Substrate 中的 Prometheus server。Substrate节点启动时的log输出:...2021-07-05 17:26:12 Prometheus server started at 127.0.0.1:9615 2021-07-05 17:26:12 Listening for new connections on 127.0.0.1:9944. ...Prometheus server 的用途?使用Prometheus进行Substrate节点可视化监控原创 2021-07-05 17:55:39 · 125 阅读 · 0 评论 -
Substrate Tutorials:Start a Private Network (multi-node)
https://substrate.dev/docs/en/tutorials/start-a-private-network/原创 2021-06-28 15:25:28 · 3645 阅读 · 0 评论 -
Substrate Tutorials:Create Your First Substrate Chain (single-node)
https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/原创 2021-06-28 15:22:37 · 3034 阅读 · 0 评论 -
substrate学习资料汇总
官方资料:https://substrate.dev/https://substrate.dev/docs/en/knowledgebase/getting-started/https://substrate.dev/en/tutorials网上资料:Substrate学习思路梳理原创 2021-06-28 13:08:03 · 184 阅读 · 0 评论 -
Substrate 基础知识(knowledge base)
https://substrate.dev/docs/en/Getting StartedSubstrate Key ConceptsRuntime DevelopmentPalletsFRAMEMacrosMetadataStorageOriginExecutionEventsErrorsTransaction Fees and WeightsBenchmarkingDebuggingTestsOn-Chain RandomnessUpgradesSmart Cont原创 2021-06-28 13:06:07 · 661 阅读 · 0 评论 -
substrate介绍
官网 https://substrate.dev/ 的介绍:Substrate is a modular framework that enables you to create purpose-built blockchains by composing custom or pre-built components.Substrate是一个模块化框架,它使您能够通过组合自定义或预构建的组件来创建定制的区块链。参考:https://substrate.dev/https://substrate.d原创 2021-06-28 12:08:07 · 1163 阅读 · 0 评论