Skip to content

Instantly share code, notes, and snippets.

View kariy's full-sized avatar
🚙
my back hurts

Ammar Arif kariy

🚙
my back hurts
View GitHub Profile
@kariy
kariy / background-assigment.md
Last active May 1, 2022 20:51
ZK University

A. Conceptual Knowledge

1. What is a smart contract? How are they deployed? You should be able to describe how a smart contract is deployed and the necessary steps.

Smart contract is essentially a piece of code or a program that resides in the blockchain. These contracts can be called directly by an external user or through other smart contracts. Smart contracts are primarily written in Solidity and must be compiled to its bytecode equivalent that can be understood by the EVM. To deploy the contract, a transaction must be made to the blockchain with the transaction’s receiver being the zero address. The bytecode is then appended to the transaction’s data field. The bytecode used in the process of a new contract deployment is referred to as the creation bytecode. Transaction with zero address as its receiver will be understood by the EVM as a contract creation transaction.

2. What is gas? Why is gas optimization such a big focus when building smart contracts?

Gas is a mechanism use

@kariy
kariy / 🦀-resources.md
Last active August 7, 2023 05:50
Some cool resources I found to help me learn about the offical programming language of the furries and fembois (pick your side!)

ZERO-KNOWLEDGE PROOF

🪅 General

[Recommended] Why and How zk-SNARK Works: Definitive Explanation

This paper aims to explain zk-SNARK construction in a simple and accessible way, using examples and answering common questions. Its contribution is a gradual increase in complexity to help readers understand without prior knowledge of cryptography or advanced math. The paper not only explains how zk-SNARK works, but also why it works and how it was developed.

  1. Introduction to ZK
  2. [MIT IAP 2023] Modern Zero Knowledge Cryptography
  3. Curated resources for ZK stuff by Ingonyama
@kariy
kariy / til-database-ed.md
Last active May 30, 2024 05:13
today i learn - database edition

MacOS (OSX)'s fsync() doesn't exactly guarantee data is flushed straight away to the permanent storage

According to the manpage for fsync in OSX:

Note that while fsync() will flush all data from the host to the drive (i.e. the "permanent storage device"), the drive itself may not physically write the data to the platters for quite some time and it may be written in an out-of-order sequence.

Specifically, if the drive loses power or the OS crashes, the application may find that only some or none of their data was written. The disk drive may also re-order the data so that later writes may be present, while earlier writes are not.