Uvicorn & Gunicorn
Uvicorn and GunicornUvicorn and Gunicorn are important concepts when developing applications in Python. However, there are many concepts to be aware of in order to fully understand Uvicorn and Gunicorn. The following is a brief summary of the necessary concepts, and the details will be dealt with separately later.Necessary ConceptsStarletteStarlette is a Web application server that can run asynchronously. Starlette runs on top of Uvicorn.FastAPIFastAPI provides many features on top of Starlet...
Gas optimization in Solidity, Ethereum
I’m sorry but my English is terrible. I hope you understand that generously.Recently, I was developing a toy project named Blind Market. It’s a simple P2P trading application using smart contract. I was making a contract using Solidity, and the trade stage proceeded in the order of pending, shipping, and done. The problem was appeared in done phase. The problem was that when I tried to close the transaction by paying the price raised by the seller in msg.value, the following error occurred.Pe...
P2WPKH
P2WPKHP2WPKH란 비트코인 내에서 가장 일반적인 스크립트 형식으로 비트코인 프로토콜에 대한 지불 거래 유형이다. 주소는 1로 시작하는데, 세그윗을 지원하는 새로운 주소 3 또는 bc1로 시작하는 주소보다 훨씬 비싸다. https://mirror.xyz/0xA1d9f681B25C14C1eE7B87f1CF102E73cA3ad4d9/egjhNVklgy_LgZmcTXXAOTBa6ePBqO3Ja9ZSoDIad-8 즉, 비트코인 주소가 1로 시작하면 P2PKH 주소를 사용하고 있는 것이다. 공개키의 간단한 해시이며, 이 해시를 주소로 사용하는 것이다. 이것은 원래 비트코인 주소 형식이었으며 오늘까지도 충실히 작동한다. 레거시 주소는 세그윗과 호환되지 않지만, 여전히 문제없이 P2PKH 주소에서 세그윗 주소로 BTC를 보낼 수 있다. 그러나 레거시 주소 트랜잭션이 더 크기 때문에 P2PKH 주소에서 전송하는 평균 속도는 세그윗 주소에서 전송할 때보다 더 높은 요금이 발생할 수 있다....
<100 subscribers
Uvicorn & Gunicorn
Uvicorn and GunicornUvicorn and Gunicorn are important concepts when developing applications in Python. However, there are many concepts to be aware of in order to fully understand Uvicorn and Gunicorn. The following is a brief summary of the necessary concepts, and the details will be dealt with separately later.Necessary ConceptsStarletteStarlette is a Web application server that can run asynchronously. Starlette runs on top of Uvicorn.FastAPIFastAPI provides many features on top of Starlet...
Gas optimization in Solidity, Ethereum
I’m sorry but my English is terrible. I hope you understand that generously.Recently, I was developing a toy project named Blind Market. It’s a simple P2P trading application using smart contract. I was making a contract using Solidity, and the trade stage proceeded in the order of pending, shipping, and done. The problem was appeared in done phase. The problem was that when I tried to close the transaction by paying the price raised by the seller in msg.value, the following error occurred.Pe...
P2WPKH
P2WPKHP2WPKH란 비트코인 내에서 가장 일반적인 스크립트 형식으로 비트코인 프로토콜에 대한 지불 거래 유형이다. 주소는 1로 시작하는데, 세그윗을 지원하는 새로운 주소 3 또는 bc1로 시작하는 주소보다 훨씬 비싸다. https://mirror.xyz/0xA1d9f681B25C14C1eE7B87f1CF102E73cA3ad4d9/egjhNVklgy_LgZmcTXXAOTBa6ePBqO3Ja9ZSoDIad-8 즉, 비트코인 주소가 1로 시작하면 P2PKH 주소를 사용하고 있는 것이다. 공개키의 간단한 해시이며, 이 해시를 주소로 사용하는 것이다. 이것은 원래 비트코인 주소 형식이었으며 오늘까지도 충실히 작동한다. 레거시 주소는 세그윗과 호환되지 않지만, 여전히 문제없이 P2PKH 주소에서 세그윗 주소로 BTC를 보낼 수 있다. 그러나 레거시 주소 트랜잭션이 더 크기 때문에 P2PKH 주소에서 전송하는 평균 속도는 세그윗 주소에서 전송할 때보다 더 높은 요금이 발생할 수 있다....
Share Dialog
Share Dialog
Upgradeable is literally upgradeable.
The smart contract on the blockchain cannot be changed. That is the core and advantage of the contract implemented in code.
However, it is not just good that the code cannot be changed. (especially to developers)
Any program can have a bug. Either it's trivial, or it's fatal.
The point is code is written by a developer. It can eventually cause errors because it is written by a human.
If a bug is found while the service is already being deployed and in progress, it will be very difficult problem.
In particular, in decentralized Web3 Dapp, it is the same level as forced termination of the servi
To solve these problems, an Upgradeable Contract appears.
To upgrade an unchangeable smart contract, use the Proxy pattern.
A schematic diagram of the Proxy pattern is as follows.

