Comments (3)
@birchmd this is a good suggestion! The thing worth noticing here is that new()
for the engine allows setting the state for it multiple times, however, eth-connector allows doing the initialization only once. This is because obviously, we don't want to accidentally overwrite the FungibleToken
data. For the sake of updating the contract addresses in eth-connector, I added some time ago set_eth_connector_contract_data()
method which sets the provided prover ID and EthCustodian
address.
So I think the correct behavior for eth-connector in new()
will be the following:
- If eth-connector is not initialized -> call
init_contract()
method; - If eth-connector is initialized -> call
set_contract_data()
method.
For sure, we can modify the behavior of init_contract
allowing it to be called multiple times without modifying FungibleToken
and paused_mask
if the contract is initialized, but I think this will be a little bit misleading, so I'd prefer having the check on the engine level in new()
method.
For the prover ID in the engine state, I remember I reported about it some time ago and I even remember that I removed it. Not sure why we still have it there, but this is quite minor so we can just proceed with removing it again.
from aurora-engine.
@birchmd What practical case for mainnet use multiple times new
function?
Also as mentioned @sept-en FunginlrToken
should be inited only once.
I think we can add additional parameters for new
function for eth-connector
part. And again check for only one eth-connector init call.
from aurora-engine.
What practical case for mainnet use multiple times new function?
I don't think this is an important consideration. We want to be able to deploy the contract more places than just mainnet. For example, community members may wish to deploy it on a local node for testing purposes. And getting an error because they only called new
without new_eth_connector
is a bad developer experience. If they use the aurora CLI then this complexity is hidden because there is a single init
call there. But I think the point remains that it is unintuitive to have two required calls when it would be easy enough for us to only have one.
from aurora-engine.
Related Issues (20)
- `parentHash(67957106) != hash(67957105)` HOT 1
- [Feature Request]: Prevent engine-tests cloning multiple times in the same target/openzeppelin-contracts directory for manual testing HOT 7
- RPC `eth_call()` returning nondeterministic results HOT 1
- Some `eth_call` requests have empty response without explicit error HOT 1
- Unable to call write function using Ether JS on localnet due to different key format. HOT 30
- Reduce gas with faster evm
- Remove `ERR_*` type errors, only display those errors through Near SDK HOT 1
- Use NEAR's `near_account_id` library
- Contract state change not visible if request is done over official JSON-RPC node HOT 1
- Update rocksdb to v0.19.0 HOT 2
- Some eth_getBlockByNumber requests have null response without explicit error HOT 6
- Aurora Engine crashes before hitting the EVM call stack limit
- The pre-contract (0x5) has incorrect logic on calculating the gas fee HOT 1
- HttpProviderError error while deploying with hardhat HOT 1
- EVM Flashloan on Aurora. but get "A status code indicating if the top-level call succeeded or failed (applicable for Post BYZANTIUM blocks only) HOT 2
- wasm-opt for improving gas consumption HOT 3
- chore: publish `aurora-engine-modexp` crate HOT 6
- Looking for devs to answer a couple questions about Sputnik (rust EVM) for parrellized evm proof of concept HOT 1
- Blockchain nide
- Blockchain node
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aurora-engine.