Lease own IP block

I am looking to purchase or lease 60 ip’s. Also i want se my own rdns.
Can anyone tell me from where i can purchase and how much it will es… | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1814407&goto=newpost

8 – How to place a plugin block to twig template without any contributed module?

I am using Drupal 8. Have created a custom module, added custom block “LskyTestVideo”, created a new page template with its own controller (“LskyOpenTokTestController”). In LskyOpenTokTestController::index action I rendered test-video-page.html.twig . Inside this page I need to place LskyTestVideo block.Here my code:

class LskyOpenTokTestController extends ControllerBase {

public function index() {
$block_manager = Drupal::service('plugin.manager.block');

$config = ();
$plugin_block = $block_manager->createInstance('lsky_test_video', $config);

$access_result = $plugin_block->access(Drupal::currentUser());

if (is_object($access_result) && $access_result->isForbidden() || is_bool($access_result) && 
!$access_result) {
  return ();
}
$render = $plugin_block->build();

return (
  '#theme' => 'open_tok_test_video_page',
  '#attached' => (
    'library' => (
      'lsky_open_tok/video-test-window',
      'lsky_open_tok/opentok',
    ),
  ),
  '#test' => $render,
);
 }

}

Here test-video.html.twig

    <div class="test-video-block">{{ test }}</div>

When the page is rendered, it returns 0.
How I can place a custom plugin block inside twig template. Thanks.

blockchain – how to find the block height from merkle root?

I have the merkle root, using this value, how to get the block hash or its height?
There is this merkle root available in getblock RPC output:

./bitcoin-cli getblock 0320d6c1bd3c4cd2a08d6f76acb50b06a3ed766b058d247fbda3147aecfef388
{
  "tx": [
    "bccf4c873984245694f64263a3392c4d67c6a6f60efe4ed53aa4965f6d8b7dc0"
  ],
  "hash": "0320d6c1bd3c4cd2a08d6f76acb50b06a3ed766b058d247fbda3147aecfef388",
  "confirmations": 2,
  "size": 180,
  "height": 102,
  "version": 536870912,
  "versionHex": "20000000",
  "merkleroot": "bccf4c873984245694f64263a3392c4d67c6a6f60efe4ed53aa4965f6d8b7dc0",
  "num_tx": 1,
  "time": 1593523883,
  "mediantime": 1593467398,
  "nonce": 1,
  "bits": "207fffff",
  "difficulty": 4.656542373906925e-10,
  "chainwork": "00000000000000000000000000000000000000000000000000000000000000ce",
  "previousblockhash": "1664a604a6c8e603e311c6759f7693343ad77896c53de1bcef37de04dbcbbbc5",
  "nextblockhash": "1924c8db1b986f398a12d5481fcc293913a2dab2ee7fbcb0e131d7941e5201c2"
}

using different transaction hashes, I got the merkle root value, now I need to know which block has this merkle root as in getblock.

merkleblock – How Does the SPV merkle path form of multiple transactions in Merkle block looks like?

While I’m studying about the Bitcoin, I’ve wondered how many merkle paths should be contained in merkle block.

From the point of view of Merkle path, it is generated as the form of containing hashes of counterpart stepping up from bottom to top.

For example, if I have 4 transactions(let me use tx1, tx2, tx3, and tx4) in a block, then the hashes of them(h1, h2, h3, and h4) will be located at the bottom as the leaves. The parents of them will be (h12 and h34), after all, the merkle roots will be (h1234). So, if a SPV node want to verify that the tx2 is in the block, the full node can offer h1, h34 as a merkle path (as well as block header), so that they can prove as the step of hashing will lead them to the merkle roots which is contained in block header.

However, If I requests to verify multiple transactions in a block (e.g. using Bloom filter), then what would be contained into the merkle block (which contains merkle path and block header)?

Does they have ultiple merkle paths for each transactions which are interested in, so that the transactions can be verified respectively? or adapted merkle path to be included which encompass all transactions related? (e.g. if we want to verify tx1, tx3 then generating h2, h3; though this exmample seems not to be guaranteed to show the order of transactions)

How can I block Play Store from installing a specific app

Is there any option that doesn’t allow me to install a specific app from the Play Store ever again on that device? How can I do that?

full node – Why is my mempool count so much lower than that of block explorers?

TL;DR:
Unconfirmed transactions are relayed only once. If you were not online, you will only learn about the missing transactions when they are included in a block.


