diff --git a/frontend-wasm/src/miden_abi/stdlib/crypto/hashes.rs b/frontend-wasm/src/miden_abi/stdlib/crypto/hashes.rs index 960844a1b..1f1f7fcc7 100644 --- a/frontend-wasm/src/miden_abi/stdlib/crypto/hashes.rs +++ b/frontend-wasm/src/miden_abi/stdlib/crypto/hashes.rs @@ -28,6 +28,6 @@ pub(crate) fn signatures() -> ModuleFunctionTypeMap { [Felt, Felt, Felt, Felt, Felt, Felt, Felt, Felt], ), ); - m.insert("miden:prelude/std_crypto_hashes", crypto); + m.insert("std::crypto_hashes", crypto); m } diff --git a/hir/src/asm/import.rs b/hir/src/asm/import.rs index 1152ac3b7..73026155e 100644 --- a/hir/src/asm/import.rs +++ b/hir/src/asm/import.rs @@ -35,10 +35,7 @@ impl ModuleImportInfo { let module_id = id.module; match self.modules.entry(module_id) { Entry::Vacant(entry) => { - let alias = match module_id.as_str().rsplit_once("::") { - None => module_id.as_symbol(), - Some((_, alias)) => Symbol::intern(alias), - }; + let alias = module_id_alias(module_id); let span = module_id.span(); let alias_id = if self.aliases.contains_key(&alias) { // The alias is already used by another module, we must @@ -69,7 +66,8 @@ impl ModuleImportInfo { self.functions.entry(alias_id).or_default().insert(id); } Entry::Occupied(_) => { - let alias = self.aliases[&module_id]; + let module_id_alias = module_id_alias(module_id); + let alias = self.aliases[&module_id_alias]; let functions = self.functions.entry(alias).or_default(); functions.insert(id); } @@ -137,6 +135,13 @@ impl ModuleImportInfo { } } +fn module_id_alias(module_id: Ident) -> Symbol { + match module_id.as_str().rsplit_once("::") { + None => module_id.as_symbol(), + Some((_, alias)) => Symbol::intern(alias), + } +} + /// This represents an import statement in Miden Assembly #[derive(Debug, Copy, Clone, Spanned)] pub struct MasmImport { diff --git a/tests/integration/expected/abi_transform_stdlib_blake3_hash.hir b/tests/integration/expected/abi_transform_stdlib_blake3_hash.hir index fff614a03..0e61ff76a 100644 --- a/tests/integration/expected/abi_transform_stdlib_blake3_hash.hir +++ b/tests/integration/expected/abi_transform_stdlib_blake3_hash.hir @@ -29,11 +29,11 @@ (block 2 (param v12 i32) - (param v251 i32) - (param v252 i32) - (param v253 i32) - (param v254 i32) - (param v258 felt) + (param v275 i32) + (param v276 i32) + (param v277 i32) + (param v278 i32) + (param v282 felt) (let (v13 i32) (const.i32 64)) (let (v14 i1) (neq v12 v13)) (let (v15 i32) (cast v14)) @@ -43,26 +43,26 @@ (block 3) (block 4 - (let (v255 i32) (const.i32 8)) - (let (v256 i32) (add.wrapping v251 v255)) - (let (v257 i32) (add.wrapping v256 v12)) - (let (v259 u32) (cast v257)) - (let (v260 (ptr felt)) (inttoptr v259)) - (store v260 v258) - (let (v261 i32) (const.i32 8)) - (let (v262 i32) (add.wrapping v12 v261)) - (br (block 2 v262 v251 v252 v253 v254 v258))) + (let (v279 i32) (const.i32 8)) + (let (v280 i32) (add.wrapping v275 v279)) + (let (v281 i32) (add.wrapping v280 v12)) + (let (v283 u32) (cast v281)) + (let (v284 (ptr felt)) (inttoptr v283)) + (store v284 v282) + (let (v285 i32) (const.i32 8)) + (let (v286 i32) (add.wrapping v12 v285)) + (br (block 2 v286 v275 v276 v277 v278 v282))) (block 5 (let (v17 i32) (const.i32 0)) - (br (block 6 v17 v251 v252 v253 v254))) + (br (block 6 v17 v275 v276 v277 v278))) (block 6 (param v18 i32) - (param v233 i32) - (param v234 i32) - (param v235 i32) - (param v239 i32) + (param v257 i32) + (param v258 i32) + (param v259 i32) + (param v263 i32) (let (v19 i32) (const.i32 64)) (let (v20 i1) (neq v18 v19)) (let (v21 i32) (cast v20)) @@ -72,35 +72,35 @@ (block 7) (block 8 - (let (v236 i32) (const.i32 8)) - (let (v237 i32) (add.wrapping v233 v236)) - (let (v238 i32) (add.wrapping v237 v18)) - (let (v240 u32) (cast v239)) - (let (v241 (ptr u32)) (inttoptr v240)) - (let (v242 u32) (load v241)) - (let (v243 i64) (zext v242)) - (let (v244 felt) (cast v243)) - (let (v245 u32) (cast v238)) - (let (v246 (ptr felt)) (inttoptr v245)) - (store v246 v244) - (let (v247 i32) (const.i32 8)) - (let (v248 i32) (add.wrapping v18 v247)) - (let (v249 i32) (const.i32 4)) - (let (v250 i32) (add.wrapping v239 v249)) - (br (block 6 v248 v233 v234 v235 v250))) + (let (v260 i32) (const.i32 8)) + (let (v261 i32) (add.wrapping v257 v260)) + (let (v262 i32) (add.wrapping v261 v18)) + (let (v264 u32) (cast v263)) + (let (v265 (ptr u32)) (inttoptr v264)) + (let (v266 u32) (load v265)) + (let (v267 i64) (zext v266)) + (let (v268 felt) (cast v267)) + (let (v269 u32) (cast v262)) + (let (v270 (ptr felt)) (inttoptr v269)) + (store v270 v268) + (let (v271 i32) (const.i32 8)) + (let (v272 i32) (add.wrapping v18 v271)) + (let (v273 i32) (const.i32 4)) + (let (v274 i32) (add.wrapping v263 v273)) + (br (block 6 v272 v257 v258 v259 v274))) (block 9 (let (v23 i32) (const.i32 0)) (let (v24 i64) (const.i64 0)) (let (v25 felt) (cast v24)) - (br (block 10 v23 v233 v234 v235 v25))) + (br (block 10 v23 v257 v258 v259 v25))) (block 10 (param v26 i32) - (param v178 i32) - (param v179 i32) - (param v182 i32) - (param v228 felt) + (param v202 i32) + (param v203 i32) + (param v206 i32) + (param v252 felt) (let (v27 i32) (const.i32 64)) (let (v28 i1) (neq v26 v27)) (let (v29 i32) (cast v28)) @@ -110,75 +110,75 @@ (block 11) (block 12 - (let (v225 i32) (const.i32 72)) - (let (v226 i32) (add.wrapping v178 v225)) - (let (v227 i32) (add.wrapping v226 v26)) - (let (v229 u32) (cast v227)) - (let (v230 (ptr felt)) (inttoptr v229)) - (store v230 v228) - (let (v231 i32) (const.i32 8)) - (let (v232 i32) (add.wrapping v26 v231)) - (br (block 10 v232 v178 v179 v182 v228))) + (let (v249 i32) (const.i32 72)) + (let (v250 i32) (add.wrapping v202 v249)) + (let (v251 i32) (add.wrapping v250 v26)) + (let (v253 u32) (cast v251)) + (let (v254 (ptr felt)) (inttoptr v253)) + (store v254 v252) + (let (v255 i32) (const.i32 8)) + (let (v256 i32) (add.wrapping v26 v255)) + (br (block 10 v256 v202 v203 v206 v252))) (block 13 (let (v31 i32) (const.i32 0)) - (br (block 15 v31 v178 v179 v182))) + (br (block 15 v31 v202 v203 v206))) (block 14 - (let (v183 u32) (cast v142)) - (let (v184 u32) (add.checked v183 392)) - (let (v185 (ptr i64)) (inttoptr v184)) - (let (v186 i64) (load v185)) - (let (v187 u32) (cast v180)) - (let (v188 (ptr i64)) (inttoptr v187)) - (store v188 v186) - (let (v189 i32) (const.i32 24)) - (let (v190 i32) (add.wrapping v180 v189)) - (let (v191 i32) (const.i32 392)) - (let (v192 i32) (add.wrapping v142 v191)) - (let (v193 i32) (const.i32 24)) - (let (v194 i32) (add.wrapping v192 v193)) - (let (v195 u32) (cast v194)) - (let (v196 (ptr i64)) (inttoptr v195)) - (let (v197 i64) (load v196)) - (let (v198 u32) (cast v190)) - (let (v199 (ptr i64)) (inttoptr v198)) - (store v199 v197) - (let (v200 i32) (const.i32 16)) - (let (v201 i32) (add.wrapping v180 v200)) - (let (v202 i32) (const.i32 392)) - (let (v203 i32) (add.wrapping v142 v202)) - (let (v204 i32) (const.i32 16)) - (let (v205 i32) (add.wrapping v203 v204)) - (let (v206 u32) (cast v205)) - (let (v207 (ptr i64)) (inttoptr v206)) - (let (v208 i64) (load v207)) - (let (v209 u32) (cast v201)) - (let (v210 (ptr i64)) (inttoptr v209)) - (store v210 v208) - (let (v211 i32) (const.i32 8)) - (let (v212 i32) (add.wrapping v180 v211)) - (let (v213 i32) (const.i32 392)) - (let (v214 i32) (add.wrapping v142 v213)) - (let (v215 i32) (const.i32 8)) - (let (v216 i32) (add.wrapping v214 v215)) - (let (v217 u32) (cast v216)) - (let (v218 (ptr i64)) (inttoptr v217)) - (let (v219 i64) (load v218)) - (let (v220 u32) (cast v212)) - (let (v221 (ptr i64)) (inttoptr v220)) - (store v221 v219) - (let (v222 i32) (const.i32 432)) - (let (v223 i32) (add.wrapping v142 v222)) - (let (v224 (ptr i32)) (global.symbol #__stack_pointer)) - (store v224 v223) + (let (v207 u32) (cast v166)) + (let (v208 u32) (add.checked v207 392)) + (let (v209 (ptr i64)) (inttoptr v208)) + (let (v210 i64) (load v209)) + (let (v211 u32) (cast v204)) + (let (v212 (ptr i64)) (inttoptr v211)) + (store v212 v210) + (let (v213 i32) (const.i32 24)) + (let (v214 i32) (add.wrapping v204 v213)) + (let (v215 i32) (const.i32 392)) + (let (v216 i32) (add.wrapping v166 v215)) + (let (v217 i32) (const.i32 24)) + (let (v218 i32) (add.wrapping v216 v217)) + (let (v219 u32) (cast v218)) + (let (v220 (ptr i64)) (inttoptr v219)) + (let (v221 i64) (load v220)) + (let (v222 u32) (cast v214)) + (let (v223 (ptr i64)) (inttoptr v222)) + (store v223 v221) + (let (v224 i32) (const.i32 16)) + (let (v225 i32) (add.wrapping v204 v224)) + (let (v226 i32) (const.i32 392)) + (let (v227 i32) (add.wrapping v166 v226)) + (let (v228 i32) (const.i32 16)) + (let (v229 i32) (add.wrapping v227 v228)) + (let (v230 u32) (cast v229)) + (let (v231 (ptr i64)) (inttoptr v230)) + (let (v232 i64) (load v231)) + (let (v233 u32) (cast v225)) + (let (v234 (ptr i64)) (inttoptr v233)) + (store v234 v232) + (let (v235 i32) (const.i32 8)) + (let (v236 i32) (add.wrapping v204 v235)) + (let (v237 i32) (const.i32 392)) + (let (v238 i32) (add.wrapping v166 v237)) + (let (v239 i32) (const.i32 8)) + (let (v240 i32) (add.wrapping v238 v239)) + (let (v241 u32) (cast v240)) + (let (v242 (ptr i64)) (inttoptr v241)) + (let (v243 i64) (load v242)) + (let (v244 u32) (cast v236)) + (let (v245 (ptr i64)) (inttoptr v244)) + (store v245 v243) + (let (v246 i32) (const.i32 432)) + (let (v247 i32) (add.wrapping v166 v246)) + (let (v248 (ptr i32)) (global.symbol #__stack_pointer)) + (store v248 v247) (ret)) (block 15 (param v32 i32) (param v37 i32) - (param v166 i32) - (param v181 i32) + (param v190 i32) + (param v205 i32) (let (v33 i32) (const.i32 64)) (let (v34 i1) (neq v32 v33)) (let (v35 i32) (cast v34)) @@ -188,22 +188,22 @@ (block 16) (block 17 - (let (v163 i32) (const.i32 72)) - (let (v164 i32) (add.wrapping v37 v163)) - (let (v165 i32) (add.wrapping v164 v32)) - (let (v167 u32) (cast v166)) - (let (v168 (ptr u32)) (inttoptr v167)) - (let (v169 u32) (load v168)) - (let (v170 i64) (zext v169)) - (let (v171 felt) (cast v170)) - (let (v172 u32) (cast v165)) - (let (v173 (ptr felt)) (inttoptr v172)) - (store v173 v171) - (let (v174 i32) (const.i32 8)) - (let (v175 i32) (add.wrapping v32 v174)) - (let (v176 i32) (const.i32 4)) - (let (v177 i32) (add.wrapping v166 v176)) - (br (block 15 v175 v37 v177 v181))) + (let (v187 i32) (const.i32 72)) + (let (v188 i32) (add.wrapping v37 v187)) + (let (v189 i32) (add.wrapping v188 v32)) + (let (v191 u32) (cast v190)) + (let (v192 (ptr u32)) (inttoptr v191)) + (let (v193 u32) (load v192)) + (let (v194 i64) (zext v193)) + (let (v195 felt) (cast v194)) + (let (v196 u32) (cast v189)) + (let (v197 (ptr felt)) (inttoptr v196)) + (store v197 v195) + (let (v198 i32) (const.i32 8)) + (let (v199 i32) (add.wrapping v32 v198)) + (let (v200 i32) (const.i32 4)) + (let (v201 i32) (add.wrapping v190 v200)) + (br (block 15 v199 v37 v201 v205))) (block 18 (let (v38 u32) (cast v37)) @@ -272,83 +272,107 @@ (let (v101 felt) (load v100)) (let (v102 i32) (const.i32 136)) (let (v103 i32) (add.wrapping v37 v102)) - (call (#std::crypto_hashes #blake3_hash_2to1) v41 v45 v49 v53 v57 v61 v65 v69 v73 v77 v81 v85 v89 v93 v97 v101 v103) - (let (v104 i32) (const.i32 264)) - (let (v105 i32) (add.wrapping v37 v104)) - (let (v106 i32) (const.i32 136)) - (let (v107 i32) (add.wrapping v37 v106)) - (let (v108 i32) (const.i32 128)) - (let (v109 u32) (cast v105)) - (let (v110 (ptr u8)) (inttoptr v109)) - (let (v111 u32) (cast v107)) - (let (v112 (ptr u8)) (inttoptr v111)) - (memcpy v112 v110 v108) - (let (v113 i32) (const.i32 416)) - (let (v114 i32) (add.wrapping v37 v113)) - (let (v115 i64) (const.i64 0)) - (let (v116 u32) (cast v114)) - (let (v117 (ptr i64)) (inttoptr v116)) - (store v117 v115) - (let (v118 i32) (const.i32 408)) - (let (v119 i32) (add.wrapping v37 v118)) - (let (v120 i64) (const.i64 0)) - (let (v121 u32) (cast v119)) - (let (v122 (ptr i64)) (inttoptr v121)) - (store v122 v120) - (let (v123 i32) (const.i32 392)) - (let (v124 i32) (add.wrapping v37 v123)) - (let (v125 i32) (const.i32 8)) - (let (v126 i32) (add.wrapping v124 v125)) - (let (v127 i64) (const.i64 0)) - (let (v128 u32) (cast v126)) - (let (v129 (ptr i64)) (inttoptr v128)) - (store v129 v127) - (let (v130 i64) (const.i64 0)) - (let (v131 u32) (cast v37)) - (let (v132 u32) (add.checked v131 392)) - (let (v133 (ptr i64)) (inttoptr v132)) - (store v133 v130) - (let (v134 i32) (const.i32 264)) - (let (v135 i32) (add.wrapping v37 v134)) - (let (v136 i32) (const.i32 0)) - (br (block 19 v136 v37 v135 v181))) + (let [(v104 felt) (v105 felt) (v106 felt) (v107 felt) (v108 felt) (v109 felt) (v110 felt) (v111 felt)] (call (#std::crypto_hashes #blake3_hash_2to1) v41 v45 v49 v53 v57 v61 v65 v69 v73 v77 v81 v85 v89 v93 v97 v101)) + (let (v112 u32) (cast v103)) + (let (v113 (ptr felt)) (inttoptr v112)) + (store v113 v104) + (let (v114 u32) (add.checked v112 8)) + (let (v115 (ptr felt)) (inttoptr v114)) + (store v115 v105) + (let (v116 u32) (add.checked v112 16)) + (let (v117 (ptr felt)) (inttoptr v116)) + (store v117 v106) + (let (v118 u32) (add.checked v112 24)) + (let (v119 (ptr felt)) (inttoptr v118)) + (store v119 v107) + (let (v120 u32) (add.checked v112 32)) + (let (v121 (ptr felt)) (inttoptr v120)) + (store v121 v108) + (let (v122 u32) (add.checked v112 40)) + (let (v123 (ptr felt)) (inttoptr v122)) + (store v123 v109) + (let (v124 u32) (add.checked v112 48)) + (let (v125 (ptr felt)) (inttoptr v124)) + (store v125 v110) + (let (v126 u32) (add.checked v112 56)) + (let (v127 (ptr felt)) (inttoptr v126)) + (store v127 v111) + (let (v128 i32) (const.i32 264)) + (let (v129 i32) (add.wrapping v37 v128)) + (let (v130 i32) (const.i32 136)) + (let (v131 i32) (add.wrapping v37 v130)) + (let (v132 i32) (const.i32 128)) + (let (v133 u32) (cast v129)) + (let (v134 (ptr u8)) (inttoptr v133)) + (let (v135 u32) (cast v131)) + (let (v136 (ptr u8)) (inttoptr v135)) + (memcpy v136 v134 v132) + (let (v137 i32) (const.i32 416)) + (let (v138 i32) (add.wrapping v37 v137)) + (let (v139 i64) (const.i64 0)) + (let (v140 u32) (cast v138)) + (let (v141 (ptr i64)) (inttoptr v140)) + (store v141 v139) + (let (v142 i32) (const.i32 408)) + (let (v143 i32) (add.wrapping v37 v142)) + (let (v144 i64) (const.i64 0)) + (let (v145 u32) (cast v143)) + (let (v146 (ptr i64)) (inttoptr v145)) + (store v146 v144) + (let (v147 i32) (const.i32 392)) + (let (v148 i32) (add.wrapping v37 v147)) + (let (v149 i32) (const.i32 8)) + (let (v150 i32) (add.wrapping v148 v149)) + (let (v151 i64) (const.i64 0)) + (let (v152 u32) (cast v150)) + (let (v153 (ptr i64)) (inttoptr v152)) + (store v153 v151) + (let (v154 i64) (const.i64 0)) + (let (v155 u32) (cast v37)) + (let (v156 u32) (add.checked v155 392)) + (let (v157 (ptr i64)) (inttoptr v156)) + (store v157 v154) + (let (v158 i32) (const.i32 264)) + (let (v159 i32) (add.wrapping v37 v158)) + (let (v160 i32) (const.i32 0)) + (br (block 19 v160 v37 v159 v205))) (block 19 - (param v137 i32) - (param v142 i32) - (param v143 i32) - (param v180 i32) - (let (v138 i32) (const.i32 32)) - (let (v139 i1) (eq v137 v138)) - (let (v140 i32) (cast v139)) - (let (v141 i1) (neq v140 0)) - (condbr v141 (block 14) (block 21))) + (param v161 i32) + (param v166 i32) + (param v167 i32) + (param v204 i32) + (let (v162 i32) (const.i32 32)) + (let (v163 i1) (eq v161 v162)) + (let (v164 i32) (cast v163)) + (let (v165 i1) (neq v164 0)) + (condbr v165 (block 14) (block 21))) (block 20) (block 21 - (let (v144 u32) (cast v143)) - (let (v145 (ptr felt)) (inttoptr v144)) - (let (v146 felt) (load v145)) - (let (v147 i64) (cast v146)) - (let (v148 u32) (cast v142)) - (let (v149 u32) (add.checked v148 424)) - (let (v150 (ptr i64)) (inttoptr v149)) - (store v150 v147) - (let (v151 i32) (const.i32 392)) - (let (v152 i32) (add.wrapping v142 v151)) - (let (v153 i32) (add.wrapping v152 v137)) - (let (v154 i32) (const.i32 4)) - (let (v155 i32) (const.i32 424)) - (let (v156 i32) (add.wrapping v142 v155)) - (let (v157 i32) (const.i32 4)) - (let (v158 i32) (const.i32 1048620)) - (call #core::slice::::copy_from_slice v153 v154 v156 v157 v158) - (let (v159 i32) (const.i32 4)) - (let (v160 i32) (add.wrapping v137 v159)) - (let (v161 i32) (const.i32 8)) - (let (v162 i32) (add.wrapping v143 v161)) - (br (block 19 v160 v142 v162 v180))) + (let (v168 u32) (cast v167)) + (let (v169 (ptr felt)) (inttoptr v168)) + (let (v170 felt) (load v169)) + (let (v171 i64) (cast v170)) + (let (v172 u32) (cast v166)) + (let (v173 u32) (add.checked v172 424)) + (let (v174 (ptr i64)) (inttoptr v173)) + (store v174 v171) + (let (v175 i32) (const.i32 392)) + (let (v176 i32) (add.wrapping v166 v175)) + (let (v177 i32) (add.wrapping v176 v161)) + (let (v178 i32) (const.i32 4)) + (let (v179 i32) (const.i32 424)) + (let (v180 i32) (add.wrapping v166 v179)) + (let (v181 i32) (const.i32 4)) + (let (v182 i32) (const.i32 1048620)) + (call #core::slice::::copy_from_slice v177 v178 v180 v181 v182) + (let (v183 i32) (const.i32 4)) + (let (v184 i32) (add.wrapping v161 v183)) + (let (v185 i32) (const.i32 8)) + (let (v186 i32) (add.wrapping v167 v185)) + (br (block 19 v184 v166 v186 v204))) ) (func (export #core::slice::::copy_from_slice::len_mismatch_fail) @@ -389,7 +413,7 @@ ;; Imports (func (import #std::crypto_hashes #blake3_hash_2to1) - (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param i32)) + (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (result felt felt felt felt felt felt felt felt)) ) ) diff --git a/tests/integration/expected/rust_sdk_account_test/miden_sdk_account_test.hir b/tests/integration/expected/rust_sdk_account_test/miden_sdk_account_test.hir index ca5b433e3..0aa319cff 100644 --- a/tests/integration/expected/rust_sdk_account_test/miden_sdk_account_test.hir +++ b/tests/integration/expected/rust_sdk_account_test/miden_sdk_account_test.hir @@ -1,8 +1,6 @@ (component ;; Component Imports (lower ((digest 0x0000000000000000000000000000000000000000000000000000000000000000) (type (func (abi canon) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt)))) (#miden:prelude/std_crypto_dsa #rpo_falcon512_verify) - (lower ((digest 0x0000000000000000000000000000000000000000000000000000000000000000) (type (func (abi canon) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (result felt felt felt felt felt felt felt felt)))) (#miden:prelude/std_crypto_hashes #blake3_hash_1to1) - (lower ((digest 0x0000000000000000000000000000000000000000000000000000000000000000) (type (func (abi canon) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (result felt felt felt felt felt felt felt felt)))) (#miden:prelude/std_crypto_hashes #blake3_hash_2to1) (lower ((digest 0x0000000000000000000000000000000000000000000000000000000000000000) (type (func (abi canon) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (result felt felt felt felt felt felt felt felt felt felt felt felt felt)))) (#miden:prelude/std_mem #pipe_double_words_to_memory) (lower ((digest 0x0000000000000000000000000000000000000000000000000000000000000000) (type (func (abi canon) (param felt) (param felt) (result felt felt felt felt felt)))) (#miden:prelude/std_mem #pipe_words_to_memory) (lower ((digest 0x0000000000000000000000000000000000000000000000000000000000000000) (type (func (abi canon) (param felt) (param felt) (param felt) (param felt) (result felt felt felt felt)))) (#miden:tx_kernel/account #add_asset) @@ -10,11 +8,12 @@ (lower ((digest 0x0000000000000000000000000000000000000000000000000000000000000000) (type (func (abi canon) (param felt) (param felt) (param felt) (param felt) (result felt felt felt felt)))) (#miden:tx_kernel/account #remove_asset) (lower ((digest 0x0000000000000000000000000000000000000000000000000000000000000000) (type (func (abi canon) (param felt) (result i32 felt)))) (#miden:tx_kernel/note #get_inputs) (lower ((digest 0x0000000000000000000000000000000000000000000000000000000000000000) (type (func (abi canon) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (result felt)))) (#miden:tx_kernel/tx #create_note) + (lower ((digest 0x0000000000000000000000000000000000000000000000000000000000000000) (type (func (abi canon) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (result felt felt felt felt felt felt felt felt)))) (#std::crypto_hashes #blake3_hash_2to1) ;; Modules (module #miden_sdk_account_test ;; Data Segments - (data (mut) (offset 1048576) 0x7e2f73646b2f7072656c7564652f7372632f7374646c69622f63727970746f2f6861736865732e727300000000001000290000008a000000280000000000100029000000d000000028000000) + (data (mut) (offset 1048576) 0x7e2f73646b2f7072656c7564652f7372632f7374646c69622f63727970746f2f6861736865732e727300000000001000290000008b000000280000000000100029000000d100000028000000) ;; Constants (const (id 0) 0x00100000) @@ -543,7 +542,7 @@ (let (v54 felt) (load v53)) (let (v55 i32) (const.i32 72)) (let (v56 i32) (add.wrapping v22 v55)) - (let [(v57 felt) (v58 felt) (v59 felt) (v60 felt) (v61 felt) (v62 felt) (v63 felt) (v64 felt)] (call (#miden:prelude/std_crypto_hashes #blake3_hash_1to1) v26 v30 v34 v38 v42 v46 v50 v54)) + (let [(v57 felt) (v58 felt) (v59 felt) (v60 felt) (v61 felt) (v62 felt) (v63 felt) (v64 felt)] (call (#std::crypto_hashes #blake3_hash_1to1) v26 v30 v34 v38 v42 v46 v50 v54)) (let (v65 u32) (cast v56)) (let (v66 (ptr felt)) (inttoptr v65)) (store v66 v57) @@ -908,7 +907,7 @@ (let (v101 felt) (load v100)) (let (v102 i32) (const.i32 136)) (let (v103 i32) (add.wrapping v37 v102)) - (let [(v104 felt) (v105 felt) (v106 felt) (v107 felt) (v108 felt) (v109 felt) (v110 felt) (v111 felt)] (call (#miden:prelude/std_crypto_hashes #blake3_hash_2to1) v41 v45 v49 v53 v57 v61 v65 v69 v73 v77 v81 v85 v89 v93 v97 v101)) + (let [(v104 felt) (v105 felt) (v106 felt) (v107 felt) (v108 felt) (v109 felt) (v110 felt) (v111 felt)] (call (#std::crypto_hashes #blake3_hash_2to1) v41 v45 v49 v53 v57 v61 v65 v69 v73 v77 v81 v85 v89 v93 v97 v101)) (let (v112 u32) (cast v103)) (let (v113 (ptr felt)) (inttoptr v112)) (store v113 v104) @@ -2621,10 +2620,6 @@ ;; Imports (func (import #miden:prelude/std_crypto_dsa #rpo_falcon512_verify) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt)) - (func (import #miden:prelude/std_crypto_hashes #blake3_hash_1to1) - (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (result felt felt felt felt felt felt felt felt)) - (func (import #miden:prelude/std_crypto_hashes #blake3_hash_2to1) - (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (result felt felt felt felt felt felt felt felt)) (func (import #miden:prelude/std_mem #pipe_double_words_to_memory) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (result felt felt felt felt felt felt felt felt felt felt felt felt felt)) (func (import #miden:prelude/std_mem #pipe_words_to_memory) @@ -2638,6 +2633,10 @@ (param felt) (result i32 felt)) (func (import #miden:tx_kernel/tx #create_note) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (result felt)) + (func (import #std::crypto_hashes #blake3_hash_1to1) + (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (result felt felt felt felt felt felt felt felt)) + (func (import #std::crypto_hashes #blake3_hash_2to1) + (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (param felt) (result felt felt felt felt felt felt felt felt)) ) )