This repo is now consolidated into https://github.com/ensdomains/ens-contracts
ensdomains / dnssec-oracle Goto Github PK
View Code? Open in Web Editor NEWA DNSSEC oracle for Ethereum
License: BSD 2-Clause "Simplified" License
A DNSSEC oracle for Ethereum
License: BSD 2-Clause "Simplified" License
This repo is now consolidated into https://github.com/ensdomains/ens-contracts
Mutation:
File: RRUtils.sol
Line nr: 51
Result: Lived
Original line:
assert(offset < self.length);
Mutated line:
Mutation:
File: algorithms/RSASHA256Algorithm.sol
Line nr: 23
Result: Lived
Original line:
modulus = key.substring(exponentLen + 7, key.length - exponentLen - 7);
Mutated line:
modulus = key.substring(exponentLen + 7, key.length + exponentLen - 7);
Mutation:
File: RRUtils.sol
Line nr: 21
Result: Lived
Original line:
assert(idx < self.length);
Mutated line:
assert(idx <= self.length);
Just noticed that we don't emit any event when a record is deleted. We should add it at some point
Mutation:
File: algorithms/RSASHA1Algorithm.sol
Line nr: 24
Result: Lived
Original line:
modulus = key.substring(exponentLen + 7, key.length - exponentLen - 7);
Mutated line:
modulus = key.substring(exponentLen + 7, key.length - exponentLen + 7);
Mutation:
File: algorithms/RSASHA1Algorithm.sol
Line nr: 24
Result: Lived
Original line:
modulus = key.substring(exponentLen + 7, key.length - exponentLen - 7);
Mutated line:
modulus = key.substring(exponentLen - 7, key.length - exponentLen - 7);
Mutation:
File: RRUtils.sol
Line nr: 21
Result: Lived
Original line:
assert(idx < self.length);
Mutated line:
Mutation:
File: BytesUtils.sol
Line nr: 198
Result: Lived
Original line:
require(len <= 32);
Mutated line:
require(len < 32);
Mutation:
File: Migrations.sol
Line nr: 7
Result: Lived
Original line:
if (msg.sender == owner)
Mutated line:
if (msg.sender != owner)
Mutation:
File: RRUtils.sol
Line nr: 243
Result: Lived
Original line:
require(nextLength <= 32);
Mutated line:
require(nextLength < 32);
Mutation:
File: RRUtils.sol
Line nr: 246
Result: Lived
Original line:
offset += nextLength;
Mutated line:
offset -= nextLength;
Mutation:
File: RRUtils.sol
Line nr: 215
Result: Lived
Original line:
self.digest = data.substring(offset + DS_DIGEST, length - DS_DIGEST);
Mutated line:
self.digest = data.substring(offset + DS_DIGEST, length + DS_DIGEST);
Mutation:
File: BytesUtils.sol
Line nr: 263
Result: Lived
Original line:
for(uint i = 0; i < len; i++) {
Mutated line:
for(uint i = 0; i <= len; i++) {
Mutation:
File: RRUtils.sol
Line nr: 235
Result: Lived
Original line:
self.hashAlgorithm = data.readUint8(offset + NSEC3_HASH_ALGORITHM);
Mutated line:
self.hashAlgorithm = data.readUint8(offset - NSEC3_HASH_ALGORITHM);
...so we can correctly handle IDNA domains.
Mutation:
File: algorithms/EllipticCurve.sol
Line nr: 219
Result: Lived
Original line:
if (t0 == t1) {
Mutated line:
if (t0 != t1) {
Mutation:
File: algorithms/EllipticCurve.sol
Line nr: 219
Result: Lived
Original line:
if (t0 == t1) {
Mutated line:
if (t0 != t1) {
Mutation:
File: algorithms/EllipticCurve.sol
Line nr: 52
Result: Lived
Original line:
if (t1 < 0)
Mutated line:
if (t1 <= 0)
Mutation:
File: algorithms/RSASHA256Algorithm.sol
Line nr: 23
Result: Lived
Original line:
modulus = key.substring(exponentLen + 7, key.length - exponentLen - 7);
Mutated line:
modulus = key.substring(exponentLen + 7, key.length - exponentLen + 7);
Mutation:
File: RRUtils.sol
Line nr: 193
Result: Lived
Original line:
self.flags = data.readUint16(offset + DNSKEY_FLAGS);
Mutated line:
self.flags = data.readUint16(offset - DNSKEY_FLAGS);
Mutation:
File: BytesUtils.sol
Line nr: 199
Result: Lived
Original line:
require(idx + len <= self.length);
Mutated line:
require(idx + len < self.length);
Mutation:
File: RRUtils.sol
Line nr: 273
Result: Lived
Original line:
if (len <= windowByte) {
Mutated line:
if (len < windowByte) {
Mutation:
File: algorithms/EllipticCurve.sol
Line nr: 301
Result: Lived
Original line:
for(uint i = 0; i < exp; i++) {
Mutated line:
for(uint i = 0; i <= exp; i++) {
I have noticed various errors which can occur throughout the dnssec repo. Having an error message with revert
/ require
/ assert
may be fairly beneficial here. Hence I would propose an upgrade to solidity v0.4.23
Mutation:
File: algorithms/EllipticCurve.sol
Line nr: 301
Result: Lived
Original line:
for(uint i = 0; i < exp; i++) {
Mutated line:
for(uint i = 0; i >= exp; i++) {
Mutation:
File: RRUtils.sol
Line nr: 212
Result: Lived
Original line:
self.keytag = data.readUint16(offset + DS_KEY_TAG);
Mutated line:
self.keytag = data.readUint16(offset - DS_KEY_TAG);
Mutation:
File: algorithms/EllipticCurve.sol
Line nr: 38
Result: Lived
Original line:
if (u > m)
Mutated line:
if (u <= m)
Currently travis tests are failing because the test assumes that tx.receipt.status
to retun 0x0
when the transaction reverted while ganache raises exception.
async function verifyFailedSubmission(instance, name, data, sig) {
var name = dns.hexEncodeName(name);
var tx = await instance.submitRRSet(1, name, data, sig);
assert.equal(tx.receipt.status, "0x0");
return tx;
}
The potential solutions are
Mutation:
File: algorithms/RSASHA256Algorithm.sol
Line nr: 23
Result: Lived
Original line:
modulus = key.substring(exponentLen + 7, key.length - exponentLen - 7);
Mutated line:
modulus = key.substring(exponentLen - 7, key.length - exponentLen - 7);
Mutation:
File: BytesUtils.sol
Line nr: 68
Result: Lived
Original line:
mask = ~(2 ** (8 * (32 - shortest + idx)) - 1);
Mutated line:
mask = ~(2 ** (8 * (32 - shortest - idx)) - 1);
Mutation:
File: Migrations.sol
Line nr: 15
Result: Lived
Original line:
function setCompleted(uint completed) public restricted {
Mutated line:
function setCompleted(uint completed) public {
Mutation:
File: RRUtils.sol
Line nr: 241
Result: Lived
Original line:
offset += saltLength;
Mutated line:
offset -= saltLength;
Mutation:
File: BytesUtils.sol
Line nr: 295
Result: Lived
Original line:
revert();
Mutated line:
Mutation:
File: algorithms/EllipticCurve.sol
Line nr: 38
Result: Lived
Original line:
if (u > m)
Mutated line:
if (u >= m)
Cannot migrate imported contracts from this npm module because Truffle artifacts are not included.
I think it would be a good idea to remove build/ folder from .gitignore and add it to the repo.
Mutation:
File: Migrations.sol
Line nr: 7
Result: Lived
Original line:
if (msg.sender == owner)
Mutated line:
if (msg.sender != owner)
Mutation:
File: algorithms/RSASHA1Algorithm.sol
Line nr: 24
Result: Lived
Original line:
modulus = key.substring(exponentLen + 7, key.length - exponentLen - 7);
Mutated line:
modulus = key.substring(exponentLen + 7, key.length + exponentLen - 7);
Mutation:
File: BytesUtils.sol
Line nr: 267
Result: Lived
Original line:
require(decoded <= 0x20);
Mutated line:
require(decoded < 0x20);
Mutation:
File: BytesUtils.sol
Line nr: 265
Result: Lived
Original line:
require(char >= 0x30 && char <= 0x7A);
Mutated line:
require(char >= 0x30 && char < 0x7A);
Mutation:
File: RRUtils.sol
Line nr: 318
Result: Lived
Original line:
counts -= 1;
Mutated line:
counts += 1;
Mutation:
File: Migrations.sol
Line nr: 19
Result: Lived
Original line:
function upgrade(address newAddress) public restricted {
Mutated line:
function upgrade(address newAddress) public {
Truffle v4.1.14 (core: 4.1.14)
Solidity v0.4.24 (solc-js)
69 passing (33s)
1 failing
1) Contract: DNSSEC
should accept real DNSSEC records:
Error: VM Exception while processing transaction: revert
at Object.InvalidResponse (/usr/local/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/errors.js:38:1)
at /usr/local/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/requestmanager.js:86:1
at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-provider/wrapper.js:134:1
at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/httpprovider.js:128:1)
at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:64:1)
at XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:354:1)
at XMLHttpRequest._onHttpResponseEnd (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:509:1)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:469:1)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
Mutation:
File: RRUtils.sol
Line nr: 313
Result: Lived
Original line:
while (counts > 0 && !self.equals(off, other, otheroff)) {
Mutated line:
while (counts >= 0 && !self.equals(off, other, otheroff)) {
Domains using cloudflare dns are only allowed to use ECDSA (which they argue is better).
Would be nice if dnssec-oracle supported Algorithm 13, ECDSA, so we can also use our domains hosted on cloudflare.
Mutation:
File: BytesUtils.sol
Line nr: 55
Result: Lived
Original line:
for (uint idx = 0; idx < shortest; idx += 32) {
Mutated line:
for (uint idx = 0; idx < shortest; idx -= 32) {
Mutation:
File: BytesUtils.sol
Line nr: 199
Result: Lived
Original line:
require(idx + len <= self.length);
Mutated line:
require(idx - len <= self.length);
Mutation:
File: RRUtils.sol
Line nr: 51
Result: Lived
Original line:
assert(offset < self.length);
Mutated line:
assert(offset <= self.length);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.