Coder Social home page Coder Social logo

blobscan / blobscan Goto Github PK

View Code? Open in Web Editor NEW
68.0 68.0 29.0 16.64 MB

The pioneer blockchain explorer dedicated to navigate and visualize shard blob transactions.

Home Page: https://blobscan.com

License: GNU Affero General Public License v3.0

JavaScript 10.29% TypeScript 88.32% Dockerfile 0.34% CSS 0.13% Shell 0.92%
eip4844 ethereum

blobscan's Introduction

📢 IMPORTANT NOTICE 📢

  1. Our primary branch is now main. The next branch will no longer receive updates.
  2. Docker images are now available at blobscan-web and blobscan-api.

Blobscan

codecov

Blobscan is the first blockchain explorer that helps to navigate and visualize shard blob transactions (EIP-4844), providing the necessary infrastructure to scale Ethereum.

To learn more about Blobscan, please check out our documentation website.

Features

  • Blob explorer - Delve into blobs and examine their content.
  • Search capabilities - Look up blobs by their versioned hash, kzg commitment, transaction hash, slot or block number, along with associated transactions and blocks.
  • Blob persistence - For consistent availability even after pruning from the chain, blobscan support storing blobs in multiple storage systems, both centralized and decentralized.
  • Blob decoding - Seamlessly access detailed insights into blobs encoded in specialized formats, including rollup blobs or blobscriptions.
  • Rich analytics dashboard - Gain insights into blobs, blocks and transactions. View diverse charts and metrics.
  • Blob API - Blobscan's API facilitates queries on blobs, their associated blocks and transactions, along with relevant statistics and metrics.
  • Open source - Blobscan is open-source and available to everyone. We welcome contributions too. Check out our issues to see how you can help.

Installation

Check out Installation guide.

Sponsors

We extend our gratitude to each one of them. Thank you 🙏

paradigm logo         optimism         context logo         context logo

Join us on Discord!

blobscan's People

Contributors

0xgabi avatar github-actions[bot] avatar julien-marchand avatar luis-herasme avatar mirshko avatar omahs avatar pablocastellano avatar pjcolombo avatar skywalker2017 avatar xfja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blobscan's Issues

Improve error handling in blob view (it actually returns error 500)

