profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/hrkrshnn/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Harikrishnan Mulackal hrkrshnn @ethereum

hrkrshnn/DG-Spivak 3

Solutions to A comprehensive introduction to differential geometry, Vol 1, by Micheal Spivak.

Bumper-Fi/1a-bootstrap-contracts 2

bumper protocol bootstrap contract suite

hrkrshnn/germanBot 1

A telegram bot that will point out spelling and grammatical errors in your Deutsch

hrkrshnn/AlgTop-Massey 0

Solutions to "A Basic Course in Algebraic Topology" by Massey.

hrkrshnn/dg1 0

Discrete geometry 1

hrkrshnn/dm2 0

Discrete math 2

hrkrshnn/Downloader 0

A downloader that splits dowload and merges the parts at the end

hrkrshnn/dumb-jump 0

an Emacs "jump to definition" package for 50+ languages

hrkrshnn/emacs-solidity 0

The official solidity-mode for EMACS

pull request commentethereum/solidity

Split Common.h into Numeric.h.

Not really :) The changes are mind-numbing; it looks fine and passes the tests, so fine for me.

chriseth

comment created time in a day

PullRequestReviewEvent
PullRequestReviewEvent

issue openedethereum/solidity

[YulOpti] Improving offset computations in for loop

Context

struct Deposit {
    uint16 assetId;
    uint240 balance;
    uint priceInEth;
}
contract C {
    function f(Deposit[] calldata deposits) external {
        uint sum;
        for (uint i = 0; i < deposits.length; ++i) {
            sum += deposits[i].priceInEth;
        }
    }
}

generates the for loop:

                let var_sum := 0
                let var_i := var_sum
                for { }
                lt(var_i, var_deposits_length)
                {
                    if eq(var_i, not(0)) { panic_error_0x11() }
                    var_i := add(var_i, 1)
                }
                {
                    let value := calldataload(add(add(var_deposits_offset, mul(var_i, 96)), 64))
                    if gt(var_sum, not(value)) { panic_error_0x11() }
                    var_sum := add(var_sum, value)
                }

The offset computation add(add(var_deposits_offset, mul(var_i, 96)), 64)) can be improved:

                  let var_sum := 0
                  let var_i := var_sum
                  let var_offset := add(var_deposits_offset, 64)
                  for { }
                  lt(var_i, var_deposits_length)
                  {
                      var_i := add(var_i, 1)
                      var_offset := add(var_offset, 96)
                  }
                  {
                      let value := calldataload(var_offset)
                      if gt(var_sum, not(value)) { panic_error_0x11() }
                      var_sum := add(var_sum, value)
                  }

created time in a day

Pull request review commentethereum/solidity

Split Common.h into Numeric.h.

 string AssemblyItem::toAssemblyText(Assembly const& _assembly) const 		text = string("tag_") + to_string(static_cast<size_t>(data())) + ":"; 		break; 	case PushData:-		text = string("data_") + util::toHex(data());+		text = string("data_") + ::toHex(data());

Can remove the :: prefix

chriseth

comment created time in a day

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentethereum/solidity

Some cleanup and testing for JSON

 string Assembly::assemblyString(StringMap const& _sourceCodes) const  Json::Value Assembly::createJsonValue(string _name, int _source, int _begin, int _end, string _value, string _jumpType) {-	Json::Value value;+	Json::Value value{Json::objectValue};

What difference does this make?

axic

comment created time in a day

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

push eventethereum/solidity

Alex Beregszaszi

commit sha 34b84776641c7228409aba2c17659b20c3bb7a9a

Improve `--optimize-runs` text

view details

push time in a day

Pull request review commentethereum/solidity

Improve `--optimize-runs` text

 General Information)").c_str(), 			// TODO: The type in OptimiserSettings is size_t but we only accept values up to 2**32-1 			// on the CLI and in Standard JSON. We should just switch to uint32_t everywhere. 			po::value<unsigned>()->value_name("n")->default_value(static_cast<unsigned>(OptimiserSettings{}.expectedExecutionsPerDeployment)),-			"Set for how many contract runs to optimize. "-			"Lower values will optimize more for initial deployment cost, higher values will optimize more for high-frequency usage."+		    "The number of runs specifies roughly how often each opcode of the deployed code will be executed across the lifetime of the contract. "+		    "Lower values will optimize more for initial deployment cost, higher values will optimize more for high-frequency usage."

The tests are failing because of indentation, I think. Will push this.

axic

comment created time in a day

PullRequestReviewEvent
PullRequestReviewEvent

issue commentethereum/solidity

immutable for libraries / dynamic libraries / high-level delegatecall

During the call, we briefly mentioned the idea of a library interface. The difference being that calls would be delegatecall. I think this might be another approach for this, and can be used as a replacement for some proxy designs that rely on low-level delegate calls.

Syntax could look like:

library interface L {
    function f() external;
    function g() external;
}

Now L can be treated similarly to how regular interfaces can be treated:

  1. they can be stored both as immutable state variable as well as regular state variable (to get upgradability).
  2. new L() isn't well-defined and cannot type check.
  3. L(<address>).f() would be a delegate call instead of call or staticcall.
chriseth

comment created time in 2 days

push eventethereum/solidity

Leo Alt

commit sha e74f853c6bc3bcfbd110cef7537d3bc3cafabfbe

[SMTChecker] Support user types

view details

Harikrishnan Mulackal

commit sha 55d609d354a69c10c30d38185f401dc26361b6ba

Merge pull request #11990 from ethereum/smt_user_types [SMTChecker] Support user types

view details

push time in 2 days

delete branch ethereum/solidity

delete branch : smt_user_types

delete time in 2 days

PR merged ethereum/solidity

[SMTChecker] Support user types

Fix https://github.com/ethereum/solidity/issues/11966

Still need to add more tests, but code can be reviewed

+462 -14

3 comments

23 changed files

leonardoalt

pr closed time in 2 days

pull request commentethereum/solidity

[SMTChecker] Support user types

I think this is fine to merge. The description is old. Will merge now.

leonardoalt

comment created time in 2 days

issue commentethereum/solidity

immutable for libraries / dynamic libraries / high-level delegatecall

Does this mean that the library address needs to be passed as an argument during the constructor?

chriseth

comment created time in 2 days

issue commentethereum/solidity

Make source maps byte-offset based instead of opcode-offset

This sounds good to me. Giving a heads-up to tooling people and perhaps asking for feedback would be nice.

chriseth

comment created time in 2 days

issue commentethereum/solidity

immutable for libraries / dynamic libraries / high-level delegatecall

As I understand this, libraries are also deployed during construction time. Is that correct? In that case, for users who rely on libraries to get around contract-size limit would have problems, right?

chriseth

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentethereum/solidity

Function debug info

 struct LinkerObject 	struct FunctionDebugData 	{ 		std::optional<size_t> bytecodeOffset;+		std::optional<size_t> instructionIndex;

it's an index into the list of instructions

Ah, okay. I'm indifferent about instructionOffset v/s instructionIndex.

chriseth

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentethereum/solidity

Function debug info

 void CodeTransform::operator()(Block const& _block) 	Scope* originalScope = m_scope; 	m_scope = m_info.scopes.at(&_block).get(); +	for (auto const& statement: _block.statements)+		if (auto function = get_if<FunctionDefinition>(&statement))+			createFunctionEntryID(*function);

Not sure if it matters, function hoister and function grouper would change the visit order in that case. Wouldn't it be nice if the order was the same? Maybe doing this in operator()(FunctionDefinition const&...) is more appropriate?

Also, where else are using the current order?

chriseth

comment created time in 2 days