How can Enigma secret contract prevent someone to see transactions history of a user?

Enigma protocol is a second-layer, off-chain network that aims to solve the two problems for blockchains: scalability and privacy. Enigma is a peer-to-peer network, enabling different parties to jointly store and run computations on data while keeping the data completely private. An external blockchain is utilized as the controller of the network, manages access control and identities, and serves as a tamper-proof log of events. (Enigma website: https://www.media.mit.edu/projects/enigma/overview/) (Enigma blog: https://blog.enigma.co/)

In Enigma blog, there is an article (Link to Article), explaining the secret contract, including an example as follows:

“To give an example of a potential secret contract, imagine a lending dApp that can autonomously give out loans to users. To function, it operates a smart contract that tests each individual’s eligibility by scanning their wallets and prior transactions, then computing if the individual should receive a loan (and if so — how big it should be). For example, it may examine if you asked for loans in the past, and whether you paid them back on time.

With a normal smart contract, a user would need to disclose all of their transactions publicly. This means that everyone would have complete visibility to your finances. Since most users aren’t likely to opt into such a service, the only option left to the dApp provider is to keep the actual computation of eligibility centralized, in order to limit the exposure of the sensitive data to the provider itself. In this hybrid approach the dApp is no longer autonomous or truly decentralized, as it cannot operate without the aid of the provider. The dApp thus retains all of the weaknesses of centralized applications, with few of the advantages.

Instead, in a setting where secret contracts exist, a user can share their transaction history safely with the secret contract itself. The nodes can execute the contract and receive the eligibility result without being able to observe the user’s transactions. There is no longer a need to create a hybrid dApp. This dApp could be autonomous end-to-end, while guaranteeing both correctness — if a user is eligible for a loan, she will get a loan; and privacy — no one but the user can see their transaction history.”

My question is about the following phrases:

(1) “With a normal smart contract, a user would need to disclose all of their transactions publicly”

(2) “Instead, in a setting where secret contracts exist, a user can share their transaction history safely with the secret contract itself. The nodes can execute the contract and receive the eligibility result without being able to observe the user’s transactions.”

From my point of view, a user eventually needs to present himself by using his address (either by normal contract, or by secret contract), by which it is possible for everybody to see all his transactions history using an explorer website.

(1) How can Enigma secret contract prevent someone to see transactions history of a user?

And

(2) How can a user conceal his address and at the same time receive the loan, using secret contract?

Note: Please note that according to an agreement, questions about blockchain is brought up in Bitcoin stack exchange.

Building a history system for a MySQL database

I am working on a CMS platform that interacts with a MySQL database.

I need to write a history system that can show me a snapshot of the database at any given time.

For example, if I have three tables, and I add, edit and delete entries in a timeframe of one week, and then I want to know the state of the platform at a specific date and time from that week, what is the best algorithm/logic that I should implement in the code?

Here is my approach.

Let’s say we have a table called ‘users’:

Id | Name     | Last edit  1  | John Doe | 31-04-2019  2  | Jane Doe | 31-04-2019 

And we make an edit at Id 1:

Id | Name     | Last edit  1  | John Joe | 03-05-2019  2  | Jane Doe | 31-04-2019 

Which triggers this entry in another table (history) that tracks changes:

Id | Table | Action | Old value | New value | Date  1 | users | edit | "1, John Doe, 31-04-2019" | "1, John Joe, 03-05-2019" | 03-05-2019 

If I were to request the data stored at 02-05-2019 for example, processing the ‘history’ table should get me the data stored at that point in time, right? (which looks exactly like the data from the first table).

Do I have to expect performance issues if the ‘history’ table reaches thousands or more entries?

Some tech specs: Frontend: JavaScript + jQuery. Backend: PHP + MySQL.

Building a robust history system

I am working on a CMS platform that has many modules, each module has options to modify entries in a database.

I need to write a history system that can show me a snapshot of the database at any given time.

For example, if I have three tables, and I add, edit and delete entries in a timeframe of one week, and then I want to know the state of the platform at a specific date and time from that week. What is the best algorithm/logic that I should implement in the code?

I have some requirements:

  • there should be no error in displaying data;
  • storing each action in the database is not an option, as there will be millions of actions a day (the storage space can be an issue);
  • I would prefer not to use a framework, but to implement the algorithms myself.

Some tech specs: Frontend: HTML, CSS, JavaScript, Bootstrap, jQuery. Backend: PHP + MySQL.

Any suggestions or links to technical papers or best practices are welcome.

Thank you.

Education history in DS160

my parents are part of group from India of people above 50 years who are travelling for the purpose of religious ceremony to USA. They have obtained a invitation letter from the temple. Now , they all have provided only their latest graduation details in ds160 ? Is it compulsory to give high school , senior school etc details also? Will it create issues at the interview? Group appointment has already been scheduled and confirmed. Thanks

History of transactions in Lighting Network

I’m just a beginner in lighting network. Have some questions about transactions in LN when im doing the research

  1. Transactions in LN are off-chain, so transactions couldn’t be stored in main-chain, so how could you look-up the transactions history?
  2. Payment channel is private for someone outside, and if there is no transaction history, how do i give the information to others to proof that I’ve just made a payment in LN.

Any helps, tks

How should I integrate routine history tracking feature with the routine itself

Let’s say I am writing code to run a machine similar to a 3D printer and I have a routine like:

machine.moveTo(x1, y1); machine.alignByCamera(); machine.heatUp(); machine.extrude(amount1); machine.moveTo(x2, y2); machine.extrude(amount2); 

I want to add a new optional feature to keep track of process history. Let’s say I want to keep temperature, shots from camera, coordinate values after alignment. So my new code looks like this:

machine.moveTo(x1, y1); historyTracker.takeInitialPhoto();  historyTracker.recordLocationBeforeAligment(machine.x, machine.y); machine.alignByCamera(); historyTracker.recordLocationAfterAlignment(machine.x, machine.y);  historyTracker.recordTemperatureBeforeHeatup(machine.temperature); machine.heatUp(); historyTracker.recordTemperatureAfterHeatup(machine.temperature);  machine.extrude(amount1); machine.moveTo(x2, y2); machine.extrude(amount2); historyTracker.takeFinalPhoto(); 

As you can see code becomes much uglier. I even haven’t not made it an optional feature yet. Let’s make it optional:

machine.moveTo(x1, y1); if(historyEnabled)      historyTracker.takeInitialPhoto();  if(historyEnabled)     historyTracker.recordLocationBeforeAligment(machine.x, machine.y); machine.alignByCamera(); if(historyEnabled)      historyTracker.recordLocationAfterAlignment(machine.x, machine.y);  if(historyEnabled)     historyTracker.recordTemperatureBeforeHeatup(machine.temperature); machine.heatUp(); if(historyEnabled)      historyTracker.recordTemperatureAfterHeatup(machine.temperature);  machine.extrude(amount1); machine.moveTo(x2, y2); machine.extrude(amount2); if(historyEnabled)     historyTracker.takeFinalPhoto(); 

So my question is, how can I decouple history tracking feature from the routine itself if it is possible. Otherwise how can I improve my code. Is there a better way(design pattern maybe) to approach this problem.

Is it possible to show the Version History of a Google Doc inside the actual document?

I’d like to get rid of the usual “Revision history” table on my several company-wide Google Documents.

Even when the “Version history” works perfectly and I can even make named revisions etc, I’d like to see that very list inside the document (usually placed before the table of contents), without having to click the revision link at the right of the Help button.

Is there anything I could do to retrieve/paste that dynamic information the same way as it’s possible to insert page numbers, page count, etc?

Thanks in advance!

Old phones still apear in location history

I have a new device and I wanted to switch my location history from the old one to the new. In the location history (timeline) settings page, under “Devices on this account” it only shows 3 of my devices (not sure based on what), but not the new one.
So I went to check my Recently used devices and removed the old devices from my account. After about a week or so, I still don’t see my new device to set up the location history, as I keep seeing 3 old devices I already removed from the account. When is the device list finally going to update? Why does Google choose to only show 3 devices?

And most importantly: is there anything I can do to force a device to show up there (or force a refresh of that list)?