profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/cameel/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.

cameel/auto-resizing-text-edit 7

A Qt widget based on QTextEdit, that changes its height automatically to accommodate the text

cameel/captcha 3

A captcha plugin for Rails

cameel/diatex 3

WYSIWYM diagramming tool

cameel/http-watchdog 3

A simple program that monitors web pages and reports their availability

cameel/gettext 2

Ruby-GetText-Package is a Localization(L10n) library and tools which modeled after GNU gettext package.

cameel/ie7-js-rails 2

A gem that packages IE7.js for convenient use in Rails asset pipeline

cameel/okteta-structure-avi 2

Okteta structure definition for AVI file format

cameel/gettext_i18n_rails 1

Rails: FastGettext, I18n integration -- simple, threadsafe and fast!

cameel/nastro 1

An application for gathering and organizing notes

leonardoalt/SolPrologV2 1

A Prolog engine written in Solidity.

push eventethereum/solidity

chriseth

commit sha 98f2977f1f6a0721f109871b286d2dfbb5e72a25

Move AND with constant inside OR.

view details

push time in 11 minutes

pull request commentethereum/solidity

[SMTChecker] Fix bug in virtual functions called by constructor

Yea I'll remove the comments. The predicates re constructors are pretty much the same. What changes here is that there's some duplication on the constructor deployment predicates, for each contract that is considered the "most derived". If a contract does not inherit from another contract, nothing changes. If it does, you can think of the one that gets deployed as the most derived, and if we only analyze that one, there wouldn't be any duplication.

leonardoalt

comment created time in 12 minutes

Pull request review commentethereum/solidity

Move AND with constant inside OR.

 tag_1:   not(sub(shl(0x40, 0x01), 0x01))   and     /* "optimizer_inliner_dynamic_reference_constructor/input.sol":97:98  f */-  or(tag_0_12, shl(0x20, tag_4))+  shl(0x20, tag_4)   sub(shl(0x40, 0x01), 0x01)     /* "optimizer_inliner_dynamic_reference_constructor/input.sol":93:98  x = f */+  swap1+  dup2+  and+    /* "optimizer_inliner_dynamic_reference_constructor/input.sol":97:98  f */+  tag_0_12+    /* "optimizer_inliner_dynamic_reference_constructor/input.sol":93:98  x = f */+  swap1+  swap2

Sorry, I was wrong. It is indeed that expression.

chriseth

comment created time in 16 minutes

Pull request review commentethereum/solidity

Move AND with constant inside OR.

 tag_1:   not(sub(shl(0x40, 0x01), 0x01))   and     /* "optimizer_inliner_dynamic_reference_constructor/input.sol":97:98  f */-  or(tag_0_12, shl(0x20, tag_4))+  shl(0x20, tag_4)   sub(shl(0x40, 0x01), 0x01)     /* "optimizer_inliner_dynamic_reference_constructor/input.sol":93:98  x = f */+  swap1+  dup2+  and+    /* "optimizer_inliner_dynamic_reference_constructor/input.sol":97:98  f */+  tag_0_12+    /* "optimizer_inliner_dynamic_reference_constructor/input.sol":93:98  x = f */+  swap1+  swap2

Are you sure it's not sub(shl(0x40, 0x01), 0x01)?

chriseth

comment created time in 25 minutes

Pull request review commentethereum/solidity

Move AND with constant inside OR.

 tag_1:   not(sub(shl(0x40, 0x01), 0x01))   and     /* "optimizer_inliner_dynamic_reference_constructor/input.sol":97:98  f */-  or(tag_0_12, shl(0x20, tag_4))+  shl(0x20, tag_4)   sub(shl(0x40, 0x01), 0x01)     /* "optimizer_inliner_dynamic_reference_constructor/input.sol":93:98  x = f */+  swap1+  dup2+  and+    /* "optimizer_inliner_dynamic_reference_constructor/input.sol":97:98  f */+  tag_0_12+    /* "optimizer_inliner_dynamic_reference_constructor/input.sol":93:98  x = f */+  swap1+  swap2

Ah sorry, I thought you meant it can be computed to a specific number. Let me check.

chriseth

comment created time in 27 minutes

Pull request review commentethereum/solidity

Move AND with constant inside OR.

 tag_1:   not(sub(shl(0x40, 0x01), 0x01))   and     /* "optimizer_inliner_dynamic_reference_constructor/input.sol":97:98  f */-  or(tag_0_12, shl(0x20, tag_4))+  shl(0x20, tag_4)   sub(shl(0x40, 0x01), 0x01)     /* "optimizer_inliner_dynamic_reference_constructor/input.sol":93:98  x = f */+  swap1+  dup2+  and+    /* "optimizer_inliner_dynamic_reference_constructor/input.sol":97:98  f */+  tag_0_12+    /* "optimizer_inliner_dynamic_reference_constructor/input.sol":93:98  x = f */+  swap1+  swap2

I mean the pattern matching chose A to be shl(0x20, tag_4). I'm not sure if it should match that.

chriseth