As you may know, Bitcoin employs a gossip protocol to relay transaction and block information. When a new transaction gets submitted to the network, the spender wallet will announce it to its peer nodes. Each peer node will check whether it has heard about the transaction before and will request the full transaction if it does not have it. The peer nodes then proceed to validate the transaction and gossip it to its peers in turn. The transaction spreads through the network until all online nodes have received the transaction. The nodes will then hold the transaction in their mempools until it is included in a block or expires. Note that each unconfirmed transaction is announced only once on the network.

When a new node joins the network, the new node starts participating in the gossiping and will hear about any new transactions that get submitted to the network. The new node will not hear about unconfirmed transactions that were broadcast earlier as the other nodes do not rebroadcast transactions they hold in their mempool (although there is a proposal to change that). However, when a block is announced, each node will retrieve all missing transactions from its peers to be able to validate the block. This guarantees that all relevant transaction get propagated eventually.

enter image description here

I retrieved a screenshot of a mempool visualizer for the period of time at which you were asking your question (via jochen-hoenicke.de).
You mention that your node was running about two days at the point when you retrieved the mempool count. If you look at the graph at May 27, you’ll see that there is a large count of transactions in the 1-2 satoshi/byte feerate range (the lowest blue band). If you look closely, you see that most of these transactions had been submitted to the network more than two days prior, i.e. before your node was online. Therefore, your node would not have known about the majority of the transactions that were known to nodes with a longer uptime.

google chrome – Can you block a specific site from automatically downloading a file?

When I have a video conference with Zoom or WebEx, I prefer to use the web version of the client. However, the meeting links always directs me to a page that auto downloads the desktop client. Is there a way to prevent a site from automatically downloading a file like this? There is a setting in Chrome to disable automatic downloads, but it is only to prevent sites from downloading multiple files automatically.

8 – How to clear the a block cache programmically

When displaying information from a config object add it also as cache dependency to the render array.

For example in a preprocess hook:

  $config = Drupal::config('mymodule.settings');
  $config_value = $config->get('some_field');
  $variables('some_field') = (
    '#markup' => $config_value,
  );
  // add the cache tag, so that the output gets invalidated when the config is saved
  Drupal::service('renderer')->addCacheableDependency($variables, $config);

See How to clear cache for config entity after making changes?

You don’t need to change form submit because saving a config object automatically invalidates cache entries having this cache dependency (cache tag).


Another example based on the block code from your answer and using a different method to add the cache tag:

  /**
   * Config settings.
   *
   * @var string
   */
  const SETTINGS = 'uw_cbl_special_alert.settings';
  /**
   * {@inheritdoc}
   */
  public function build() {
    $config = Drupal::config(static::SETTINGS);
    return (
      '#markup' => $config->get('message'),
      '#cache' => (
        'tags' => $config->getCacheTags(),
      ),
    );
  }

Access caching

As asked in the comments, you can add cache dependencies to access results as well:

AccessResult::allowed()->addCacheableDependency($config)
AccessResult::forbidden()->addCacheableDependency($config)

mining pools – How is a block solution broadcasted?

As we know there are scores of mining pool around the globe but some are pretty big ones such as Antpool, Poolin, BTC.com etc. with majority of them lying in China https://www.buybitcoinworldwide.com/mining/pools/. I have few questions in the broadcasting regard:-

  1. If a solution is found by a miner, does the miner have the control to which nodes is it broadcasted?
  2. If it is broadcasted based on the location of miners, then won’t all the miners in the pool have an intrinsic advantage of their pool peers validating the solution?
  3. Let’s take a case when there are two solutions being broadcasted at the same time, one from the USA and another from China. Since, a lot of miners are there in China, Mongolia, Russia etc. doesn’t miners in China have a better chance of getting consensus?
  4. Also, what do we mean by consensus in the above case? Let’s say the USA solution reached 20% of the active miners and the Chinese solution reached 80% of the miners. As per my understanding even the USA solution could reach more than 51% consensus(more than 10% of globally active miners agreeing with the solution). Shouldn’t there be a threshold on the minimum number of global miners agreeing with your solution given this large pools existence?

Thanks in advance! 🙂

theming – Hide block if no submenu in Twig

I’m creating a node–page.html.twig and I’m using twig_tweak to help render a block for my sidebar to display the sub-menus. Is there a way to hide it if the page doesn’t have any submenus?

Here’s my code:

<div class="page-sidebar grid-3 alpha">
  <div class="sub-region page-sidebar clearfix widgets widget-sidebar">
    <div class="contextual-links-region panel-pane pane-menu-tree pane-main-menu">
    {{ drupal_entity('block', 'mainmenu', check_access=false) }}
  </div>
</div>

Is there some sort of if statement I could use to hide the block if the page has no submenu?

Thank you!