Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
7667afc
CI (zellic-audit): run semantic tests with optimizer on for 200 runs …
cdrappi Jan 16, 2026
bca3310
Fix: in UnusedStorageEliminator, CSTORE is indeed a valid storage wri…
cdrappi Jan 16, 2026
dd83ecc
Test: GasMeter should know CLOAD/CSTORE's fix gas costs (#109)
cdrappi Jan 16, 2026
9165989
Fix: GasMeter should handle CLOAD/CSTORE operations (#104)
cdrappi Jan 16, 2026
15ddfef
Failing tests: CSE applies across confidential domain to remove sload…
cdrappi Jan 20, 2026
88bb1dc
Fix: CSE applies across confidential domain to remove sload from a pr…
cdrappi Jan 20, 2026
5c75476
fix: GenericStorageItem::setToZero should check all shielded types (#…
cdrappi Jan 20, 2026
12b94de
fix: `saddress[]` should not be implicitly convertible to `address[]`…
cdrappi Jan 21, 2026
44c01f2
fix(tstore): transient s-types should use tstore/tload (#124)
cdrappi Jan 21, 2026
8cea3d1
fix: --via-ir pipeline should support ShieldedFixedBytes (#125)
cdrappi Jan 21, 2026
1ef32a1
test: add failing test for shielded array deletion
cdrappi Jan 22, 2026
4e35d34
fix: ArrayUtils::clearArray should use CSTORE for shielded arrays
cdrappi Jan 22, 2026
6c1bb1a
test: add tests for shielded types return visibility
samlaf Jan 20, 2026
b30f6b5
test: fix semantic tests
samlaf Jan 21, 2026
fd48956
fix(visibility): prevent returning any shielded type in public/extern…
samlaf Jan 20, 2026
4cfbda5
test: update tests that check disallowing implicit conversion of sadd…
cdrappi Jan 22, 2026
c55e60e
test: update sstore then cload test expectations to reflect new seman…
cdrappi Jan 26, 2026
99ae5ec
test: add yul, syntax & semantic tests for timestamp_seconds/timestam…
cdrappi Jan 26, 2026
05f3c98
fix: --via-ir pipeline should support magic block.timestamp_ms and .t…
cdrappi Jan 26, 2026
09a15ad
test: add EVM version gate test for timestampms instruction
cdrappi Jan 26, 2026
3d15507
fix: gate TIMESTAMPMS opcode to Mercury-compatible VMs
cdrappi Jan 26, 2026
8a2c390
ci(speedup): cache more steps in the solidity build (#140)
cdrappi Jan 26, 2026
8a3ceca
ci(speedup): only reconfigure cmake if something has changed (#143)
cdrappi Jan 27, 2026
9a9374c
test: expect evm version gating for block.timestamp_ms at the Solidit…
cdrappi Jan 26, 2026
dc937a7
fix: gate block.timestamp_ms and block.timestamp_seconds in TypeChecker
cdrappi Jan 26, 2026
a6dc900
test: add SMT test for block.timestamp_seconds aliasing bug
cdrappi Jan 27, 2026
59a4195
fix: alias block.timestamp_seconds to block.timestamp in SMT model
cdrappi Jan 27, 2026
2fca444
ci: don't run CI on PRs to seismic branch in the zellic-audit branch
cdrappi Jan 27, 2026
6c84c4a
ci: remove double apt-get; print ccache stats (#145)
cdrappi Jan 27, 2026
ad883e1
feat(analysis): add shielded storage opcode semantics to type-checker…
samlaf Jan 26, 2026
bf5a8b8
delete cstore->cload sem test (is now syntax test)
samlaf Jan 27, 2026
8fb3c2a
fix(optimiser): cstore shouldn't be eliminated when followed by sstor…
cdrappi Jan 27, 2026
798e2fd
fix(yul-optimiser): dont hoist sloads since they can revert (#151)
samlaf Feb 2, 2026
5f21e45
fix(evmasm-optimiser): mark sload as having effects (#148)
samlaf Feb 3, 2026
62bccfa
test(yul): add tests for timestampms identifier reservation
cdrappi Feb 3, 2026
bc34366
fix(yul): add timestampms to reserved identifier exceptions for pre-M…
cdrappi Feb 3, 2026
5bc3ba7
test(codegen): add tests for string literal to sbytes conversion
cdrappi Feb 3, 2026
0c8d7a2
fix(codegen): support string literal to ShieldedFixedBytes conversion
cdrappi Feb 3, 2026
37d3bd7
test(types): add tests for disallowed saddress member access
cdrappi Feb 3, 2026
7d5cccc
fix(types): restrict saddress members to code and codehash only
cdrappi Feb 3, 2026
473efad
test(codegen): add tests for UDT wrapping shielded primitives
cdrappi Feb 3, 2026
5fbd4d4
fix(codegen): support shielded primitives in user-defined types
cdrappi Feb 3, 2026
f85a66a
test: add regression tests for shielded array storage operations
cdrappi Jan 22, 2026
5354fc5
test(codegen): add regression tests for shielded storage bugs
cdrappi Feb 3, 2026
85f62ae
fix: use cstore/cload for shielded array storage operations
cdrappi Jan 22, 2026
7e6593e
fix(codegen): complete shielded storage opcode fixes for VER-771
cdrappi Feb 3, 2026
d4ca185
test(types): add regression tests for UDVT shielded mapping keys
cdrappi Feb 5, 2026
3a3fbf9
test(codegen): add regression tests for address/saddress to enum conv…
cdrappi Feb 5, 2026
6847fe7
fix(codegen): correct enum conversion guard for address/saddress types
cdrappi Feb 5, 2026
959c4a3
test(codegen): add regression tests for bytes/string push bug
cdrappi Feb 5, 2026
491cec4
test(codegen): add syntax test for byte array helpers with non-shield…
cdrappi Feb 5, 2026
545ed83
fix(codegen): check base type instead of array category for shielded …
cdrappi Feb 5, 2026
5bde633
test(analysis): add syntax tests for shielded types in ABI encoding
cdrappi Feb 5, 2026
3c90140
fix(analysis): reject shielded types in ABI encoding and decoding
cdrappi Feb 5, 2026
a671413
fix(codegen): incorrect store/load instruction when copying (unimplem…
cdrappi Feb 6, 2026
1199286
test(codegen): add regression tests for struct delete with mixed shie…
cdrappi Feb 6, 2026
f6e0052
fix(codegen): use sstore for sub-32-byte fields in struct delete clear
cdrappi Feb 6, 2026
b9d9867
test(analysis): add regression tests for mismatched privacy opcodes
cdrappi Feb 6, 2026
70b588d
test(ir): disable tests that require --via-ir
cdrappi Feb 6, 2026
fe61bfe
ci(ir): use --skip-via-ir for semantic tests until via-ir is re-enabled
cdrappi Feb 6, 2026
e4f327d
chore(ir): disable compiling with --via-ir pipeline until we fully su…
cdrappi Feb 6, 2026
fa9ee13
test(types): expect suint length for dynamic shielded arrays
cdrappi Feb 6, 2026
80b21a5
fix(types): use cload/cstore for dynamic shielded array length
cdrappi Feb 6, 2026
4b3ab63
test(analysis): expect shielded literal leak warnings in non-declarat…
cdrappi Feb 13, 2026
41c9237
fix(analysis): warn on shielded literal conversions in all contexts
cdrappi Feb 13, 2026
4510920
test(types): update existing tests for sbytes dynamic byte array
cdrappi Feb 13, 2026
9fd78c5
test(types): add sbytes dynamic shielded byte array tests
cdrappi Feb 13, 2026
040d93d
fix(codegen): implement sbytes and fix cstore/cload codegen bugs
cdrappi Feb 13, 2026
5392766
docs(types): document sbytes dynamic shielded bytes support
cdrappi Feb 13, 2026
848e611
ci(semantic-tests): add via-IR test runs with --unsafe-via-ir
cdrappi Feb 14, 2026
a2480c2
test(via-ir): update test configuration for via-IR compatibility
cdrappi Feb 14, 2026
46942cf
test(via-ir): add regression tests with compileViaYul:also
cdrappi Feb 14, 2026
4a228e7
fix(via-ir): complete shielded type support for via-IR pipeline
cdrappi Feb 14, 2026
d2b8c08
Merge veridise-audit into merge-audits-final
cdrappi Feb 14, 2026
d029186
Merge zellic-audit into merge-audits-final
cdrappi Feb 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ on:
push:
branches:
- seismic
- veridise-audit
- merge-audits-final
pull_request:
branches:
# NOTE: seismic temporarily removed to avoid duplicate builds from veridise-audit→seismic PR.
# Re-enable after veridise-audit merges to seismic.
# - seismic
- veridise-audit
- seismic
- merge-audits-final

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
1 change: 1 addition & 0 deletions liblangutil/EVMVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ bool EVMVersion::hasOpcode(Instruction _opcode, std::optional<uint8_t> _eofVersi
return supportsTransientStorage();
case Instruction::CLOAD:
case Instruction::CSTORE:
case Instruction::TIMESTAMPMS:
return supportShieldedStorage() && !_eofVersion.has_value();
// Instructions below are deprecated in EOF
case Instruction::CALL:
Expand Down
1 change: 1 addition & 0 deletions liblangutil/EVMVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ class EVMVersion
bool hasMcopy() const { return *this >= cancun(); }
bool supportsTransientStorage() const { return *this >= cancun(); }
bool supportShieldedStorage() const { return *this >= mercury(); }
bool hasTimestampMs() const { return *this >= mercury(); }
bool supportsEOF() const { return *this >= firstWithEOF(); }

bool hasOpcode(evmasm::Instruction _opcode, std::optional<uint8_t> _eofVersion) const;
Expand Down
12 changes: 12 additions & 0 deletions libsolidity/analysis/TypeChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3718,6 +3718,18 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)
_memberAccess.location(),
"Since the VM version paris, \"difficulty\" was replaced by \"prevrandao\", which now returns a random number based on the beacon chain."
);
else if (memberName == "timestamp_ms" && !m_evmVersion.hasTimestampMs())
m_errorReporter.typeError(
4521_error,
_memberAccess.location(),
"\"timestamp_ms\" is not supported by the VM version."
);
else if (memberName == "timestamp_seconds" && !m_evmVersion.hasTimestampMs())
m_errorReporter.typeError(
8743_error,
_memberAccess.location(),
"\"timestamp_seconds\" is not supported by the VM version."
);
}
}

Expand Down
2 changes: 1 addition & 1 deletion libsolidity/codegen/CompilerUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ void CompilerUtils::convertType(
}
else if (targetTypeCategory == Type::Category::Enum)
{
solAssert((stackTypeCategory != Type::Category::Address || stackTypeCategory != Type::Category::ShieldedAddress), "Invalid conversion to EnumType requested.");
solAssert((stackTypeCategory != Type::Category::Address && stackTypeCategory != Type::Category::ShieldedAddress), "Invalid conversion to EnumType requested.");
solAssert(_typeOnStack.mobileType());
// just clean
convertType(_typeOnStack, *_typeOnStack.mobileType(), true);
Expand Down
2 changes: 2 additions & 0 deletions libsolidity/formal/Predicate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ std::string Predicate::formatSummaryCall(
// TODO remove this for 0.9.0
if (magicKind == MagicType::Kind::Block && memberName == "difficulty")
memberName = "prevrandao";
if (magicKind == MagicType::Kind::Block && memberName == "timestamp_seconds")
memberName = "timestamp";

if (magicKind == MagicType::Kind::Block || magicKind == MagicType::Kind::Message || magicKind == MagicType::Kind::Transaction)
txVars.insert(magicType->toString(true) + "." + memberName);
Expand Down
9 changes: 8 additions & 1 deletion libsolidity/formal/SMTEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1420,13 +1420,20 @@ bool SMTEncoder::visit(MemberAccess const& _memberAccess)
// TODO remove this for 0.9.0
if (name == "block" && memberName == "difficulty")
memberName = "prevrandao";
if (name == "block" && memberName == "timestamp_seconds")
memberName = "timestamp";

defineExpr(_memberAccess, state().txMember(name + "." + memberName));
}
else if (auto magicType = dynamic_cast<MagicType const*>(exprType))
{
if (magicType->kind() == MagicType::Kind::Block)
defineExpr(_memberAccess, state().txMember("block." + _memberAccess.memberName()));
{
auto memberName = _memberAccess.memberName();
if (memberName == "timestamp_seconds")
memberName = "timestamp";
defineExpr(_memberAccess, state().txMember("block." + memberName));
}
else if (magicType->kind() == MagicType::Kind::Message)
defineExpr(_memberAccess, state().txMember("msg." + _memberAccess.memberName()));
else if (magicType->kind() == MagicType::Kind::Transaction)
Expand Down
1 change: 0 additions & 1 deletion libsolidity/formal/SymbolicState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ smtutil::Expression SymbolicState::txTypeConstraints() const
smt::symbolicUnknownConstraints(m_tx.member("block.number"), TypeProvider::uint256()) &&
smt::symbolicUnknownConstraints(m_tx.member("block.timestamp"), TypeProvider::uint256()) &&
smt::symbolicUnknownConstraints(m_tx.member("block.timestamp_ms"), TypeProvider::uint256()) &&
smt::symbolicUnknownConstraints(m_tx.member("block.timestamp_seconds"), TypeProvider::uint256()) &&
smt::symbolicUnknownConstraints(m_tx.member("msg.sender"), TypeProvider::address()) &&
smt::symbolicUnknownConstraints(m_tx.member("msg.value"), TypeProvider::uint256()) &&
smt::symbolicUnknownConstraints(m_tx.member("tx.origin"), TypeProvider::address()) &&
Expand Down
1 change: 0 additions & 1 deletion libsolidity/formal/SymbolicTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,6 @@ std::map<std::string, frontend::Type const*> transactionMemberTypes()
{"block.number", TypeProvider::uint256()},
{"block.timestamp", TypeProvider::uint256()},
{"block.timestamp_ms", TypeProvider::uint256()},
{"block.timestamp_seconds", TypeProvider::uint256()},
{"blobhash", TypeProvider::array(DataLocation::Memory, TypeProvider::uint256())},
{"blockhash", TypeProvider::array(DataLocation::Memory, TypeProvider::uint256())},
{"msg.data", TypeProvider::bytesCalldata()},
Expand Down
2 changes: 1 addition & 1 deletion libyul/AsmAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ bool AsmAnalyzer::validateInstructions(evmasm::Instruction _instr, SourceLocatio
errorForVM(7755_error, "only available for Cancun-compatible");
else if ((_instr == evmasm::Instruction::TSTORE || _instr == evmasm::Instruction::TLOAD) && !m_evmVersion.supportsTransientStorage())
errorForVM(6243_error, "only available for Cancun-compatible");
else if ((_instr == evmasm::Instruction::CLOAD || _instr == evmasm::Instruction::CSTORE) && !m_evmVersion.supportShieldedStorage())
else if ((_instr == evmasm::Instruction::CLOAD || _instr == evmasm::Instruction::CSTORE || _instr == evmasm::Instruction::TIMESTAMPMS) && !m_evmVersion.supportShieldedStorage())
errorForVM(6245_error, "only available for Mercury-compatible");
else if (_instr == evmasm::Instruction::PC)
m_errorReporter.error(
Expand Down
2 changes: 1 addition & 1 deletion libyul/backends/evm/EVMDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ std::set<std::string, std::less<>> createReservedIdentifiers(langutil::EVMVersio
{
return
_evmVersion < langutil::EVMVersion::mercury() &&
(_instr == evmasm::Instruction::CSTORE || _instr == evmasm::Instruction::CLOAD);
(_instr == evmasm::Instruction::CSTORE || _instr == evmasm::Instruction::CLOAD || _instr == evmasm::Instruction::TIMESTAMPMS);
};

auto eofIdentifiersException = [&](evmasm::Instruction _instr) -> bool
Expand Down
1 change: 1 addition & 0 deletions test/cmdlineTests/shielded_sbytes16_via_ir/args
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--asm --via-ir
9 changes: 9 additions & 0 deletions test/cmdlineTests/shielded_sbytes16_via_ir/input.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;

contract C {
sbytes16 data;
function test() external {
data = sbytes16(0);
}
}
231 changes: 231 additions & 0 deletions test/cmdlineTests/shielded_sbytes16_via_ir/output
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
Warning: This is a pre-release compiler version, please do not use it in production.


======= shielded_sbytes16_via_ir/input.sol:C =======
EVM assembly:
/* "shielded_sbytes16_via_ir/input.sol":60:158 contract C {... */
mstore(0x40, 0x80)
jumpi(tag_3, callvalue)
tag_5
tag_1
jump // in
tag_5:
dataSize(sub_0)
dataOffset(sub_0)
dup3
codecopy
dataSize(sub_0)
swap1
return
tag_3:
tag_2
jump // in
tag_1:
mload(0x40)
swap1
jump // out
tag_2:
0x00
dup1
revert
stop

sub_0: assembly {
/* "shielded_sbytes16_via_ir/input.sol":60:158 contract C {... */
mstore(0x40, 0x80)
jumpi(tag_20, iszero(lt(calldatasize, 0x04)))
tag_21:
tag_8
jump // in
tag_20:
tag_22
calldataload(0x00)
tag_1
jump // in
tag_22:
0xf8a8fd6d
sub
tag_21
jumpi
tag_7
jump // in
tag_1:
0xe0
shr
swap1
jump // out
tag_2:
mload(0x40)
swap1
jump // out
tag_3:
0x00
dup1
revert
tag_4:
0x00
dup1
revert
tag_5:
0x00
swap2
sub
slt
tag_25
jumpi
jump // out
tag_25:
tag_4
jump // in
tag_6:
0x00
add
swap1
jump // out
tag_7:
jumpi(tag_27, callvalue)
tag_29
calldatasize
0x04
tag_5
jump // in
tag_29:
tag_30
tag_19
jump // in
tag_30:
tag_31
tag_2
jump // in
tag_31:
dup1
tag_32
dup2
tag_6
jump // in
tag_32:
sub
swap1
return
tag_27:
tag_3
jump // in
tag_8:
0x00
dup1
revert
tag_9:
swap1
jump // out
tag_10:
not(0xffffffffffffffffffffffffffffffff)
and
swap1
jump // out
tag_11:
0x80
shl
swap1
jump // out
tag_12:
tag_33
tag_34
tag_35
swap3
tag_9
jump // in
tag_34:
tag_11
jump // in
tag_33:
tag_10
jump // in
tag_35:
swap1
jump // out
tag_13:
0x00
shl
swap1
jump // out
tag_14:
swap1
tag_36
not(0x00)
swap2
tag_13
jump // in
tag_36:
swap2
dup2
not
and
swap2
and
or
swap1
jump // out
tag_15:
tag_37
swap1
tag_10
jump // in
tag_37:
swap1
jump // out
tag_16:
0x00
shr
swap1
jump // out
tag_17:
tag_38
swap1
tag_16
jump // in
tag_38:
swap1
jump // out
tag_18:
swap1
tag_39
tag_40
tag_41
swap3
tag_15
jump // in
tag_40:
tag_17
jump // in
tag_39:
dup3
cload
tag_14
jump // in
tag_41:
swap1
cstore
jump // out
/* "shielded_sbytes16_via_ir/input.sol":96:156 function test() external {... */
tag_19:
/* "shielded_sbytes16_via_ir/input.sol":131:149 data = sbytes16(0) */
tag_42
/* "shielded_sbytes16_via_ir/input.sol":138:149 sbytes16(0) */
tag_43
/* "shielded_sbytes16_via_ir/input.sol":147:148 0 */
0x00
/* "shielded_sbytes16_via_ir/input.sol":138:149 sbytes16(0) */
tag_12
jump // in
tag_43:
/* "shielded_sbytes16_via_ir/input.sol":131:149 data = sbytes16(0) */
0x00
tag_18
jump // in
tag_42:
/* "shielded_sbytes16_via_ir/input.sol":96:156 function test() external {... */
jump // out

auxdata: 0xa264697066735822122037b55db07a67fb1a37064c30080d17923eabae62f0cdd6d344db02a833c23ccb64736f6c63782c302e382e33312d646576656c6f702e323032362e312e32312b636f6d6d69742e38346365363530622e6d6f64005d
}

1 change: 1 addition & 0 deletions test/cmdlineTests/shielded_sbytes1_via_ir/args
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--asm --via-ir
9 changes: 9 additions & 0 deletions test/cmdlineTests/shielded_sbytes1_via_ir/input.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;

contract C {
sbytes1 data;
function test() external {
data = sbytes1(0);
}
}
Loading
Loading