Browse Source

removed cost configurator

tonyboylehub 1 year ago
parent
commit
3bac1dc095
3 changed files with 10 additions and 130 deletions
  1. 1 4
      markdoc/tags.js
  2. 0 116
      src/components/bubblegum/merkleTreeConfigTable.jsx
  3. 9 10
      src/pages/bubblegum/index.md

+ 1 - 4
markdoc/tags.js

@@ -151,10 +151,7 @@ const tags = {
       packages: { type: Array },
       type: { type: String },
     },
-  },
-  merkleTreeConfigurator: {
-    render: MerkleTreeConfigTable,
-  },
+  }
 }
 
 export default tags

+ 0 - 116
src/components/bubblegum/merkleTreeConfigTable.jsx

@@ -1,116 +0,0 @@
-import { useMemo, useState } from 'react'
-
-const MerkleTreeConfigTable = () => {
-  const maxCanopyDepth = 17
-
-  const [maxDepth, setMaxDepth] = useState()
-  const [maxBuffer, setMaxBuffer] = useState()
-  const [numberOfProofs, setNumberOfProofs] = useState()
-  const [canopySize, setCanopySize] = useState()
-
-  const maxNumberOptions = [
-    { nfts: 16384, depth: 14 },
-    { nfts: 32768, depth: 15 },
-    { nfts: 65536, depth: 16 },
-    { nfts: 131072, depth: 17 },
-    { nfts: 262144, depth: 18 },
-    { nfts: 524288, depth: 19 },
-    { nfts: 1048576, depth: 20 },
-    { nfts: 16777216, depth: 24 },
-    { nfts: 67108864, depth: 26 },
-    { nfts: 1073741824, depth: 30 },
-  ]
-
-  const canopySizeOptions = useMemo(() => {
-    let options = []
-
-    const maxProofBytes = maxDepth * 32
-
-    for (let i = 0; i < 17; i++) {
-      const proofBytes = maxProofBytes - i * 32
-      const proofsNeeded = Math.ceil(proofBytes / 32)
-
-      if (proofsNeeded < 0) {
-        continue
-      }
-      console.log('proofsNeeded: ' + proofsNeeded)
-
-      console.log(i)
-      if (proofsNeeded < 8) {
-        console.log({
-          i,
-          proofsNeeded,
-        })
-        options.unshift(
-          <option key={i} value={proofsNeeded}>
-            {proofsNeeded} <span>({maxProofBytes - i * 32} bytes)</span>
-          </option>
-        )
-      } else if (proofsNeeded === 8) {
-        console.log({
-          i,
-          proofsNeeded,
-        })
-        options.unshift(
-          <option key={i} value={proofsNeeded} selected>
-            {proofsNeeded} Recommended{' '}
-            <span>({maxProofBytes - i * 32} bytes)</span>
-          </option>
-        )
-      } else if (proofsNeeded > 8) {
-        console.log({
-          i,
-          proofsNeeded,
-        })
-        options.unshift(
-          <option key={i} value={proofsNeeded}>
-            {proofsNeeded} <span>({maxProofBytes - i * 32} bytes)</span>
-          </option>
-        )
-      }
-    }
-
-    console.log(options)
-    return (
-      <>
-        <optgroup label="Less Composable"></optgroup>
-        {options}
-        <optgroup label="More Composable"></optgroup>
-      </>
-    )
-  }, [maxDepth])
-
-  return (
-    <div>
-      <h1>Merkle Tree Configuration</h1>
-      <div>
-        <div>
-          <div>Number of cNFTs</div>
-          <select
-            className="w-full rounded p-2 text-black"
-            onChange={(e) => setMaxDepth(e.target.value)}
-          >
-            {maxNumberOptions.map((option) => (
-              <option key={option.nfts} value={option.depth}>
-                {option.nfts.toLocaleString()}
-              </option>
-            ))}
-          </select>
-        </div>
-        <div>
-          <div>Number of Proofs</div>
-          <select
-            className="w-full rounded p-2 text-black"
-            onChange={(e) => {
-              setNumberOfProofs(e.target.value)
-            }}
-          >
-            {canopySizeOptions}
-          </select>
-        </div>
-      </div>
-    </div>
-  )
-}
-
-export default MerkleTreeConfigTable

+ 9 - 10
src/pages/bubblegum/index.md

@@ -22,16 +22,15 @@ So far, though, these types of products have been held back by the cost of rent
 
 The following table represents what we believe is a workable composable tree across the Solana eco system, including marketplaces and other ecosystem products.
 
-| Number of cNFTs   | Tree Depth | Canopy Depth | Concurrency Buffer | Tree Cost | Cost per cNFT |
-|-------------------|------------|--------------|--------------------|-----------|--------------------------|
-| 16,384            | 14         | 8            | 64                 | 0.3358    | 0.00002550               |
-| 65,536            | 16         | 10           | 64                 | 0.7069    | 0.00001579               |
-| 262,144           | 18         | 12           | 64                 | 2.1042    | 0.00001303               |
-| 1,048,576         | 20         | 13           | 1024               | 8.5012    | 0.00001311               |
-| 16,777,216        | 24         | 15           | 2048               | 26.1201   | 0.00000656               |
-| 67,108,864        | 26         | 17           | 2048               | 70.8213   | 0.00000606               |
-| 1,073,741,824     | 30         | 17           | 2048               | 72.6468   | 0.00000507               |
-
+| Number of cNFTs | Tree Depth | Canopy Depth | Concurrency Buffer | Tree Cost | Cost per cNFT |
+| --------------- | ---------- | ------------ | ------------------ | --------- | ------------- |
+| 16,384          | 14         | 8            | 64                 | 0.3358    | 0.00002550    |
+| 65,536          | 16         | 10           | 64                 | 0.7069    | 0.00001579    |
+| 262,144         | 18         | 12           | 64                 | 2.1042    | 0.00001303    |
+| 1,048,576       | 20         | 13           | 1024               | 8.5012    | 0.00001311    |
+| 16,777,216      | 24         | 15           | 2048               | 26.1201   | 0.00000656    |
+| 67,108,864      | 26         | 17           | 2048               | 70.8213   | 0.00000606    |
+| 1,073,741,824   | 30         | 17           | 2048               | 72.6468   | 0.00000507    |
 
 These compressed NFTs can be transferred, delegated, and even decompressed into regular NFTs for interoperability with existing smart contracts.