using OpenTelemetry; | |
using OpenTelemetry.Logs; | |
using OpenTelemetry.Resources; | |
using OpenTelemetry.Trace; | |
var builder = WebApplication.CreateBuilder(args); | |
var app = builder.Build(); | |
var appResourceBuilder = ResourceBuilder.CreateDefault() | |
.AddService(serviceName: Telemetry.ServiceName, serviceVersion: Telemetry.ServiceVersion); |
This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
using System.Buffers; | |
using System.Net.WebSockets; | |
var builder = WebApplication.CreateBuilder(args); | |
var app = builder.Build(); | |
app.MapGet("/ws", async (HttpContext context) => | |
{ | |
const int MaxMessageSize = 1024 * 1024; |
pragma solidity ^0.7.0; | |
// Each mining pool that intends to provide flash loans deploys a Loaner contract and transfers ETH to it | |
// When testing each bundle, the diff in balance in this contract is taking into account for calculating effective gas price | |
// The contract loans funds only on blocks mined by the miner and on zero-gasprice txs | |
contract Loaner { | |
address immutable owner; | |
constructor(address _owner) { | |
owner = _owner; |
using System; | |
using System.Threading.Tasks; | |
namespace System.Collections.Concurrent | |
{ | |
public static class ConcurrentDictionaryExtensions | |
{ | |
/// <summary> | |
/// Provides an alternative to <see cref="ConcurrentDictionary{TKey, TValue}.GetOrAdd(TKey, Func{TKey, TValue})"/> that disposes values that implement <see cref="IDisposable"/>. | |
/// </summary> |
I recently stumbled upon Falsehoods programmers believe about time zones, which got a good laugh out of me. It reminded me of other great lists of falsehoods, such as about names or time, and made me look for an equivalent for Ethereum. Having found none, here is my humble contribution to this set.
Calling estimateGas
will return the gas required by my transaction
Calling estimateGas
will return the gas that your transaction would require if it were mined now. The current state of the chain may be very different to the state in which your tx will get mined. So when your tx i
Pekka Väänänen, Sep 14 2020
Data-Oriented Design (2018) by Richard Fabian
Computers keep getting faster but the future ain't what it used to be. Instead of higher clock rates we get deeper pipelines, higher latencies, more cores. Programming these systems requires paying attention to how we structure and access our data. In Data-Oriented Design Richard Fabian—who has worked at Frontier Developments, Rockstar Games, and Team17—presents us an approach to reason about these issues from a C++ game developer's perspective.
Data-oriented design is about caches and decoupling meaning from data. The former implies laying out your data so that they're compact and predictably accessed. The latter means exposing the raw transforms from one sequence of bits to another. For example, finding the pla
0x00 0 STOP | |
0x01 3 ADD | |
0x02 5 MUL | |
0x03 3 SUB | |
0x04 5 DIV | |
0x05 5 SDIV | |
0x06 5 MOD | |
0x07 5 SMOD | |
0x08 8 ADDMOD | |
0x09 8 MULMOD |