Finschia / cosmwasm

Fast and reusable WebAssembly smart contract runtime(and library) for finschia-sdk.
Apache License 2.0
27 stars 14 forks source link

idea: Multiple calls to readOnly callablepoint functions in the same contract #308

Open Kynea0b opened 1 year ago

Kynea0b commented 1 year ago

As a measure against re-entarancy, when a contract function with the same address is called via a callablepoint, the callstack is designed so that a call to a contract with a specific address cannot be called more than once at the same time. vm manages calls here. https://github.com/Finschia/wasmvm/blob/1e43355ed2255e4aed7fabb2e4323caa2bd3e02a/libwasmvm/src/dynamic_link.rs#L152 This is the same control in all contract callablepoint functions. However, it is better to allow readOnly permissions such as query multiple times at the same time.