找到约 11 条结果

文章 2024-07-21 zk-insights Weekly

...iciency of DPPs. - ### Designated-Verifier zk-SNARKs Made Easy Propose a construction of strong designated-verifier zk-SNARKs. The construction inspired by designated verifier signatures based on two-party ring signatures does not use encryption and can be applied on any public-verifiable zk-SNARK...

文章 区块链中的数学-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...

文章 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:...

文章 通过 Libra 学习 Protobuf

...接口专门用于实现两者之间的转换. 比如: ``` /// Helper to construct and parse [`proto::storage::GetAccountStateWithProofByStateRootRequest`] /// /// It does so by implementing `IntoProto` and `FromProto`, /// providing `into_proto` and `from_proto`. #[derive(PartialEq, Eq, Clone, Fr...

文章 In-depth Analysis of the TON FunC Console Tool Code: Efficient Data Printing and Formatting

... maintain the correct number of decimal places. * The formatted string is constructed by concatenating the integer part, a decimal point, the zeros, and the fractional part, ensuring a consistent and readable format. Example Usage: ```css console::log(console::pretty_coins(1000000001)); // Out...

文章 move基本数据类型(二)

...an instance of the `IgnoreMe` struct and ignore it. // Even though we constructed the instance, we don't need to unpack it. fun test_vec() { //声明一个具有三个元素的向量 let mut v = vector[10, 20, 30]; //通过push_back方法,添加值为5的元素...

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

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

文章 入门 Sui Move 开发:8. PTB 以及 Sui TS SDK 的使用

...l. --make-move-vec Given n-values of the same type, it constructs a vector. For non objects or an empty vector, the type tag must be specified. --merge-coins Merge N coins into the provided coin. --move-call Make a move call to a function....

文章 Poseidon哈希作为EVM预编译合约的计算成本分析

...添加。 Poseidon 是一种相对较新的哈希函数,基于 [sponge construction](https://keccak.team/files/CSF-0.1.pdf),它使用遵循 [Hades strategy](https://eprint.iacr.org/2019/1107) 构建的置换。 先前的研究 ([Grassi et al. 2021](https://eprint.iacr.org/2019/458.pdf)) 表明...

文章 Deep Dive into the TON Smart Contract Compilation Process: Compiling Func and Tact Languages

...a `TactCompilerConfig` object and the name of the contract. The function constructs a virtual file system using `OverwritableVirtualFileSystem` and configures the build settings. After the compilation is completed, it extracts the compiled BOC (Block of Code) from the virtual file system and ret...

文章 开发一款Substrate应用 - 抛硬币游戏(一)

...dule::Trait for Runtime { type Event = Event; } ``` * 添加模块到`construct_runtime!`宏: ```rust construct_runtime!( pub enum Runtime with Log(InternalLog: DigestItem) where Block = Block, NodeBlock = opaque::Block, UncheckedExtrinsic = UncheckedExtrinsic ...