From 4280b440f7f180b7831b9128a0d08524bda01a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Zdyba=C5=82?= Date: Sun, 10 Apr 2022 18:23:58 +0200 Subject: [PATCH] feat: allow hard tabs in code blocks in md files * disable MD010 for `code_blocks` * revert and re `markdownlint -fix` all the .md files --- .markdownlint.yaml | 2 + docs/lazy-adr/adr-006-da-interface.md | 62 +++++++++++++-------------- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/.markdownlint.yaml b/.markdownlint.yaml index a163c728a..7d2cc8570 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -1,4 +1,6 @@ default: true +MD010: + code_blocks: false MD013: false MD024: allow_different_nesting: true diff --git a/docs/lazy-adr/adr-006-da-interface.md b/docs/lazy-adr/adr-006-da-interface.md index 6604f7e5c..c0cf7564d 100644 --- a/docs/lazy-adr/adr-006-da-interface.md +++ b/docs/lazy-adr/adr-006-da-interface.md @@ -27,25 +27,25 @@ Definition of interface: ```go type DataAvailabilityLayerClient interface { - // Init is called once to allow DA client to read configuration and initialize resources. - Init(config []byte, kvStore store.KVStore, logger log.Logger) error + // Init is called once to allow DA client to read configuration and initialize resources. + Init(config []byte, kvStore store.KVStore, logger log.Logger) error - Start() error - Stop() error + Start() error + Stop() error - // SubmitBlock submits the passed in block to the DA layer. - // This should create a transaction which (potentially) - // triggers a state transition in the DA layer. - SubmitBlock(block *types.Block) ResultSubmitBlock + // SubmitBlock submits the passed in block to the DA layer. + // This should create a transaction which (potentially) + // triggers a state transition in the DA layer. + SubmitBlock(block *types.Block) ResultSubmitBlock - // CheckBlockAvailability queries DA layer to check block's data availability. - CheckBlockAvailability(block *types.Block) ResultCheckBlock + // CheckBlockAvailability queries DA layer to check block's data availability. + CheckBlockAvailability(block *types.Block) ResultCheckBlock } // BlockRetriever is additional interface that can be implemented by Data Availability Layer Client that is able to retrieve // block data from DA layer. This gives the ability to use it for block synchronization. type BlockRetriever interface { - RetrieveBlock(height uint64) ResultRetrieveBlock + RetrieveBlock(height uint64) ResultRetrieveBlock } // TODO define an enum of different non-happy-path cases @@ -55,40 +55,40 @@ type StatusCode uint64 // Data Availability return codes. const ( - StatusUnknown StatusCode = iota - StatusSuccess - StatusTimeout - StatusError + StatusUnknown StatusCode = iota + StatusSuccess + StatusTimeout + StatusError ) type DAResult struct { - // Code is to determine if the action succeeded. - Code StatusCode - // Message may contain DA layer specific information (like DA block height/hash, detailed error message, etc) - Message string + // Code is to determine if the action succeeded. + Code StatusCode + // Message may contain DA layer specific information (like DA block height/hash, detailed error message, etc) + Message string } // ResultSubmitBlock contains information returned from DA layer after block submission. type ResultSubmitBlock struct { - DAResult - // Not sure if this needs to be bubbled up to other - // parts of Optimint. - // Hash hash.Hash + DAResult + // Not sure if this needs to be bubbled up to other + // parts of Optimint. + // Hash hash.Hash } // ResultCheckBlock contains information about block availability, returned from DA layer client. type ResultCheckBlock struct { - DAResult - // DataAvailable is the actual answer whether the block is available or not. - // It can be true if and only if Code is equal to StatusSuccess. - DataAvailable bool + DAResult + // DataAvailable is the actual answer whether the block is available or not. + // It can be true if and only if Code is equal to StatusSuccess. + DataAvailable bool } type ResultRetrieveBlock struct { - DAResult - // Block is the full block retrieved from Data Availability Layer. - // If Code is not equal to StatusSuccess, it has to be nil. - Block *types.Block + DAResult + // Block is the full block retrieved from Data Availability Layer. + // If Code is not equal to StatusSuccess, it has to be nil. + Block *types.Block } ``` >