Sergei Tikhomirov
  • Member for 5 years, 2 months
  • Last seen more than a week ago
Cryptography in a smart contract
4 votes

Note that no matter if you are using an internal or external call, in order to decrypt something on-chain, you have to give the miners the private key, which is obviously not so private anymore. That ...

View answer
How can I make a Dapp that is free to use?
Accepted answer
4 votes

I don't think it's possible to implement purely in Ethereum. For a user to register or in any other way to interact with a smart contract, they must send a transaction. Miners pick the transaction, ...

View answer
I need help understanding the best implementation of function modifiers
3 votes

I created a simple contract and tested it in browser-solidity: pragma solidity ^0.4.13; contract TestContract { address owner; modifier ownerOnly1 { if(msg.sender == owner) _; //...

View answer
If we create a ERC20 compliant token, how do we optimize address-balance mapping storage if we have a large user base?
2 votes

Ethereum uses Merkle Patricia tree for storage, which provides logarithmic lookup time, therefore the cost of storing a large number of elements does not matter much. In any case, the gas costs of ...

View answer
Safe to assume that Ethereum transactions are as fast as a client-server architecure and SQL database?
Accepted answer
2 votes

The average time between blocks in on the order of 15 - 30 seconds, which is definitely longer than in the client-server world. On the other hand, if the transaction value is not too high, you can ...

View answer
What is the transaction confirmation time for ERC20 based token?
Accepted answer
2 votes

An ERC20 token is just an Ethereum smart contract. Any operation with tokens is a transaction which must be confirmed by the Ethereum network, just as any other transaction. Assuming that the fee is ...

View answer
How to generate Smart Contracts on demand?
2 votes

There is a large semantic gap between "Terms and conditions" in traditional legalspeak and Solidity code (and even more so, EVM bytecode, which is what is actually executed). These notations operate ...

View answer
how to verify a bitcoin or etherem address?
Accepted answer
2 votes

What do you mean by verifying? For Bitcoin addresses, you can verify the checksum (see here). For Ethereum addresses, checksum is not obligatory, but can be incorporated by using upper- of lower-case ...

View answer
Receive Ethereum payments on eCommerce website
2 votes

What requirements do you have, apart from just being able to receive ether? If there are none, you only need an address. Run the node, give customers the address, let them pay. Does not differ much ...

View answer
Solidity TypeError: uint256 not implicitly convertible to uint256[] memory
Accepted answer
2 votes

Why do you need currentPerson at all? The following code seems to work: pragma solidity ^0.4.13; contract People { Person[] public people; struct Person { bytes32 firstName; bytes32 ...

View answer
Group sorting algorithm using max hash and quantity of accounts
1 votes

If the goal is just to pseudo-randomly assigning account to buckets, than you can simply use uint(address) % n to distribute among buckets numbered 0 to n-1 (see also: Non-cryptographic hash functions)...

View answer
State of knowledge / research directions academic paper
Accepted answer
1 votes

Time to admit that the real purpose of asking this question was to answer it with my own paper.

View answer
How to delete element of array, without index?
1 votes

You can remember the index after adding to the array: function a(uint _id) { uint id_to_delete; messageIds.push(_id); id_to_delete = messageIds.length - 1; // some stuff delete ...

View answer
Can my rig setup guy somehow cheat me and transfer some of the mining cash to his wallet?
Accepted answer
1 votes

Yes, he can cheat. To figure this out, do the following: Review the configuration file of the miner (ask the guy to show it to you). Make sure all addresses their are yours. Make sure that there are ...

View answer
Can Geth's syncing times be restricted?
1 votes

You can use Cron to launch a process at specified times on *nix systems (see also: How to kill a process in shell script which is running through cron?).

View answer
Can I import the account from MyEtherWallet to other wallets?
1 votes

On wallet creation, MEW prompts you to save a keystore file. You can import this file to other wallets and access your funds.

View answer
Why not enforce "external calls last" policy syntactically (or in compiler) to prevent reentrant attacks?
1 votes

This rule is indeed relatively easy to formalize. Static analysis tools like Securify identify this vulnerability (see their pre-loaded example).

View answer
Could ethereum be used to bypass Internet censorship?
1 votes

Probably not. Blockchains (without dedicated cryptography like zero-knowledge proofs) provide no privacy. Your node connects to blockchains via specific ports, which can be blocked by the ISP. Using ...

View answer
Issue with contract verification on Etherscan
0 votes

If you haven't changed your source code, the only possible reason seems to be that Metamask and Etherscan use different compiler versions.

View answer
Is this a satifactory crowdsale contract?
Accepted answer
0 votes

What I see from the first glance: The pragma should indicate the latest (or at least not as old) compiler version; transfer is the preferred way for sending ether. Note that tools exist for static ...

View answer
Why does this smart contract compile?
0 votes

As documentation states, enforcement of constant is simply not (yet?) implemented. It seems weird for me as well, I suppose, the devs just think this issue is of a lower priority.

View answer
ether from json file
0 votes

Yes, you have both ETH and ETC. As long as replay protection is implemented on both chains, you can initialize both wallets from one keystore file and use them independently, e.g., via Myetherwallet (...

View answer
How contract data is stored in blockchain
Accepted answer
0 votes

Ethereum stores the state as a mapping from addresses to data (contrary to Bitcoin, where balances are not stored explicitly, but have to be derived from unspent transaction outputs). When a miner ...

View answer