comment created time in 31 minutes

Pull request review commentethereum/solidity

Detect circular references for library and free functions

 void NameAndTypeResolver::linearizeBaseContracts(ContractDefinition& _contract) 		// "push_front" has the effect that bases mentioned later can overwrite members of bases 		// mentioned earlier 		input.back().push_front(base);+		_contract.annotation().contractDependencies.emplace(base, baseSpecifier.get());

If we have

contract A { function f() public { new B(); } }
contract B is A {}

this will be caught through the call graph. A special case that changes is if the base function is not executed when the derived is the "most derived":

contract A { function f() public virtual { new B(); } }
contract B is A {
 function f() public override {  }
}

But in that case, it is actually possible for A to create B.

Marenz

comment created time in an hour

Pull request review commentethereum/solidity

Detect circular references for library and free functions

 void NameAndTypeResolver::linearizeBaseContracts(ContractDefinition& _contract) 		// "push_front" has the effect that bases mentioned later can overwrite members of bases 		// mentioned earlier 		input.back().push_front(base);+		_contract.annotation().contractDependencies.emplace(base, baseSpecifier.get());

Do we actually still need this, or are the dependencies from the call graph enough?

Marenz

comment created time in an hour

issue commentethereum/solidity

[yul] datasize use can be problematic if compiler generated code uses it in a stateful way

This may be closed once #11028 is merged because this bug only manifests when fuzzing on evmone.

bshastry

comment created time in an hour

Pull request review commentethereum/solidity

Detect circular references for library and free functions

 Language Features:   Compiler Features:+ * References Resolver: Detect circular references for libraries and free functions
 * References Resolver: Detect circular references to other contracts across libraries and free functions
Marenz

comment created time in an hour

Pull request review commentethereum/solidity

Move AND with constant inside OR.

 tag_1:   not(sub(shl(0x40, 0x01), 0x01))   and     /* "optimizer_inliner_dynamic_reference_constructor/input.sol":97:98  f */-  or(tag_0_12, shl(0x20, tag_4))+  shl(0x20, tag_4)   sub(shl(0x40, 0x01), 0x01)     /* "optimizer_inliner_dynamic_reference_constructor/input.sol":93:98  x = f */+  swap1+  dup2+  and+    /* "optimizer_inliner_dynamic_reference_constructor/input.sol":97:98  f */+  tag_0_12+    /* "optimizer_inliner_dynamic_reference_constructor/input.sol":93:98  x = f */+  swap1+  swap2

No, the tag has to be preserved.

chriseth

comment created time in an hour

pull request commentethereum/solidity

Natspec: Don't copy from base function if return parameters differ

Only backwards-compatibility for public variables.

Marenz

comment created time in an hour

Pull request review commentethereum/solidity

[SMTChecker] Fix bug in virtual functions called by constructor

 contract C } // ---- // Warning 6328: (76-105): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f()-// Warning 6328: (403-432): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f()\n    C.fi() -- internal call\n    C.gi() -- internal call+// Warning 6328: (403-432): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f()\n    C.gi() -- internal call\n    C.fi() -- internal call

Oh true, good catch. It should be implemented, maybe the order here impacted that somehow, I'll check.

leonardoalt

comment created time in an hour

pull request commentethereum/solidity

Fixes for shellcheck warnings, part 1

That's fine with me

cameel

comment created time in an hour

Pull request review commentethereum/solidity

[SMTChecker] Fix bug in virtual functions called by constructor

 contract C } // ---- // Warning 6328: (76-105): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f()-// Warning 6328: (403-432): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f()\n    C.fi() -- internal call\n    C.gi() -- internal call+// Warning 6328: (403-432): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f()\n    C.gi() -- internal call\n    C.fi() -- internal call

Do you know why the order has changed here? Shouldn't the order in report match the order in the call already? (I forgot if this has been implemented or not)

leonardoalt

comment created time in an hour

issue openedethereum/solidity

RFC: export EIP-712 signature definitions in the ABI

EIP-712 defines a typed signature scheme in which a messageStruct and a domainStruct are defined, and a hashing scheme that combines the names, types, and values of these into a bytestring that is then sent to the wallet to be signed.

This is becoming an increasingly common way to interact with contracts, with two prominent examples being permit (EIP-2612) and Gnosis Safe.

While generating EIP-712 signatures is straight forward enough given a particular pair of message and domainstruct, it is harder to generate for arbitrary contracts, as the structures are not exposed in the ABI. This means that 712-style signatures need to special cased for each contract, and cannot be discovered or interacted with via generalized uis that interface directly with the contract ABI, such as remix or etherscan.

I'm wondering if it might be a good idea to let 712 structures be exposed in the ABI, maybe through a special keyword on structs. For example, here I am decorating the two structs required to form a Mail example from the 712 spec with the eip712 keyword.

struct EIP712Domain eip712 {
    string name;
    string version;
    uint256 chainId;
    address verifyingContract;
}

struct Mail eip712 {
    address from;
    address to;
    string contents;
}

