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
URL๊ณผ URI์ ๋ํ ์๊ธฐ๊ฐ ๋์์ ๋ ์ง์ฅ๋๋ฃ๊ฐ โํ๋๋ ์๋ณ์๊ณ ํ๋๋ ์๋๋คโ ๋ผ๋ ์๊ธฐ๋ฅผ ํ๋๋ฐ, ์์ผ๋ก โ๊ทธ๋ ๊ฒ ์ฝ๊ฒ ํํํ๋ค๋, ๋๋จํ๋ฐ?โ ๋ผ๊ณ ์๊ฐํ๋ค.
๊ฐ์ธ์ ์ผ๋ก ์ข ๋ ์ดํด๋๋ฅผ ๋์ด๊ณ ์ ๊ธ๋ก ๋จ๊ธฐ๋ ค๊ณ ํ๋ค.
URI์ ๋ํด ๊ฒ์ํด๋ณด๋ฉด ๋ค์๊ณผ ๊ฐ์ ์ค๋ช ๋ค์ด ์ญ ๋์จ๋ค.
์ธํฐ๋ท์ ์๋ ์์์ ๋ํ๋ด๋ ์ ์ผํ ์ฃผ์์ด๋ค.
์น ๊ธฐ์ ์์ ์ฌ์ฉํ๋ ๋ ผ๋ฆฌ์ ๋๋ ๋ฌผ๋ฆฌ์ ๋ฆฌ์์ค๋ฅผ ์๋ณํ๋ ๊ณ ์ ํ ๋ฌธ์์ด ์ํ์ค๋ค.
URI์ ํ์ ๊ฐ๋ ์ผ๋ก URL๊ณผ URN์ด ์๋ค.
์ด๋ค ํ์์ด ์๋ค๊ธฐ ๋ณด๋ค๋ ํน์ ์์์ ์๋ณํ๋ ๋ฌธ์์ด์ ์๋ฏธํ๋ค.
๊ตฌ๊ตฌ์ ์ ๋ง ๋ค์ด ๋ง์๋ฐ, ๋จ์ด๋ฅผ ๋ฏ์ด๋ณด๋ฉด ์ฝ๊ฒ ์ดํดํ ์ ์๋ค.
์ ๋ํผ์ ๋ฆฌ์์ค๋ฅผ ์๋ณํ๋ ํต์ผ๋ ๋ฐฉ์์ ๋งํ๋ค. ์ถ๊ตฌํ ์ ๋ํผ์ฒ๋ผ.
๋ฆฌ์์ค๋ ์ง์ญํด๋ ์์์ด๊ณ ์ค์ ๋ก ์ฌ๊ธฐ์๋ ์์์ ๋ปํ๋ค. URI๋ก ์๋ณ์ด ๊ฐ๋ฅํ ๋ชจ๋ ์ข ๋ฅ์ ์์(์น ๋ธ๋ผ์ฐ์ ํ์ผ ๋ฐ ๊ทธ ์ธ)๋ฅผ ์ ๋ถ ์ง์นญํ๋ ๋ง์ด๋ค.
์๋ณ์.
์ฆ URI๋ ์ธํฐ๋ท ์์ ๋ฆฌ์์ค๋ฅผ ์๋ณํ๋ ๋ฌธ์์ด์ด๋ค. ๊ทธ๋์ ์ฝ๊ฒ โURI๋ ์๋ณ์์ด๋คโ ๋ผ๊ณ ๋งํด๋ ๋ฌด๋ฆฌ๊ฐ ์์ ๊ฒ ๊ฐ๋ค.
์๊ฐ๋ญ๋น ํ์ง๋ง๊ณ ๊ฐ์ ๋ฐฉ์์ผ๋ก ์ ๊ทผํด๋ณด์. Uniform๊ณผ Resource๋ ์์์ ํ์ผ๋ ์ง๋๊ฐ์.
Location์ด ์์น๋ฅผ ๋ปํ๋ ๊ฒ์ ๋ค๋ค ์ ๊ฒ์ด๋ค. Locator๋ฅผ ๊ฒ์ํ๋ฉด ๋ญ ์ด์ํ ๋ง์ด ๋์ค๋๋ฐ, ๊ทธ๋ฅ โ์์น๋ฅผ ๊ฐ๋ฆฌํค๋ ์ด๋ค ๊ฒโ ์ ๋๋ก ์ดํดํด๋ณด์.
์ฆ URL์ ๋คํธ์ํฌ์์์ ์์์ ์์น๋ฅผ ๋ํ๋ด๊ธฐ ์ํ ๊ท์ฝ์ด๋ค. ๋ฆฌ์์ค๋ฅผ ์๋ณํ ๋ฟ๋ง ์๋๋ผ ์์น๊น์ง ํํํด์ผํ๋ค.
์น ์ฌ์ดํธ ์ฃผ์ + ์ปดํจํฐ ๋คํธ์ํฌ ์์ ์์
๋ค์ด๋ฒ์ ๋ค์ด๊ฐ ๋ ์ฐ๋ฆฌ๋ https://www.naver.com๋ก ์ ์ํ๋ค.
์์ฐ์ค๋ฝ๊ฒ ์์ ํ๋กํ ์ฝ์ ๋ถ์ฌ์ฃผ๋๋ฐ, ์ด๋ฌ๋ฉด URL์ด๋ค.
ํน์ ์น ํ์ด์ง์ ์ฃผ์์ ์ ์ํ๊ธฐ ์ํด์๋ ์ฃผ์๋ฟ๋ง ์๋๋ผ ํ๋กํ ์ฝ(https, http, sftp, smp ๋ฑ)์ ํจ๊ป ์์์ผ ์ ์์ด ๊ฐ๋ฅํ๋ฐ, ์ด๋ค์ ๋ชจ๋ ๋ํ๋ด๋ ๊ฒ์ด URL์ด๋ค.
URL๊ณผ URI์ ๋ํ ์๊ธฐ๊ฐ ๋์์ ๋ ์ง์ฅ๋๋ฃ๊ฐ โํ๋๋ ์๋ณ์๊ณ ํ๋๋ ์๋๋คโ ๋ผ๋ ์๊ธฐ๋ฅผ ํ๋๋ฐ, ์์ผ๋ก โ๊ทธ๋ ๊ฒ ์ฝ๊ฒ ํํํ๋ค๋, ๋๋จํ๋ฐ?โ ๋ผ๊ณ ์๊ฐํ๋ค.
๊ฐ์ธ์ ์ผ๋ก ์ข ๋ ์ดํด๋๋ฅผ ๋์ด๊ณ ์ ๊ธ๋ก ๋จ๊ธฐ๋ ค๊ณ ํ๋ค.
URI์ ๋ํด ๊ฒ์ํด๋ณด๋ฉด ๋ค์๊ณผ ๊ฐ์ ์ค๋ช ๋ค์ด ์ญ ๋์จ๋ค.
์ธํฐ๋ท์ ์๋ ์์์ ๋ํ๋ด๋ ์ ์ผํ ์ฃผ์์ด๋ค.
์น ๊ธฐ์ ์์ ์ฌ์ฉํ๋ ๋ ผ๋ฆฌ์ ๋๋ ๋ฌผ๋ฆฌ์ ๋ฆฌ์์ค๋ฅผ ์๋ณํ๋ ๊ณ ์ ํ ๋ฌธ์์ด ์ํ์ค๋ค.
URI์ ํ์ ๊ฐ๋ ์ผ๋ก URL๊ณผ URN์ด ์๋ค.
์ด๋ค ํ์์ด ์๋ค๊ธฐ ๋ณด๋ค๋ ํน์ ์์์ ์๋ณํ๋ ๋ฌธ์์ด์ ์๋ฏธํ๋ค.
๊ตฌ๊ตฌ์ ์ ๋ง ๋ค์ด ๋ง์๋ฐ, ๋จ์ด๋ฅผ ๋ฏ์ด๋ณด๋ฉด ์ฝ๊ฒ ์ดํดํ ์ ์๋ค.
์ ๋ํผ์ ๋ฆฌ์์ค๋ฅผ ์๋ณํ๋ ํต์ผ๋ ๋ฐฉ์์ ๋งํ๋ค. ์ถ๊ตฌํ ์ ๋ํผ์ฒ๋ผ.
๋ฆฌ์์ค๋ ์ง์ญํด๋ ์์์ด๊ณ ์ค์ ๋ก ์ฌ๊ธฐ์๋ ์์์ ๋ปํ๋ค. URI๋ก ์๋ณ์ด ๊ฐ๋ฅํ ๋ชจ๋ ์ข ๋ฅ์ ์์(์น ๋ธ๋ผ์ฐ์ ํ์ผ ๋ฐ ๊ทธ ์ธ)๋ฅผ ์ ๋ถ ์ง์นญํ๋ ๋ง์ด๋ค.
์๋ณ์.
์ฆ URI๋ ์ธํฐ๋ท ์์ ๋ฆฌ์์ค๋ฅผ ์๋ณํ๋ ๋ฌธ์์ด์ด๋ค. ๊ทธ๋์ ์ฝ๊ฒ โURI๋ ์๋ณ์์ด๋คโ ๋ผ๊ณ ๋งํด๋ ๋ฌด๋ฆฌ๊ฐ ์์ ๊ฒ ๊ฐ๋ค.
์๊ฐ๋ญ๋น ํ์ง๋ง๊ณ ๊ฐ์ ๋ฐฉ์์ผ๋ก ์ ๊ทผํด๋ณด์. Uniform๊ณผ Resource๋ ์์์ ํ์ผ๋ ์ง๋๊ฐ์.
Location์ด ์์น๋ฅผ ๋ปํ๋ ๊ฒ์ ๋ค๋ค ์ ๊ฒ์ด๋ค. Locator๋ฅผ ๊ฒ์ํ๋ฉด ๋ญ ์ด์ํ ๋ง์ด ๋์ค๋๋ฐ, ๊ทธ๋ฅ โ์์น๋ฅผ ๊ฐ๋ฆฌํค๋ ์ด๋ค ๊ฒโ ์ ๋๋ก ์ดํดํด๋ณด์.
์ฆ URL์ ๋คํธ์ํฌ์์์ ์์์ ์์น๋ฅผ ๋ํ๋ด๊ธฐ ์ํ ๊ท์ฝ์ด๋ค. ๋ฆฌ์์ค๋ฅผ ์๋ณํ ๋ฟ๋ง ์๋๋ผ ์์น๊น์ง ํํํด์ผํ๋ค.
์น ์ฌ์ดํธ ์ฃผ์ + ์ปดํจํฐ ๋คํธ์ํฌ ์์ ์์
๋ค์ด๋ฒ์ ๋ค์ด๊ฐ ๋ ์ฐ๋ฆฌ๋ https://www.naver.com๋ก ์ ์ํ๋ค.
์์ฐ์ค๋ฝ๊ฒ ์์ ํ๋กํ ์ฝ์ ๋ถ์ฌ์ฃผ๋๋ฐ, ์ด๋ฌ๋ฉด URL์ด๋ค.
ํน์ ์น ํ์ด์ง์ ์ฃผ์์ ์ ์ํ๊ธฐ ์ํด์๋ ์ฃผ์๋ฟ๋ง ์๋๋ผ ํ๋กํ ์ฝ(https, http, sftp, smp ๋ฑ)์ ํจ๊ป ์์์ผ ์ ์์ด ๊ฐ๋ฅํ๋ฐ, ์ด๋ค์ ๋ชจ๋ ๋ํ๋ด๋ ๊ฒ์ด URL์ด๋ค.
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
No comments yet