The user (client) sends a request to the Proxy contract.
Proxy Contract delivers the request to a contract containing the actual implementation and logic.
The important concept is, after all, the two sentences right above.
If a function needs to be added to the contract, or if issues and bugs are found in the function, we don't have to fix the Proxy contract.
In other words, the client only needs to call as usual, and only changes the implementation contract address and sets it to the Proxy contract.
It's like using an interface, the calling partial code doesn't change, but only the internal implementation.
We know the concept, but what is the implementation? First of all, there's a proposition here.
Even if a function of another contract is called, it affects the storage of the contract which is called, but does not affect the storage of the contract which called another.
In other words, even if you call a contract containing logic through Proxy contract, only the data of the contract containing logic changes
The data in the Proxy contract does not change.
For this magic, Solidity uses a friend named delegatecall and call.
Call and degatecall correspond to opcode (machine language), not functions.
Internally, Solidity uses call and degatecall when calling other contracts.
Call is the opcode we usually use to call a contract.
Delegatecall uses code from other contracts, but the execution environment allows it to be performed on existing contracts.

When Contract A calls Contract B, when using Contract B, if it uses Contract B's code, it changes Contract A's Storage.
Upgradeable is literally upgradeable.
The smart contract on the blockchain cannot be changed. That is the core and advantage of the contract implemented in code.
However, it is not just good that the code cannot be changed. (especially to developers)
Any program can have a bug. Either it's trivial, or it's fatal.
The point is code is written by a developer. It can eventually cause errors because it is written by a human.
If a bug is found while the service is already being deployed and in progress, it will be very difficult problem.
In particular, in decentralized Web3 Dapp, it is the same level as forced termination of the servi
To solve these problems, an Upgradeable Contract appears.
To upgrade an unchangeable smart contract, use the Proxy pattern.
A schematic diagram of the Proxy pattern is as follows.

The user (client) sends a request to the Proxy contract.
Proxy Contract delivers the request to a contract containing the actual implementation and logic.
The important concept is, after all, the two sentences right above.
If a function needs to be added to the contract, or if issues and bugs are found in the function, we don't have to fix the Proxy contract.
In other words, the client only needs to call as usual, and only changes the implementation contract address and sets it to the Proxy contract.
It's like using an interface, the calling partial code doesn't change, but only the internal implementation.
We know the concept, but what is the implementation? First of all, there's a proposition here.
Even if a function of another contract is called, it affects the storage of the contract which is called, but does not affect the storage of the contract which called another.
In other words, even if you call a contract containing logic through Proxy contract, only the data of the contract containing logic changes
The data in the Proxy contract does not change.
For this magic, Solidity uses a friend named delegatecall and call.
Call and degatecall correspond to opcode (machine language), not functions.
Internally, Solidity uses call and degatecall when calling other contracts.
Call is the opcode we usually use to call a contract.
Delegatecall uses code from other contracts, but the execution environment allows it to be performed on existing contracts.

When Contract A calls Contract B, when using Contract B, if it uses Contract B's code, it changes Contract A's Storage.
No comments yet