fix(StatePart): Use stable JSON stringify for state hashing; update dependencies and tooling

This commit is contained in:
2025-09-12 22:08:35 +00:00
parent 07bfbfd393
commit 81ca32cdef
5 changed files with 2713 additions and 969 deletions

View File

@@ -79,7 +79,7 @@ export class StatePart<TStatePartName, TStatePayload> {
return;
}
const createStateHash = async (stateArg: any) => {
return await plugins.smarthashWeb.sha256FromString(plugins.smartjson.stringify(stateArg));
return await plugins.smarthashWeb.sha256FromString(plugins.smartjson.stableOneWayStringify(stateArg));
};
const currentHash = await createStateHash(this.stateStore);
if (