This would expose the following json for the Mail struct to the ABI:

  eip712Types: {
      EIP712Domain: [
          { name: 'name', type: 'string' },
          { name: 'version', type: 'string' },
          { name: 'chainId', type: 'uint256' },
          { name: 'verifyingContract', type: 'address' },
      ],
    Mail: [
          { name: 'from', type: 'address' }, 
          { name: 'to' type: 'address' },
          { name: 'contents', type: 'string' }
      ],
  }

Which, given values for name, version, chainId, verifyingContract, from, to and contents can easily be used for generating a EIP-712 style signature.

created time in an hour

push eventethereum/solidity

Daniel Kirchner

commit sha acd3084076f3df967b8719973eb0e0c82bec47e0

Fuzzer for stack optimiser/code generator.

view details

push time in an hour

pull request commentethereum/solidity

Fuzz stack reuse codegen

This PR is now ready for review.

bshastry

comment created time in an hour

push eventethereum/solidity

Martin Blicha

commit sha 0340510c538b9b2171ad382d88082c5738793a60

[SMTChecker] correct handling of FixedBytes constants initialized with string literal

view details

Bhargava Shastry

commit sha a34308e4cbc1669f390468d41ec0ba70e87da277

Proto yul converter: Provide a flag to filter stateful instructions.

view details

Leonardo

commit sha d42d0faf410e22a59f0cdfebfa19ccf712213d31

Merge pull request #11052 from blishko/issue-10986 [SMTChecker] Correct handling of FixedBytes constants initialized with string literal

view details

Bhargava Shastry

commit sha ca267e50d3641f78d748335974beda0ce365018f

Merge pull request #11053 from ethereum/protoConverter-opcode-filter-flag Proto yul converter: Provide a flag to filter stateful instructions.

view details

Daniel Kirchner

commit sha e98a10919bb504e39a1827102491e6abeff27e81

Fuzzer for stack optimiser/code generator.

view details

push time in an hour

push eventethereum/solidity

Bhargava Shastry

commit sha a34308e4cbc1669f390468d41ec0ba70e87da277

Proto yul converter: Provide a flag to filter stateful instructions.

view details

Bhargava Shastry

commit sha ca267e50d3641f78d748335974beda0ce365018f

Merge pull request #11053 from ethereum/protoConverter-opcode-filter-flag Proto yul converter: Provide a flag to filter stateful instructions.

view details

push time in an hour

delete branch ethereum/solidity

delete branch : protoConverter-opcode-filter-flag

delete time in an hour

pull request commentethereum/solidity

Fixes for shellcheck warnings, part 1

Hmmm ok, it's quite a lot of commits though. I'll approve it anyway, if anyone doesn't like it blame @cameel !

cameel

comment created time in 2 hours

pull request commentethereum/solidity

Natspec: Don't copy from base function if return parameters differ

Waiting clarification from @chriseth

Marenz

comment created time in 2 hours

pull request commentethereum/solidity

Fix shadowing struct types by struct member names

The implemented or discussed solution?

a3d4

comment created time in 2 hours

pull request commentethereum/solidity

Fixes for shellcheck warnings, part 1

Looks good, can you squash? I'll approve then

cameel

comment created time in 2 hours

Pull request review commentethereum/solidity

Fixes for shellcheck warnings, part 1

 for (var optimize of [false, true]) } EOF     chmod +x solc-    ./solc *.sol > /tmp/report.txt+    ./solc -- *.sol > /tmp/report.txt

Ah ok!

cameel

comment created time in 2 hours

Pull request review commentethereum/solidity

[isoltest] Add support to query balance.

+contract Other {+    constructor() payable {+    }+    function getAddress() public returns (address) {+        return address(this);+    }+}+contract ClientReceipt {+    Other other;+    constructor() payable {+        other = new Other{value:500}();+    }+    function getAddress() public returns (address) {+        return other.getAddress();+    }+}+// ====+// compileViaYul: also+// ----+// constructor(), 1000 wei ->+// contract.balance() -> 500

@aarlt this PR is using contract_balance for the first one. Is that changed from the other PR?

aarlt

comment created time in 2 hours

Pull request review commentethereum/solidity

[isoltest] Add support to query balance.

+contract Other {+    constructor() payable {+    }+    function getAddress() public returns (address) {+        return address(this);+    }+}+contract ClientReceipt {+    Other other;+    constructor() payable {+        other = new Other{value:500}();+    }+    function getAddress() public returns (address) {+        return other.getAddress();+    }+}+// ====+// compileViaYul: also+// ----+// constructor(), 2000 wei ->+// contract_balance -> 1500+// getAddress() -> 0xf01f7809444bd9a93a854361c6fae3f23d9e23db

Is this always guaranteed? When could it change?

aarlt

comment created time in 2 hours

Pull request review commentethereum/solidity

[isoltest] Add support to query balance.

+contract ClientReceipt {+    constructor() payable {}+}+// ====+// compileViaYul: also+// ----+// constructor(), 1000 wei ->

Added in balance_with_balance2.sol

aarlt

comment created time in 2 hours