Per-API cost tables and the votable HookGasPrice move to the HookFeeV3
branch. V2 charges one cost unit per wasm instruction and 100 units per
hook API call (including _g), with ten units per drop rounded up.
- Guard.h: drop the per-import cost map, charge a fixed api_call_cost on
every import call
- Remove sfHookGasPrice, FeeSettings/SetFee/validation fields, fee voting,
server_info output and the hook_gas_price config knob
- hookCostToFee no longer depends on the ledger view
- Restore genesis ledger, jtx Env and fragile-hash tests to dev
- Update expected hook costs in SetHook_test
Api costs were looked up as import_type_map[callee_idx], but that map is
keyed by wasm type index while callee_idx is a function index. A hook was
charged whichever api happened to occupy the callee's index, or nothing at
all when no type carried that index, and imports sharing a signature
collapsed to a single cost. Reordering imports was enough to call
util_verify, the most expensive api, for free. Costs now come from
import_cost_map, keyed by import function index, and import_type_map is
reduced to the signature checking it is actually used for.
compute_wce() applied the loop multiplier to instruction_count only, so an
api call inside a guarded loop was charged for one iteration no matter how
many the guard allowed. The multiplier now applies to execution_cost as
well, with the same floor instruction_count uses.