Page MenuHomePhabricator

Cache script execution on a per transaction basis

Authored by deadalnix on Sep 6 2017, 12:21.



This ensure that we do not run the same script twice with the same set of flags. because we check script when accepting a transaction in the mempool, this shoudl ensure that we do not run the script when connecting a new block.

This is based on core's PR10192 , but the structure is somewhat different (the cache is moved in its own file for instance).

Test Plan
make check
../qa/pull-tester/ -extended

Run a node on testnet for a day, it looks like it all works well.

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

deadalnix created this revision.Sep 6 2017, 12:21
Herald added a reviewer: Restricted Project. · View Herald TranscriptSep 6 2017, 12:21
sickpig added a subscriber: sickpig.Sep 6 2017, 20:04
sickpig added inline comments.
1 ↗(On Diff #1330)

missing licence?

deadalnix updated this revision to Diff 1344.Sep 6 2017, 22:57

Fix licence

dagurval accepted this revision.Sep 7 2017, 19:53
dagurval added a subscriber: dagurval.
dagurval added inline comments.
55 ↗(On Diff #1344)

If IsKeyInScriptCache requires cs_main, shouldn't inserting also require cs_main? (AssertLockHeld(cs_main))

This revision is now accepted and ready to land.Sep 7 2017, 19:53
deadalnix added inline comments.Sep 7 2017, 23:15
55 ↗(On Diff #1344)


This revision was automatically updated to reflect the committed changes.