From tx 0xf4669296bde1eac75c087ba1ab7fc9edd4248f4e4451ddac71425a358672598c I can see there is one blob. However clicking on the link (https://www.blobscan.com/blob/0xf4669296bde1eac75c087ba1ab7fc9edd4248f4e4451ddac71425a358672598c-0) will display an error page with status 500.

Application error: a client-side exception has occurred (see the browser console for more information).

The javascript console shows the following error:

Error: invalid codepoint at offset 11; missing continuation byte (argument="bytes", value=Uint8Array(0x4749463839616e001d00f70000010101090707050906070b080a0d0a130e0e000c130e0e14100f19111414131a1616121d15171a181c1d1b201817231b1b29001f1e13211716241a1d211e192a1e1f22201b2e201e32232226232b222224280025292d2a312524352827352929392c2c2036262138272d312e243c2a2e3230003236333c3433353936373b383a3e3b40302f4634334b3837453c3b4b383753003e3d26402d3d413e3f43404246434c4444444845474b484a4e4b5b4443564d004c4d514e4f54505156525c5352545956575b58595e5b614847644b49684e4d006b504f6e5251655c5b7456557c5d5b5d615e6367646d6363656966696e6b72006867756b6b6d716e6f7370727773757976777b787a7e7b7f76758664628d6900678a6765916c6a96706e837a799c7573a27977a77c7aaa7f7c7d817eac807e007f83808e86858589868b8e8c818582908787968e8d8d918e9396949d959596009a979a9d9baf8380b38583b78886bf8f8da39c9b9ea19f9fa2a0a2a5a3aba400a4a7aaa8acadaba5a8a5b3acacadb0aeb3b5b3b6b8b7b7b9b8babbbab8b2b200c08f8dc3918fca9694cf9a98cd9997d29d9ad7a09ed8a19fdda5a2c2bdbce000a7a4e2a9…

We can also take this opportunity to create some tests.

Error 500 in blob.getByIndex

See https://staging.blobscan.com/tx/0x160b7ba1290e85fc788d8309007a7ddec22477ff8d00aab070db3286c0b24f02/blob/0 or https://blobscan.com/tx/0x97f731111247c8377283b30fa675a61232f396b45166e925a7dff65f0d181cd9/blob/0

Request:

GET | https://staging.blobscan.com/api/trpc/blob.getByIndex?input={"json":{"index":0,"txHash":"0x160b7ba1290e85fc788d8309007a7ddec22477ff8d00aab070db3286c0b24f02"}}

Response:

{
	"error": {
		"json": {
			"message": "Internal server error",
			"code": -32603,
			"data": {
				"code": "INTERNAL_SERVER_ERROR",
				"httpStatus": 500,
				"path": "blob.getByIndex"
			}
		}
	}
}

Related: #90

Show MIME Type

Blobscan could detect the MIME Type of the blob and display it.

For example, this is a GIF.

image

Split MONGODB_URI environment variable

This variable would would be easier to reuse in docker-compose if it were split it in:

  • MONGODB_USER (eg. blobscan)
  • MONGODB_PASS (eg. s3cr3t)
  • and MONGODB_HOST (eg. 127.0.0.1:27017)

Examples can be used as default values.

Script to replicate blobs in new storages

After this PR #105 it will be possible to enable and disable blob storages between runs.

We need an script that uploads the blobs to the missing storages, i.e. user had only the postgres storage enabled and now enables google storage too.

Allow running blobscan without Google Cloud blob storage manager

  • Allow blank string for all GOOGLE_* env vars
  • Define sane defaults
blobscan-prod-indexer-1  | {"v":0,"name":"blobscan_indexer","msg":"Unexpected response from server","level":40,"hostname":"blobscan-vm","pid":1,"time":"2023-07-07T17:06:03.785908808Z","target":"blob_indexer::clients::blobscan","line":58,"
file":"src/clients/blobscan/mod.rs","url":"http://localhost:3002/api/indexer/block-txs-blobs","method":"PUT","body":"IndexRequest { block: Block { number: 30751, hash: 0x136d07e5560314a4316f3a756835e3e515f2ffb146e2d6a3b0b04f0b7470d782, ti
mestamp: 1688496120, slot: 30805 }, transactions: [Transaction { hash: 0x5a47c90bb4f364105239e9ec1b6094a72d0958c62c4c350402cdfa399fb6c15f, from: 0xd3248ba3e5492d767f8e427cb9c7b9d5c3972d7b, to: Some(0x000000000000000000000000000000000000f1
c1), block_number: 30751 }], blobs: [Blob { versioned_hash: 0x0175…8b2c, commitment: 0x978465e93f7e6ff37944bb83eb05f01589897758362ca13f64dfad8badfb7a7ccc8dc428b36402a4e8d092f4970aded1, tx_hash: 0x5a47…c15f, index: 0, data: [omitted] }] }"
,"response":"{\"message\":\"Failed to upload blobs to storages: A bucket name is needed to use Cloud Storage.\",\"code\":\"INTERNAL_SERVER_ERROR\"}"}
blobscan-prod-indexer-1  | {"v":0,"name":"blobscan_indexer","msg":"Failed to process slot. Retrying in 56 seconds…","level":40,"hostname":"blobscan-vm","pid":1,"time":"2023-07-07T17:06:03.785996903Z","target":"blob_indexer::slots_processo
r::slot_processor","line":38,"file":"src/slots_processor/slot_processor/mod.rs","slot":30805,"error":"ClientError(ApiError(ErrorResponse { code: String(\"INTERNAL_SERVER_ERROR\"), message: Some(\"Failed to upload blobs to storages: A bucket name is needed to use Cloud Storage.\") }))","target":"slot_processor"}

Log API requests

At the moment the only output of blobscan-api is the following one

No pending migrations to apply.
npm notice 
npm notice New minor version of npm available! 9.5.0 -> 9.7.2
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.7.2>
npm notice Run `npm install -g [email protected]` to update!
npm notice 

> @blobscan/[email protected] start /app/apps/rest-api-server
> pnpm with-env ts-node src/index.ts


> @blobscan/[email protected] with-env /app/apps/rest-api-server
> dotenv -e ../../.env -- "ts-node" "src/index.ts"

REST API server started on http://localhost:3001

It would be nice to log requests received too.

Unique constraint failed on the fields: id

Indexer and api logs:

blobscan-prod-indexer-1  | {"v":0,"name":"blobscan_indexer","msg":"Block, transactions and blobs indexed successfully!","level":30,"hostname":"blobscan-vm","pid":1,"time":"2023-07-07T15:00:22.305898015Z","target":"blob_indexer::slots_proc
essor::slot_processor","line":184,"file":"src/slots_processor/slot_processor/mod.rs","target":"slot_processor","block":"0x7e65…e0ec","slot":20826,"transactions":"[\"0x05df…8f8a\"]","blobs":"[\"0x01a7…4a62\", \"0x01d9…bda5\", \"0x0119…1617
\", \"0x01fb…81a9\", \"0x0116…e8e3\", \"0x01df…4f78\"]"}                                                               
blobscan-prod-indexer-1  | {"v":0,"name":"blobscan_indexer","msg":"Failed to send request","level":40,"hostname":"blobscan-vm","pid":1,"time":"2023-07-07T15:00:31.555853733Z","target":"blob_indexer::clients::blobscan","line":58,"file":"sr
c/clients/blobscan/mod.rs","method":"PUT","body":"IndexRequest { block: Block { number: 20828, hash: 0xdf7da39306b73e8a238bc129ab7631d3e87245fb605907b250eab0f30acde185, timestamp: 1688376432, slot: 20831 }, transactions: [Transaction { ha
sh: 0x9d3b9b1449722ab69a8ea99e609fd650581dac2abcb75832f90090af3d571dc5, from: 0x428a95ceb38b706fbfe74fa0144701cfc1c25ef7, to: Some(0x000000000000000000000000000000000000f1c1), block_number: 20828 }], blobs: [Blob { versioned_hash: 0x0101…
3c71, commitment: 0xaa2a8bd0be307642739186382b2ec0e8080d37be9e1b3d32ff290607ba2b9c76a5d845f0688f381445efcada144e9e6d, tx_hash: 0x9d3b…1dc5, index: 0, data: [omitted] }, Blob { versioned_hash: 0x0176…3250, commitment: 0x968095f7b1035947e6a
4bc8b52eba141c082f16cd3951606a8509236bc40ff20a30bdddefe373e404b8d2102f7811568, tx_hash: 0x9d3b…1dc5, index: 1, data: [omitted] }, Blob { versioned_hash: 0x013b…e9cc, commitment: 0x8c5a64cce1b68074fefa118f1fa20ce03dc1535a21d1f1399fd85da1e8
9a60178956bb504114d9f59aef0941114b8de0, tx_hash: 0x9d3b…1dc5, index: 2, data: [omitted] }, Blob { versioned_hash: 0x0119…8f05, commitment: 0xb9f597455df576fdfce8bdc397127f76f5295194d34d8ad2b93e5f582866268a9d352379f6c872b6b61b4f124e95c361,
 tx_hash: 0x9d3b…1dc5, index: 3, data: [omitted] }, Blob { versioned_hash: 0x0162…5e68, commitment: 0xb3c9a21edecaa25e5a6ceaebb816751d8a95b6b81fd9da6301fe9f41afae905931037c60b9995688289a2be2713ff1f3, tx_hash: 0x9d3b…1dc5, index: 4, data: 
[omitted] }, Blob { versioned_hash: 0x01b0…9903, commitment: 0xab9e52e8eef9f2b2c1f8506111dc730ea524be05e9e690eeca25c53842ef07239a02a62ebcbc1442e984f8cefc193644, tx_hash: 0x9d3b…1dc5, index: 5, data: [omitted] }] }","url":"http://localhost
:3002/api/indexer/block-txs-blobs","error":"reqwest::Error { kind: Request, url: Url { scheme: \"http\", cannot_be_a_base: false, username: \"\", password: None, host: Some(Domain(\"localhost\")), port: Some(3002), path: \"/api/indexer/bl
ock-txs-blobs\", query: None, fragment: None }, source: TimedOut }"}
blobscan-prod-indexer-1  | {"v":0,"name":"blobscan_indexer","msg":"Failed to process slot. Retrying in 0 seconds…","level":40,"hostname":"blobscan-vm","pid":1,"time":"2023-07-07T15:00:31.555986822Z","target":"blob_indexer::slots_processor
::slot_processor","line":38,"file":"src/slots_processor/slot_processor/mod.rs","target":"slot_processor","error":"ClientError(Reqwest(reqwest::Error { kind: Request, url: Url { scheme: \"http\", cannot_be_a_base: false, username: \"\", pa
ssword: None, host: Some(Domain(\"localhost\")), port: Some(3002), path: \"/api/indexer/block-txs-blobs\", query: None, fragment: None }, source: TimedOut }))","slot":20831}
blobscan-prod-api-1      | prisma:error Unique constraint failed on the fields: (`id`)
blobscan-prod-api-1      | prisma:error Unique constraint failed on the fields: (`id`)
blobscan-prod-api-1      | prisma:error Unique constraint failed on the fields: (`id`)
blobscan-prod-api-1      | prisma:error 
blobscan-prod-api-1      | Invalid `prisma.blob.createMany()` invocation in
blobscan-prod-api-1      | /app/packages/api/src/router/indexer.ts:147:50
blobscan-prod-api-1      | 
blobscan-prod-api-1      |   144 
blobscan-prod-api-1      |   145 // 3. Prepare block, transaction and blob insertions
blobscan-prod-api-1      |   146 
blobscan-prod-api-1      | → 147 const createBlobsDataPromise = prisma.blob.createMany(
blobscan-prod-api-1      | Unique constraint failed on the fields: (`id`)
blobscan-prod-api-1      | prisma:error Unique constraint failed on the fields: (`id`)
blobscan-prod-api-1      | prisma:error Unique constraint failed on the fields: (`id`)
blobscan-prod-api-1      | prisma:error Unique constraint failed on the fields: (`id`)
blobscan-prod-api-1      | prisma:error Unique constraint failed on the fields: (`id`)
blobscan-prod-indexer-1  | {"v":0,"name":"blobscan_indexer","msg":"Unexpected response from server","level":40,"hostname":"blobscan-vm","pid":1,"time":"2023-07-07T15:00:38.233466045Z","target":"blob_indexer::clients::blobscan","line":58,"
file":"src/clients/blobscan/mod.rs","url":"http://localhost:3002/api/indexer/block-txs-blobs","method":"PUT","body":"IndexRequest { block: Block { number: 20828, hash: 0xdf7da39306b73e8a238bc129ab7631d3e87245fb605907b250eab0f30acde185, ti
mestamp: 1688376432, slot: 20831 }, transactions: [Transaction { hash: 0x9d3b9b1449722ab69a8ea99e609fd650581dac2abcb75832f90090af3d571dc5, from: 0x428a95ceb38b706fbfe74fa0144701cfc1c25ef7, to: Some(0x000000000000000000000000000000000000f1
c1), block_number: 20828 }], blobs: [Blob { versioned_hash: 0x0101…3c71, commitment: 0xaa2a8bd0be307642739186382b2ec0e8080d37be9e1b3d32ff290607ba2b9c76a5d845f0688f381445efcada144e9e6d, tx_hash: 0x9d3b…1dc5, index: 0, data: [omitted] }, Bl
ob { versioned_hash: 0x0176…3250, commitment: 0x968095f7b1035947e6a4bc8b52eba141c082f16cd3951606a8509236bc40ff20a30bdddefe373e404b8d2102f7811568, tx_hash: 0x9d3b…1dc5, index: 1, data: [omitted] }, Blob { versioned_hash: 0x013b…e9cc, commi
tment: 0x8c5a64cce1b68074fefa118f1fa20ce03dc1535a21d1f1399fd85da1e89a60178956bb504114d9f59aef0941114b8de0, tx_hash: 0x9d3b…1dc5, index: 2, data: [omitted] }, Blob { versioned_hash: 0x0119…8f05, commitment: 0xb9f597455df576fdfce8bdc397127f
76f5295194d34d8ad2b93e5f582866268a9d352379f6c872b6b61b4f124e95c361, tx_hash: 0x9d3b…1dc5, index: 3, data: [omitted] }, Blob { versioned_hash: 0x0162…5e68, commitment: 0xb3c9a21edecaa25e5a6ceaebb816751d8a95b6b81fd9da6301fe9f41afae905931037
c60b9995688289a2be2713ff1f3, tx_hash: 0x9d3b…1dc5, index: 4, data: [omitted] }, Blob { versioned_hash: 0x01b0…9903, commitment: 0xab9e52e8eef9f2b2c1f8506111dc730ea524be05e9e690eeca25c53842ef07239a02a62ebcbc1442e984f8cefc193644, tx_hash: 0
x9d3b…1dc5, index: 5, data: [omitted] }] }","response":"{\"message\":\"\\nInvalid `prisma.blob.createMany()` invocation in\\n/app/packages/api/src/router/indexer.ts:147:50\\n\\n  144 \\n  145 // 3. Prepare block, transaction and blob inse
rtions\\n  146 \\n→ 147 const createBlobsDataPromise = prisma.blob.createMany(\\nUnique constraint failed on the fields: (`id`)\",\"code\":\"INTERNAL_SERVER_ERROR\"}"}
blobscan-prod-indexer-1  | {"v":0,"name":"blobscan_indexer","msg":"Failed to process slot. Retrying in 1 seconds…","level":40,"hostname":"blobscan-vm","pid":1,"time":"2023-07-07T15:00:38.23389624Z","target":"blob_indexer::slots_processor:
:slot_processor","line":38,"file":"src/slots_processor/slot_processor/mod.rs","error":"ClientError(ApiError(ErrorResponse { code: String(\"INTERNAL_SERVER_ERROR\"), message: Some(\"\\nInvalid `prisma.blob.createMany()` invocation in\\n/ap
p/packages/api/src/router/indexer.ts:147:50\\n\\n  144 \\n  145 // 3. Prepare block, transaction and blob insertions\\n  146 \\n→ 147 const createBlobsDataPromise = prisma.blob.createMany(\\nUnique constraint failed on the fields: (`id`)\
") }))","slot":20831,"target":"slot_processor"}
blobscan-prod-indexer-1  | {"v":0,"name":"blobscan_indexer","msg":"Block, transactions and blobs indexed successfully!","level":30,"hostname":"blobscan-vm","pid":1,"time":"2023-07-07T15:00:41.696154385Z","target":"blob_indexer::slots_proc
essor::slot_processor","line":184,"file":"src/slots_processor/slot_processor/mod.rs","blobs":"[\"0x0101…3c71\", \"0x0176…3250\", \"0x013b…e9cc\", \"0x0119…8f05\", \"0x0162…5e68\", \"0x01b0…9903\"]","block":"0xdf7d…e185","slot":20831,"tran
sactions":"[\"0x9d3b…1dc5\"]","target":"slot_processor"}

API only logs:

blobscan@blobscan-vm:~/blobscan-staging$ blobscan-staging-logs api                                                                                                                                                                            
blobscan-staging-api-1  |   146                                                                                                                                                                                                               
blobscan-staging-api-1  | → 147 const createBlobsDataPromise = prisma.blob.createMany(                                                                                                                                                        
blobscan-staging-api-1  | Unique constraint failed on the fields: (`id`)                                                                                                                                                                      
blobscan-staging-api-1  | prisma:error Unique constraint failed on the fields: (`id`)                                                                                                                                                         
blobscan-staging-api-1  | prisma:error Unique constraint failed on the fields: (`id`)                                                                                                                                                         
blobscan-staging-api-1  | prisma:error Unique constraint failed on the fields: (`id`)                                                                                                                                                         
blobscan-staging-api-1  | prisma:error Unique constraint failed on the fields: (`id`)                                                                                                                                                         
blobscan-staging-api-1  | prisma:error Unique constraint failed on the fields: (`id`)                                                                                                                                                         
blobscan-staging-api-1  | prisma:error Unique constraint failed on the fields: (`id`)                                                                                                                                                         
blobscan-staging-api-1  | prisma:error Unique constraint failed on the fields: (`id`)                                                                                                                                                         
blobscan-staging-api-1  | prisma:error                                                                                                                                                                                                        
blobscan-staging-api-1  | Invalid `prisma.blob.createMany()` invocation in                                                                                                                                                                    
blobscan-staging-api-1  | /app/packages/api/src/router/indexer.ts:147:50                                                                                                                                                                      
blobscan-staging-api-1  |                                                                                                                                                                                                                     
blobscan-staging-api-1  |   144                                                                                                                                                                                                               
blobscan-staging-api-1  |   145 // 3. Prepare block, transaction and blob insertions                                                                                                                                                          

Give more descriptive error messages when failed to process slot

Currently the logs available come from the indexer:

blobscan-prod-indexer-1  | {"v":0,"name":"blobscan_indexer","msg":"Failed to process slot. Retrying in 4 seconds…","level":40,"hostname":"blobscan-vm","pid":1,"time":"2023-07-27T11:15:48.936448369Z","target":"blob_indexer::slots_processor::slot_processor","line":38,"file":"src/slots_processor/slot_processor/mod.rs","error":"ClientError(ApiError(ErrorResponse { code: String(\"INTERNAL_SERVER_ERROR\"), message: Some(\"Failed to upload blobs to storages: Request failed with status code 404\") }))","slot":152737,"target":"slot_processor"}
blobscan-prod-indexer-1  | {"v":0,"name":"blobscan_indexer","msg":"Unexpected response from server","level":40,"hostname":"blobscan-vm","pid":1,"time":"2023-07-27T11:15:53.887886124Z","target":"blob_indexer::clients::blobscan","line":58,"file":"src/clients/blobscan/mod.rs","method":"PUT","response":"{\"message\":\"Failed to upload blobs to storages: Request failed with status code 404\",\"code\":\"INTERNAL_SERVER_ERROR\"}","url":"http://localhost:3002/api/indexer/block-txs-blobs","body":"IndexRequest { block: Block { number: 149037, hash: 0x38d1b86e2415fe6e400b429570a3d05239196bdaa877756601aa7564f5489968, timestamp: 1689959304, slot: 152737 }, transactions: [Transaction { hash: 0xdc8910fe9619f8ccde86db6e49cfeadd2bb3efe6d632f9759be1dddcb77ec29b, from: 0xd3248ba3e5492d767f8e427cb9c7b9d5c3972d7b, to: Some(0x000000000000000000000000000000000000f1c1), block_number: 149037 }, Transaction { hash: 0xd9d45929f34f6078c7fdefc262c34b87d52600ca62978bffd9508b772930ee99, from: 0xd3248ba3e5492d767f8e427cb9c7b9d5c3972d7b, to: Some(0x000000000000000000000000000000000000f1c1), block_number: 149037 }, Transaction { hash: 0xcb1986ccdde4b3c169f316e9b5868425bfac56b73fbd8796737e4398352de77c, from: 0xd3248ba3e5492d767f8e427cb9c7b9d5c3972d7b, to: Some(0x000000000000000000000000000000000000f1c1), block_number: 149037 }, Transaction { hash: 0x800be17f197e4e1ba8955c67c0b24aaddc7f697ffdc69ebdcd11258bac785c4e, from: 0xd3248ba3e5492d767f8e427cb9c7b9d5c3972d7b, to: Some(0x000000000000000000000000000000000000f1c1), block_number: 149037 }, Transaction { hash: 0x93d47d6bc09d9f541453ded4146c47c06c1f22547e58b2b12262b07bd4aa5971, from: 0xd3248ba3e5492d767f8e427cb9c7b9d5c3972d7b, to: Some(0x000000000000000000000000000000000000f1c1), block_number: 149037 }, Transaction { hash: 0x4d9ba21d3ce8ea2ca493ed74e77885d7e25addc364195a5dd34a24b1b8e9a78e, from: 0xd3248ba3e5492d767f8e427cb9c7b9d5c3972d7b, to: Some(0x000000000000000000000000000000000000f1c1), block_number: 149037 }], blobs: [Blob { versioned_hash: 0x0128…40d6, commitment: 0x90e279aad4104efdadffdd3603d70c3ee3dd7bae5be47dc804e7cf6f96526546fa173fb23fb3fd2001572d2cf11cd809, tx_hash: 0xd9d4…ee99, index: 0, data: [omitted] }, Blob { versioned_hash: 0x01df…2bc8, commitment: 0xaabfd44eb113635c5f21cc4dfaa7a0f0902badc89c6da72322ceacd0718efb5f0d986e20a92597a4eca347fa1be0d097, tx_hash: 0xdc89…c29b, index: 0, data: [omitted] }, Blob { versioned_hash: 0x0154…6791, commitment: 0xad3343bd0d6fdd7186580595e37cf150a4bc70fe387c4819d508885bf879cb7fd8b755f043e7556e104adb84ab9422c4, tx_hash: 0x800b…5c4e, index: 0, data: [omitted] }, Blob { versioned_hash: 0x01d2…af45, commitment: 0x8e80749c3b806d230f058494785020372ebd3811e34c760424ea6a10a3dc5da62a06c76042a7adb4dc6ac2ee91da07a3, tx_hash: 0xcb19…e77c, index: 0, data: [omitted] }, Blob { versioned_hash: 0x01ca…4b74, commitment: 0x82e4dd150213c2e50432230f8d700a6332bbc3d7986df1df0012538389164cb3a955f1ca7a63c2f4d0b3ff0d750b5c90, tx_hash: 0x93d4…5971, index: 0, data: [omitted] }, Blob { versioned_hash: 0x01c6…535d, commitment: 0x8bffeb5d97ec1e48709a0ef0f5d78380b18b0d488745642cf41da6f674467ffe87819bf58688145b2713e4592f1668e3, tx_hash: 0x4d9b…a78e, index: 0, data: [omitted] }] }"}

Run test to detect schema migration failures

For example, migration 20230716183410_add_inserted_at_and_upserted_at_fields could not be applied in production because insertedAt is a new non-nullable field without a default value.

A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve

Migration name: 20230716183410_add_inserted_at_and_upserted_at_fields

Database error code: 23502

Database error:
ERROR: column "insertedAt" of relation "Address" contains null values

DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(E23502), message: "column \\"insertedAt\\" of relation \\"Address\\" contains null values", detail: None, hint: None, position: None, where_: None, schema: Some("public"), table: Some("Address"), column: Some("insertedAt"), datatype: None, constraint: None, file: Some("tablecmds.c"), line: Some(5896), routine: Some("ATRewriteTable") }

   0: sql_schema_connector::apply_migration::apply_script
           with migration_name="20230716183410_add_inserted_at_and_upserted_at_fields"
             at schema-engine/connectors/sql-schema-connector/src/apply_migration.rs:106
   1: schema_core::commands::apply_migrations::Applying migration
           with migration_name="20230716183410_add_inserted_at_and_upserted_at_fields"
             at schema-engine/core/src/commands/apply_migrations.rs:91
   2: schema_core::state::ApplyMigrations
             at schema-engine/core/src/state.rs:197

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.