找到约 11 条结果

文章 Substrate 入门(7) - Substrate的模型设计

...`--execution` : 对于所有的执行采用的方式 * `--execution-block-construction` : 对于打包区块执行的时候采用的方式 * `--execution-import-block`:从文件导入区块执行的时候采用的方式 * `--execution-offchain-worker`:offchain 执行的时候采用的方式...

文章 针对Node.js构建ROP链

...d += p64(0x0) payload += p64(bss+offset+0x30) --- ## 更改后 def construct_execve_cmd(cmds): null_cmd = b'\x00'.join(cmds) null_cmd += b'\x00' * (8 - len(null_cmd) % 8) argv_offsets = [0] + [len(c)+1 for c in cmds[:-1]] # +1 for null 字节 argv_offsets.append(len(cmds[...

文章 Aptos Move 控制流解析:IF、WHILE与LOOP的深入解读

...制循环流程。 ## While, For, and Loop 实操 Move offers three constructs for looping: `while`, `for`, and `loop`. ```rust module 0x42::Demo3 { use std::debug; #[test] fun test_if() { let x = 5; let x2 = 10; if (x == 5) { debug:...

文章 Move中的设计模式(4)——Witness

...:xcoin::X; public fun publish() { // Illegal, X can not be constructed here. coin::publish_coin(X {}); } } ``` 那么如果此时有一个hacker想要抢先注册这个token,那么需要构造模块中的x提前调用`publish_coin`函数,但是由于Move中的...

文章 如何利用限制条款在比特币上实现通用智能合约

... [BIP 0341](https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#constructing-and-spending-taproot-outputs))。 我们将在下文提出一种潜在解决方案,用来在 UTXO 中表示合约的状态和有效转换规则。 ### 链上计算?! 计算应该在区块链上执行...

文章 Dilithium(又名ML-DSA)与菲亚特-沙米尔方法的美妙世界

...anathan, V. (2008, May). Trapdoors for hard lattices and new cryptographic constructions. In **加粗**Proceedings of the fortieth annual ACM symposium on Theory of computing** (pp. 197–206). >- 原文链接: [billatnapier.medium.com/...](https://billatnapier.medium.com/the-wonderful-world-of-d...

文章 sui-move进阶:vec_map

...eys_values(map); ``` #### 从键和值向量构造映射 ```move /// Construct a new `VecMap` from two vectors, one for keys and one for values. /// The key value pairs are associated via their indices in the vectors, e.g. the key at index i /// in `keys` is associated with the value at inde...

文章 零知识证明 - zkEVM源代码分析(EVM Circuit)

...束(减法也转化为加法) ``` let add_words = AddWordsGadget::construct(cb, [a.clone(), b.clone()], c.clone()); ``` 3/ 确定是加法还是减法操作,查看opcode是ADD还是SUB ``` let is_sub = PairSelectGadget::construct( cb, opcode.expr(), OpcodeId::SUB.expr(), ...

文章 区块链中的数学-secp256k1公钥恢复实现

...f (recId == -1) { throw new RuntimeException( "Could not construct a recoverable key. This should never happen."); } ** sig.v = (byte) (recId + ECDSASignature.vBase);** return sig; } ``` 恢复过程根据[公钥恢复原理](https://learnblockchain.cn/arti...

文章 Substrate代码导读:node-template

...类型; * 为runtime的实现各个功能模块的接口,runtime由`construct_runtime`宏生成, ``` impl template::Trait for Runtime { type Event = Event; } ``` * `construct_runtime`宏根据名称(如`TemplateModule`)和所用的模块内的组件(如`templa...

文章 Ordinal NFT实现原理及Bitcoin Regtest测试网Mint教程

...//docs.lightning.engineering/the-lightning-network/taro/taro-protocol) - [constructing-and-spending-taproot-outputs](https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#constructing-and-spending-taproot-outputs) - [tapscript-example-with-tap](https://github.com/bitcoin-core/btcdeb/blob/...