ArweaveTeam / SmartWeave

Simple, scalable smart contracts on the Arweave protocol.
251 stars 76 forks source link

Cache transactions in SWC readContractState #90

Open AndreVallestero opened 3 years ago

AndreVallestero commented 3 years ago

If SmartWeave.contracts.readContractState is used, all transactions of the target contract should be cached (maybe only if a parameter is specified). Currently, transactions up to the block height must be continuously refetched causing a massive slowdown in performance (up to 10 minutes for 100 transactions involoving readContractState).

ppedziwiatr commented 3 years ago

hi @AndreVallestero ! Please consider switching to https://github.com/redstone-finance/redstone-smartcontracts - it has the above optimization (and many more!) already implemented.