Skip to content

Commit

Permalink
turn off BN curve by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jafri committed Apr 29, 2020
1 parent ab9b443 commit 652aed0
Show file tree
Hide file tree
Showing 17 changed files with 173 additions and 157 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ eosio.evm supports all 9 precompiles
All constants are found at [constants.hpp](eosio.evm/include/eosio.evm/constants.hpp)

1. **TESTING** - adds functionality for executing tests, and resetting the contract; default true, remove in production
2. **BN_CURVE** - adds bnadd, bnmul, and bnpair precompiles; default true
2. **BN_CURVE** - adds bnadd, bnmul, and bnpair precompiles; default false
3. **CHARGE_SENDER_FOR_GAS** - toggle charging sender for gas; default false, required for ethereum tests
4. **PRINT_LOGS** - prints logs as part of execution receipt; default false
5. **OPTRACE** - prints the opcode trace for the execution; default false
Expand All @@ -46,7 +46,7 @@ All constants are found at [constants.hpp](eosio.evm/include/eosio.evm/constants

**NOTE:** [TESTING, CHARGE_SENDER_FOR_GAS] must be enabled, and [OPTRACE, PRINT_LOGS] must be disabled for ethereum/tests testing to pass successfuly.

**NOTE:** If ec_add, ec_mul and ec_pairing precompiles are not required, set BN_CURVE to false to reduce WASM size by 210KB (~2MB onchain).
**NOTE:** If ec_add, ec_mul and ec_pairing precompiles are required, set BN_CURVE to true (will increase WASM size by 210KB, or ~2MB onchain).

## Usage instructions
Deployment steps are laid out step-by-step in both the JS and cleos guides:
Expand Down
42 changes: 21 additions & 21 deletions eos-evm-js/docs/classes/eosapi.html
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L30">eos.ts:30</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L30">eos.ts:30</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1164,7 +1164,7 @@ <h3>eos</h3>
<div class="tsd-signature tsd-kind-icon">eos<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L29">eos.ts:29</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L29">eos.ts:29</a></li>
</ul>
</aside>
</section>
Expand All @@ -1174,7 +1174,7 @@ <h3>eos<wbr>Contract</h3>
<div class="tsd-signature tsd-kind-icon">eos<wbr>Contract<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L30">eos.ts:30</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L30">eos.ts:30</a></li>
</ul>
</aside>
</section>
Expand All @@ -1184,7 +1184,7 @@ <h3>eos<wbr>Private<wbr>Keys</h3>
<div class="tsd-signature tsd-kind-icon">eos<wbr>Private<wbr>Keys<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Array</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L26">eos.ts:26</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L26">eos.ts:26</a></li>
</ul>
</aside>
</section>
Expand All @@ -1194,7 +1194,7 @@ <h3>rpc</h3>
<div class="tsd-signature tsd-kind-icon">rpc<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L28">eos.ts:28</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L28">eos.ts:28</a></li>
</ul>
</aside>
</section>
Expand All @@ -1204,7 +1204,7 @@ <h3>signature<wbr>Provider</h3>
<div class="tsd-signature tsd-kind-icon">signature<wbr>Provider<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L27">eos.ts:27</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L27">eos.ts:27</a></li>
</ul>
</aside>
</section>
Expand All @@ -1221,7 +1221,7 @@ <h3>call</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L132">eos.ts:132</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L132">eos.ts:132</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1256,7 +1256,7 @@ <h3>clear<wbr>All</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L233">eos.ts:233</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L233">eos.ts:233</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4>
Expand All @@ -1274,7 +1274,7 @@ <h3>create</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L167">eos.ts:167</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L167">eos.ts:167</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1306,7 +1306,7 @@ <h3>deposit</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L212">eos.ts:212</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L212">eos.ts:212</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1341,7 +1341,7 @@ <h3>dev<wbr>New<wbr>Account</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L248">eos.ts:248</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L248">eos.ts:248</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1377,7 +1377,7 @@ <h3>get<wbr>All<wbr>Addresses</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L300">eos.ts:300</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L300">eos.ts:300</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4>
Expand All @@ -1395,7 +1395,7 @@ <h3>get<wbr>Eth<wbr>Account</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L320">eos.ts:320</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L320">eos.ts:320</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1419,7 +1419,7 @@ <h3>get<wbr>Eth<wbr>Account<wbr>ByEos<wbr>Account</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L413">eos.ts:413</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L413">eos.ts:413</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1442,7 +1442,7 @@ <h3>get<wbr>Nonce</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L360">eos.ts:360</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L360">eos.ts:360</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1466,7 +1466,7 @@ <h3>get<wbr>Storage<wbr>At</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L380">eos.ts:380</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L380">eos.ts:380</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1493,7 +1493,7 @@ <h3>get<wbr>Table</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L276">eos.ts:276</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L276">eos.ts:276</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1517,7 +1517,7 @@ <h3>raw</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L92">eos.ts:92</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L92">eos.ts:92</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1552,7 +1552,7 @@ <h3>setup<wbr>Evm<wbr>Contract</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L439">eos.ts:439</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L439">eos.ts:439</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1575,7 +1575,7 @@ <h3>transact</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L59">eos.ts:59</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L59">eos.ts:59</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1599,7 +1599,7 @@ <h3>withdraw</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos.ts#L189">eos.ts:189</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos.ts#L189">eos.ts:189</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down
24 changes: 12 additions & 12 deletions eos-evm-js/docs/classes/eosevmapi.html
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos-evm-js.ts#L23">eos-evm-js.ts:23</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos-evm-js.ts#L23">eos-evm-js.ts:23</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1137,7 +1137,7 @@ <h3>abi</h3>
<div class="tsd-signature tsd-kind-icon">abi<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos-evm-js.ts#L20">eos-evm-js.ts:20</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos-evm-js.ts#L20">eos-evm-js.ts:20</a></li>
</ul>
</aside>
</section>
Expand All @@ -1147,7 +1147,7 @@ <h3>chain<wbr>Config</h3>
<div class="tsd-signature tsd-kind-icon">chain<wbr>Config<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos-evm-js.ts#L19">eos-evm-js.ts:19</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos-evm-js.ts#L19">eos-evm-js.ts:19</a></li>
</ul>
</aside>
</section>
Expand All @@ -1157,7 +1157,7 @@ <h3>chain<wbr>Id</h3>
<div class="tsd-signature tsd-kind-icon">chain<wbr>Id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos-evm-js.ts#L18">eos-evm-js.ts:18</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos-evm-js.ts#L18">eos-evm-js.ts:18</a></li>
</ul>
</aside>
</section>
Expand All @@ -1167,7 +1167,7 @@ <h3>eos</h3>
<div class="tsd-signature tsd-kind-icon">eos<span class="tsd-signature-symbol">:</span> <a href="eosapi.html" class="tsd-signature-type">EosApi</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos-evm-js.ts#L23">eos-evm-js.ts:23</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos-evm-js.ts#L23">eos-evm-js.ts:23</a></li>
</ul>
</aside>
</section>
Expand All @@ -1177,7 +1177,7 @@ <h3>eth</h3>
<div class="tsd-signature tsd-kind-icon">eth<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos-evm-js.ts#L21">eos-evm-js.ts:21</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos-evm-js.ts#L21">eos-evm-js.ts:21</a></li>
</ul>
</aside>
</section>
Expand All @@ -1187,7 +1187,7 @@ <h3>eth<wbr>Contract</h3>
<div class="tsd-signature tsd-kind-icon">eth<wbr>Contract<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos-evm-js.ts#L22">eos-evm-js.ts:22</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos-evm-js.ts#L22">eos-evm-js.ts:22</a></li>
</ul>
</aside>
</section>
Expand All @@ -1197,7 +1197,7 @@ <h3>eth<wbr>Private<wbr>Keys</h3>
<div class="tsd-signature tsd-kind-icon">eth<wbr>Private<wbr>Keys<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos-evm-js.ts#L17">eos-evm-js.ts:17</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos-evm-js.ts#L17">eos-evm-js.ts:17</a></li>
</ul>
</aside>
</section>
Expand All @@ -1214,7 +1214,7 @@ <h3>create<wbr>Eth<wbr>Tx</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos-evm-js.ts#L250">eos-evm-js.ts:250</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos-evm-js.ts#L250">eos-evm-js.ts:250</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1258,7 +1258,7 @@ <h3>load<wbr>Contract<wbr>From<wbr>Abi</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos-evm-js.ts#L74">eos-evm-js.ts:74</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos-evm-js.ts#L74">eos-evm-js.ts:74</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1292,7 +1292,7 @@ <h3>set<wbr>Ethereum<wbr>Contract</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos-evm-js.ts#L61">eos-evm-js.ts:61</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos-evm-js.ts#L61">eos-evm-js.ts:61</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1315,7 +1315,7 @@ <h3>transfer</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/5850728/eos-evm-js/src/eos-evm-js.ts#L203">eos-evm-js.ts:203</a></li>
<li>Defined in <a href="https://github.com/jafri/eosio.evm/blob/ab9b443/eos-evm-js/src/eos-evm-js.ts#L203">eos-evm-js.ts:203</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down
Loading

0 comments on commit 652aed0

Please sign in to comment.